aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h4
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c3
4 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 7c8409e53598..56dee3719f95 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -370,7 +370,7 @@ struct ath_vif {
370#define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024) 370#define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024)
371 371
372struct ath_beacon_config { 372struct ath_beacon_config {
373 u16 beacon_interval; 373 int beacon_interval;
374 u16 listen_interval; 374 u16 listen_interval;
375 u16 dtim_period; 375 u16 dtim_period;
376 u16 bmiss_timeout; 376 u16 bmiss_timeout;
@@ -633,8 +633,6 @@ struct ath_softc {
633 struct ath9k_hw_cal_data caldata; 633 struct ath9k_hw_cal_data caldata;
634 int last_rssi; 634 int last_rssi;
635 635
636 int beacon_interval;
637
638#ifdef CONFIG_ATH9K_DEBUGFS 636#ifdef CONFIG_ATH9K_DEBUGFS
639 struct ath9k_debug debug; 637 struct ath9k_debug debug;
640 spinlock_t nodes_lock; 638 spinlock_t nodes_lock;
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index fcb36abfc309..ed6e7d66fc38 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -226,6 +226,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif)
226 struct ath_vif *avp; 226 struct ath_vif *avp;
227 struct ath_buf *bf; 227 struct ath_buf *bf;
228 struct sk_buff *skb; 228 struct sk_buff *skb;
229 struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
229 __le64 tstamp; 230 __le64 tstamp;
230 231
231 avp = (void *)vif->drv_priv; 232 avp = (void *)vif->drv_priv;
@@ -282,7 +283,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif)
282 u64 tsfadjust; 283 u64 tsfadjust;
283 int intval; 284 int intval;
284 285
285 intval = sc->beacon_interval ? : ATH_DEFAULT_BINTVAL; 286 intval = cur_conf->beacon_interval ? : ATH_DEFAULT_BINTVAL;
286 287
287 /* 288 /*
288 * Calculate the TSF offset for this beacon slot, i.e., the 289 * Calculate the TSF offset for this beacon slot, i.e., the
@@ -346,6 +347,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp)
346void ath_beacon_tasklet(unsigned long data) 347void ath_beacon_tasklet(unsigned long data)
347{ 348{
348 struct ath_softc *sc = (struct ath_softc *)data; 349 struct ath_softc *sc = (struct ath_softc *)data;
350 struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
349 struct ath_hw *ah = sc->sc_ah; 351 struct ath_hw *ah = sc->sc_ah;
350 struct ath_common *common = ath9k_hw_common(ah); 352 struct ath_common *common = ath9k_hw_common(ah);
351 struct ath_buf *bf = NULL; 353 struct ath_buf *bf = NULL;
@@ -393,7 +395,7 @@ void ath_beacon_tasklet(unsigned long data)
393 * on the tsf to safeguard against missing an swba. 395 * on the tsf to safeguard against missing an swba.
394 */ 396 */
395 397
396 intval = sc->beacon_interval ? : ATH_DEFAULT_BINTVAL; 398 intval = cur_conf->beacon_interval ? : ATH_DEFAULT_BINTVAL;
397 399
398 tsf = ath9k_hw_gettsf64(ah); 400 tsf = ath9k_hw_gettsf64(ah);
399 tsftu = TSF_TO_TU(tsf>>32, tsf); 401 tsftu = TSF_TO_TU(tsf>>32, tsf);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 12e0ac688274..8469d7c8744a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1891,6 +1891,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
1891 u32 changed) 1891 u32 changed)
1892{ 1892{
1893 struct ath_softc *sc = hw->priv; 1893 struct ath_softc *sc = hw->priv;
1894 struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
1894 struct ath_hw *ah = sc->sc_ah; 1895 struct ath_hw *ah = sc->sc_ah;
1895 struct ath_common *common = ath9k_hw_common(ah); 1896 struct ath_common *common = ath9k_hw_common(ah);
1896 struct ath_vif *avp = (void *)vif->drv_priv; 1897 struct ath_vif *avp = (void *)vif->drv_priv;
@@ -1949,7 +1950,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
1949 ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); 1950 ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
1950 1951
1951 if (changed & BSS_CHANGED_BEACON_INT) { 1952 if (changed & BSS_CHANGED_BEACON_INT) {
1952 sc->beacon_interval = bss_conf->beacon_int; 1953 cur_conf->beacon_interval = bss_conf->beacon_int;
1953 /* 1954 /*
1954 * In case of AP mode, the HW TSF has to be reset 1955 * In case of AP mode, the HW TSF has to be reset
1955 * when the beacon interval changes. 1956 * when the beacon interval changes.
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 68a1c7612e9b..8d89aa958f1b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1055,6 +1055,7 @@ int ath_txq_update(struct ath_softc *sc, int qnum,
1055int ath_cabq_update(struct ath_softc *sc) 1055int ath_cabq_update(struct ath_softc *sc)
1056{ 1056{
1057 struct ath9k_tx_queue_info qi; 1057 struct ath9k_tx_queue_info qi;
1058 struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
1058 int qnum = sc->beacon.cabq->axq_qnum; 1059 int qnum = sc->beacon.cabq->axq_qnum;
1059 1060
1060 ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi); 1061 ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi);
@@ -1066,7 +1067,7 @@ int ath_cabq_update(struct ath_softc *sc)
1066 else if (sc->config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND) 1067 else if (sc->config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND)
1067 sc->config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND; 1068 sc->config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND;
1068 1069
1069 qi.tqi_readyTime = (sc->beacon_interval * 1070 qi.tqi_readyTime = (cur_conf->beacon_interval *
1070 sc->config.cabqReadytime) / 100; 1071 sc->config.cabqReadytime) / 100;
1071 ath_txq_update(sc, qnum, &qi); 1072 ath_txq_update(sc, qnum, &qi);
1072 1073