diff options
author | Rajkumar Manoharan <rmanohar@qti.qualcomm.com> | 2014-06-11 06:48:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-19 15:49:18 -0400 |
commit | ca900ac9d9f0e38782f5a24e64b05f607fd6eb4c (patch) | |
tree | 099616d5907ecaddcad39e3c060233d593537077 | |
parent | 8d7e09dda8214e4154f45238b4c85ab1ecb5d89a (diff) |
ath9k: Move beacon config to channel context
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/channel.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/link.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 6 |
7 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 4df412b71680..d632f8f2a72c 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -328,6 +328,7 @@ struct ath_chanctx { | |||
328 | struct list_head vifs; | 328 | struct list_head vifs; |
329 | struct list_head acq[IEEE80211_NUM_ACS]; | 329 | struct list_head acq[IEEE80211_NUM_ACS]; |
330 | 330 | ||
331 | struct ath_beacon_config beacon; | ||
331 | struct ath9k_hw_cal_data caldata; | 332 | struct ath9k_hw_cal_data caldata; |
332 | struct timespec tsf_ts; | 333 | struct timespec tsf_ts; |
333 | u64 tsf_val; | 334 | u64 tsf_val; |
@@ -828,7 +829,6 @@ struct ath_softc { | |||
828 | #ifdef CONFIG_ATH9K_DEBUGFS | 829 | #ifdef CONFIG_ATH9K_DEBUGFS |
829 | struct ath9k_debug debug; | 830 | struct ath9k_debug debug; |
830 | #endif | 831 | #endif |
831 | struct ath_beacon_config cur_beacon_conf; | ||
832 | struct delayed_work tx_complete_work; | 832 | struct delayed_work tx_complete_work; |
833 | struct delayed_work hw_pll_work; | 833 | struct delayed_work hw_pll_work; |
834 | struct timer_list sleep_timer; | 834 | struct timer_list sleep_timer; |
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index eae8f686f125..c0ff01599ed3 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -249,7 +249,7 @@ void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif) | |||
249 | static int ath9k_beacon_choose_slot(struct ath_softc *sc) | 249 | static int ath9k_beacon_choose_slot(struct ath_softc *sc) |
250 | { | 250 | { |
251 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 251 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
252 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 252 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
253 | u16 intval; | 253 | u16 intval; |
254 | u32 tsftu; | 254 | u32 tsftu; |
255 | u64 tsf; | 255 | u64 tsf; |
@@ -277,7 +277,7 @@ static int ath9k_beacon_choose_slot(struct ath_softc *sc) | |||
277 | static void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif) | 277 | static void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif) |
278 | { | 278 | { |
279 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 279 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
280 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 280 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
281 | struct ath_vif *avp = (void *)vif->drv_priv; | 281 | struct ath_vif *avp = (void *)vif->drv_priv; |
282 | u32 tsfadjust; | 282 | u32 tsfadjust; |
283 | 283 | ||
@@ -528,7 +528,7 @@ static void ath9k_cache_beacon_config(struct ath_softc *sc, | |||
528 | struct ieee80211_bss_conf *bss_conf) | 528 | struct ieee80211_bss_conf *bss_conf) |
529 | { | 529 | { |
530 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 530 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
531 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 531 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
532 | 532 | ||
533 | ath_dbg(common, BEACON, | 533 | ath_dbg(common, BEACON, |
534 | "Caching beacon data for BSS: %pM\n", bss_conf->bssid); | 534 | "Caching beacon data for BSS: %pM\n", bss_conf->bssid); |
@@ -564,7 +564,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif, | |||
564 | u32 changed) | 564 | u32 changed) |
565 | { | 565 | { |
566 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; | 566 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; |
567 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 567 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
568 | struct ath_hw *ah = sc->sc_ah; | 568 | struct ath_hw *ah = sc->sc_ah; |
569 | struct ath_common *common = ath9k_hw_common(ah); | 569 | struct ath_common *common = ath9k_hw_common(ah); |
570 | unsigned long flags; | 570 | unsigned long flags; |
@@ -631,7 +631,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif, | |||
631 | void ath9k_set_beacon(struct ath_softc *sc) | 631 | void ath9k_set_beacon(struct ath_softc *sc) |
632 | { | 632 | { |
633 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 633 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
634 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 634 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
635 | 635 | ||
636 | switch (sc->sc_ah->opmode) { | 636 | switch (sc->sc_ah->opmode) { |
637 | case NL80211_IFTYPE_AP: | 637 | case NL80211_IFTYPE_AP: |
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 4a7691eecdb4..156625318d04 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c | |||
@@ -271,7 +271,6 @@ void ath_chanctx_init(struct ath_softc *sc) | |||
271 | for (j = 0; j < ARRAY_SIZE(ctx->acq); j++) | 271 | for (j = 0; j < ARRAY_SIZE(ctx->acq); j++) |
272 | INIT_LIST_HEAD(&ctx->acq[j]); | 272 | INIT_LIST_HEAD(&ctx->acq[j]); |
273 | } | 273 | } |
274 | sc->cur_chan = &sc->chanctx[0]; | ||
275 | ctx = &sc->offchannel.chan; | 274 | ctx = &sc->offchannel.chan; |
276 | cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); | 275 | cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); |
277 | INIT_LIST_HEAD(&ctx->vifs); | 276 | INIT_LIST_HEAD(&ctx->vifs); |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 45f198ff6e0e..1ff1a75f4fed 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -510,6 +510,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, | |||
510 | sc->dfs_detector = dfs_pattern_detector_init(common, NL80211_DFS_UNSET); | 510 | sc->dfs_detector = dfs_pattern_detector_init(common, NL80211_DFS_UNSET); |
511 | sc->tx99_power = MAX_RATE_POWER + 1; | 511 | sc->tx99_power = MAX_RATE_POWER + 1; |
512 | init_waitqueue_head(&sc->tx_wait); | 512 | init_waitqueue_head(&sc->tx_wait); |
513 | sc->cur_chan = &sc->chanctx[0]; | ||
513 | 514 | ||
514 | if (!pdata || pdata->use_eeprom) { | 515 | if (!pdata || pdata->use_eeprom) { |
515 | ah->ah_flags |= AH_USE_EEPROM; | 516 | ah->ah_flags |= AH_USE_EEPROM; |
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c index d9c01d563cc2..2343f56e6498 100644 --- a/drivers/net/wireless/ath/ath9k/link.c +++ b/drivers/net/wireless/ath/ath9k/link.c | |||
@@ -440,7 +440,7 @@ void ath_check_ani(struct ath_softc *sc) | |||
440 | { | 440 | { |
441 | struct ath_hw *ah = sc->sc_ah; | 441 | struct ath_hw *ah = sc->sc_ah; |
442 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 442 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
443 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 443 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
444 | 444 | ||
445 | /* | 445 | /* |
446 | * Check for the various conditions in which ANI has to | 446 | * Check for the various conditions in which ANI has to |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index fec9e0b42f5d..7b9c7e53caaa 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -545,7 +545,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) | |||
545 | sc->ps_flags &= ~PS_BEACON_SYNC; | 545 | sc->ps_flags &= ~PS_BEACON_SYNC; |
546 | ath_dbg(common, PS, | 546 | ath_dbg(common, PS, |
547 | "Reconfigure beacon timers based on synchronized timestamp\n"); | 547 | "Reconfigure beacon timers based on synchronized timestamp\n"); |
548 | if (!(WARN_ON_ONCE(sc->cur_beacon_conf.beacon_interval == 0))) | 548 | if (!(WARN_ON_ONCE(sc->cur_chan->beacon.beacon_interval == 0))) |
549 | ath9k_set_beacon(sc); | 549 | ath9k_set_beacon(sc); |
550 | if (sc->p2p_ps_vif) | 550 | if (sc->p2p_ps_vif) |
551 | ath9k_update_p2p_ps(sc, sc->p2p_ps_vif->vif); | 551 | ath9k_update_p2p_ps(sc, sc->p2p_ps_vif->vif); |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 22460a1e033c..7dd6187761c1 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1694,7 +1694,7 @@ int ath_txq_update(struct ath_softc *sc, int qnum, | |||
1694 | int ath_cabq_update(struct ath_softc *sc) | 1694 | int ath_cabq_update(struct ath_softc *sc) |
1695 | { | 1695 | { |
1696 | struct ath9k_tx_queue_info qi; | 1696 | struct ath9k_tx_queue_info qi; |
1697 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 1697 | struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon; |
1698 | int qnum = sc->beacon.cabq->axq_qnum; | 1698 | int qnum = sc->beacon.cabq->axq_qnum; |
1699 | 1699 | ||
1700 | ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi); | 1700 | ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi); |
@@ -2301,8 +2301,8 @@ void ath_tx_cabq(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
2301 | int max_duration; | 2301 | int max_duration; |
2302 | 2302 | ||
2303 | max_duration = | 2303 | max_duration = |
2304 | sc->cur_beacon_conf.beacon_interval * 1000 * | 2304 | sc->cur_chan->beacon.beacon_interval * 1000 * |
2305 | sc->cur_beacon_conf.dtim_period / ATH_BCBUF; | 2305 | sc->cur_chan->beacon.dtim_period / ATH_BCBUF; |
2306 | 2306 | ||
2307 | do { | 2307 | do { |
2308 | struct ath_frame_info *fi = get_frame_info(skb); | 2308 | struct ath_frame_info *fi = get_frame_info(skb); |