aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c20
-rw-r--r--drivers/net/wireless/ath/ath9k/common.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c2
3 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index cb366adc820b..f50a6bc5d06e 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -219,12 +219,15 @@ void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif)
219 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 219 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
220 struct ath_vif *avp = (void *)vif->drv_priv; 220 struct ath_vif *avp = (void *)vif->drv_priv;
221 struct ath_buf *bf = avp->av_bcbuf; 221 struct ath_buf *bf = avp->av_bcbuf;
222 struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon;
222 223
223 ath_dbg(common, CONFIG, "Removing interface at beacon slot: %d\n", 224 ath_dbg(common, CONFIG, "Removing interface at beacon slot: %d\n",
224 avp->av_bslot); 225 avp->av_bslot);
225 226
226 tasklet_disable(&sc->bcon_tasklet); 227 tasklet_disable(&sc->bcon_tasklet);
227 228
229 cur_conf->enable_beacon &= ~BIT(avp->av_bslot);
230
228 if (bf && bf->bf_mpdu) { 231 if (bf && bf->bf_mpdu) {
229 struct sk_buff *skb = bf->bf_mpdu; 232 struct sk_buff *skb = bf->bf_mpdu;
230 dma_unmap_single(sc->dev, bf->bf_buf_addr, 233 dma_unmap_single(sc->dev, bf->bf_buf_addr,
@@ -521,8 +524,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
521 } 524 }
522 525
523 if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) { 526 if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) {
524 if ((vif->type != NL80211_IFTYPE_AP) || 527 if (vif->type != NL80211_IFTYPE_AP) {
525 (sc->nbcnvifs > 1)) {
526 ath_dbg(common, CONFIG, 528 ath_dbg(common, CONFIG,
527 "An AP interface is already present !\n"); 529 "An AP interface is already present !\n");
528 return false; 530 return false;
@@ -616,12 +618,14 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,
616 * enabling/disabling SWBA. 618 * enabling/disabling SWBA.
617 */ 619 */
618 if (changed & BSS_CHANGED_BEACON_ENABLED) { 620 if (changed & BSS_CHANGED_BEACON_ENABLED) {
619 if (!bss_conf->enable_beacon && 621 bool enabled = cur_conf->enable_beacon;
620 (sc->nbcnvifs <= 1)) { 622
621 cur_conf->enable_beacon = false; 623 if (!bss_conf->enable_beacon) {
622 } else if (bss_conf->enable_beacon) { 624 cur_conf->enable_beacon &= ~BIT(avp->av_bslot);
623 cur_conf->enable_beacon = true; 625 } else {
624 ath9k_cache_beacon_config(sc, ctx, bss_conf); 626 cur_conf->enable_beacon |= BIT(avp->av_bslot);
627 if (!enabled)
628 ath9k_cache_beacon_config(sc, ctx, bss_conf);
625 } 629 }
626 } 630 }
627 631
diff --git a/drivers/net/wireless/ath/ath9k/common.h b/drivers/net/wireless/ath/ath9k/common.h
index 2b79a568e803..d23737342f4f 100644
--- a/drivers/net/wireless/ath/ath9k/common.h
+++ b/drivers/net/wireless/ath/ath9k/common.h
@@ -54,7 +54,7 @@ struct ath_beacon_config {
54 u16 dtim_period; 54 u16 dtim_period;
55 u16 bmiss_timeout; 55 u16 bmiss_timeout;
56 u8 dtim_count; 56 u8 dtim_count;
57 bool enable_beacon; 57 u8 enable_beacon;
58 bool ibss_creator; 58 bool ibss_creator;
59 u32 nexttbtt; 59 u32 nexttbtt;
60 u32 intval; 60 u32 intval;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 60aa8d71e753..8529014e1a5e 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -424,7 +424,7 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah)
424 ah->power_mode = ATH9K_PM_UNDEFINED; 424 ah->power_mode = ATH9K_PM_UNDEFINED;
425 ah->htc_reset_init = true; 425 ah->htc_reset_init = true;
426 426
427 ah->tpc_enabled = true; 427 ah->tpc_enabled = false;
428 428
429 ah->ani_function = ATH9K_ANI_ALL; 429 ah->ani_function = ATH9K_ANI_ALL;
430 if (!AR_SREV_9300_20_OR_LATER(ah)) 430 if (!AR_SREV_9300_20_OR_LATER(ah))