]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ath9k: Move caldata into channel context
authorFelix Fietkau <nbd@openwrt.org>
Wed, 11 Jun 2014 10:47:59 +0000 (16:17 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 Jun 2014 19:49:18 +0000 (15:49 -0400)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/debug.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/mci.c

index 3db4898242615e3fe8c7e380f1e765852debb757..ffacbf6e9f52e370b52ce41478ec61fadfa678a9 100644 (file)
@@ -327,6 +327,8 @@ struct ath_chanctx {
        struct list_head vifs;
        struct list_head acq[IEEE80211_NUM_ACS];
 
+       struct ath9k_hw_cal_data caldata;
+
        u16 txpower;
        bool offchannel;
        bool stopped;
@@ -820,8 +822,6 @@ struct ath_softc {
        struct led_classdev led_cdev;
 #endif
 
-       struct ath9k_hw_cal_data caldata;
-
 #ifdef CONFIG_ATH9K_DEBUGFS
        struct ath9k_debug debug;
 #endif
index 6cc42be48d4e60e68f3e2603ebfc465f89159a0d..f230e2e9824ed6aa23088192107af5590bff4d52 100644 (file)
@@ -1080,7 +1080,7 @@ static ssize_t read_file_dump_nfcal(struct file *file, char __user *user_buf,
 {
        struct ath_softc *sc = file->private_data;
        struct ath_hw *ah = sc->sc_ah;
-       struct ath9k_nfcal_hist *h = sc->caldata.nfCalHist;
+       struct ath9k_nfcal_hist *h = sc->cur_chan->caldata.nfCalHist;
        struct ath_common *common = ath9k_hw_common(ah);
        struct ieee80211_conf *conf = &common->hw->conf;
        u32 len = 0, size = 1500;
index 92bf9079184f6af4bd5ec306d5862c771835b6e7..85db24be8eec04c2c388141796049ce9667bc708 100644 (file)
@@ -279,7 +279,7 @@ int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
 
        if (!sc->cur_chan->offchannel) {
                fastcc = false;
-               caldata = &sc->caldata;
+               caldata = &sc->cur_chan->caldata;
        }
 
        if (!hchan) {
index 313ed995585a9bc438b03a198b981ca67fa75092..3f7a11edb82a77dedcfdc5f38fa4c6c832e9579e 100644 (file)
@@ -706,7 +706,7 @@ void ath9k_mci_set_txpower(struct ath_softc *sc, bool setchannel,
                return;
 
        if (setchannel) {
-               struct ath9k_hw_cal_data *caldata = &sc->caldata;
+               struct ath9k_hw_cal_data *caldata = &sc->cur_chan->caldata;
                if (IS_CHAN_HT40PLUS(ah->curchan) &&
                    (ah->curchan->channel > caldata->channel) &&
                    (ah->curchan->channel <= caldata->channel + 20))