aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-05-17 02:31:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-02 16:13:16 -0400
commit2c76ef89b05654457555a1458ccf2aa8eec5fc50 (patch)
tree2a89eaa9b2ba543ba4a1b7c73d56ac7ecdbfa60d
parent0d425a7d7bc7bc834fe04e15e88b61bc34331a98 (diff)
ath9k_htc: Update HT configuration properly
Use BSS_CHANGED_HT to handle HT parameter changes. The rate information on the target has to be updated to handle changes in HT configuration. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index fe5debf0b7d7..80feeb3a6bf0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -409,6 +409,33 @@ static void ath9k_htc_init_rate(struct ath9k_htc_priv *priv,
409 sta->addr, be32_to_cpu(trate.capflags)); 409 sta->addr, be32_to_cpu(trate.capflags));
410} 410}
411 411
412static void ath9k_htc_update_rate(struct ath9k_htc_priv *priv,
413 struct ieee80211_vif *vif,
414 struct ieee80211_bss_conf *bss_conf)
415{
416 struct ath_common *common = ath9k_hw_common(priv->ah);
417 struct ath9k_htc_target_rate trate;
418 struct ieee80211_sta *sta;
419 int ret;
420
421 memset(&trate, 0, sizeof(struct ath9k_htc_target_rate));
422
423 rcu_read_lock();
424 sta = ieee80211_find_sta(vif, bss_conf->bssid);
425 if (!sta) {
426 rcu_read_unlock();
427 return;
428 }
429 ath9k_htc_setup_rate(priv, sta, &trate);
430 rcu_read_unlock();
431
432 ret = ath9k_htc_send_rate_cmd(priv, &trate);
433 if (!ret)
434 ath_print(common, ATH_DBG_CONFIG,
435 "Updated target sta: %pM, rate caps: 0x%X\n",
436 bss_conf->bssid, be32_to_cpu(trate.capflags));
437}
438
412static int ath9k_htc_aggr_oper(struct ath9k_htc_priv *priv, 439static int ath9k_htc_aggr_oper(struct ath9k_htc_priv *priv,
413 struct ieee80211_vif *vif, 440 struct ieee80211_vif *vif,
414 u8 *sta_addr, u8 tid, bool oper) 441 u8 *sta_addr, u8 tid, bool oper)
@@ -1595,6 +1622,9 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
1595 ath9k_hw_init_global_settings(ah); 1622 ath9k_hw_init_global_settings(ah);
1596 } 1623 }
1597 1624
1625 if (changed & BSS_CHANGED_HT)
1626 ath9k_htc_update_rate(priv, vif, bss_conf);
1627
1598 ath9k_htc_ps_restore(priv); 1628 ath9k_htc_ps_restore(priv);
1599 mutex_unlock(&priv->mutex); 1629 mutex_unlock(&priv->mutex);
1600} 1630}