diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 19 |
3 files changed, 24 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 707c5b418dc6..124dfedb0fd1 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -407,9 +407,17 @@ static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, | |||
407 | #define MIN_SWBA_RESPONSE 10 /* in TUs */ | 407 | #define MIN_SWBA_RESPONSE 10 /* in TUs */ |
408 | 408 | ||
409 | struct htc_beacon { | 409 | struct htc_beacon { |
410 | enum { | ||
411 | OK, /* no change needed */ | ||
412 | UPDATE, /* update pending */ | ||
413 | COMMIT /* beacon sent, commit change */ | ||
414 | } updateslot; /* slot time update fsm */ | ||
415 | |||
410 | struct ieee80211_vif *bslot[ATH9K_HTC_MAX_BCN_VIF]; | 416 | struct ieee80211_vif *bslot[ATH9K_HTC_MAX_BCN_VIF]; |
411 | u32 bmisscnt; | 417 | u32 bmisscnt; |
412 | u32 beaconq; | 418 | u32 beaconq; |
419 | int slottime; | ||
420 | int slotupdate; | ||
413 | }; | 421 | }; |
414 | 422 | ||
415 | struct ath_btcoex { | 423 | struct ath_btcoex { |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 4b3b4dd49a42..8a3bd5fe3a54 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -520,6 +520,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, | |||
520 | 520 | ||
521 | for (i = 0; i < ATH9K_HTC_MAX_BCN_VIF; i++) | 521 | for (i = 0; i < ATH9K_HTC_MAX_BCN_VIF; i++) |
522 | priv->beacon.bslot[i] = NULL; | 522 | priv->beacon.bslot[i] = NULL; |
523 | priv->beacon.slottime = ATH9K_SLOT_TIME_9; | ||
523 | 524 | ||
524 | ath9k_cmn_init_channels_rates(common); | 525 | ath9k_cmn_init_channels_rates(common); |
525 | ath9k_cmn_init_crypto(ah); | 526 | ath9k_cmn_init_crypto(ah); |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index b82a7c43eb6e..f46cd0250e48 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -1500,6 +1500,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, | |||
1500 | struct ath9k_htc_priv *priv = hw->priv; | 1500 | struct ath9k_htc_priv *priv = hw->priv; |
1501 | struct ath_hw *ah = priv->ah; | 1501 | struct ath_hw *ah = priv->ah; |
1502 | struct ath_common *common = ath9k_hw_common(ah); | 1502 | struct ath_common *common = ath9k_hw_common(ah); |
1503 | int slottime; | ||
1503 | 1504 | ||
1504 | mutex_lock(&priv->mutex); | 1505 | mutex_lock(&priv->mutex); |
1505 | ath9k_htc_ps_wakeup(priv); | 1506 | ath9k_htc_ps_wakeup(priv); |
@@ -1575,11 +1576,21 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, | |||
1575 | 1576 | ||
1576 | if (changed & BSS_CHANGED_ERP_SLOT) { | 1577 | if (changed & BSS_CHANGED_ERP_SLOT) { |
1577 | if (bss_conf->use_short_slot) | 1578 | if (bss_conf->use_short_slot) |
1578 | ah->slottime = 9; | 1579 | slottime = 9; |
1579 | else | 1580 | else |
1580 | ah->slottime = 20; | 1581 | slottime = 20; |
1581 | 1582 | if (vif->type == NL80211_IFTYPE_AP) { | |
1582 | ath9k_hw_init_global_settings(ah); | 1583 | /* |
1584 | * Defer update, so that connected stations can adjust | ||
1585 | * their settings at the same time. | ||
1586 | * See beacon.c for more details | ||
1587 | */ | ||
1588 | priv->beacon.slottime = slottime; | ||
1589 | priv->beacon.updateslot = UPDATE; | ||
1590 | } else { | ||
1591 | ah->slottime = slottime; | ||
1592 | ath9k_hw_init_global_settings(ah); | ||
1593 | } | ||
1583 | } | 1594 | } |
1584 | 1595 | ||
1585 | if (changed & BSS_CHANGED_HT) | 1596 | if (changed & BSS_CHANGED_HT) |