Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202754
b: refs/heads/master
c: 2c76ef8
h: refs/heads/master
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Jun 2, 2010
1 parent 8133f97 commit 28bb99f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d425a7d7bc7bc834fe04e15e88b61bc34331a98
refs/heads/master: 2c76ef89b05654457555a1458ccf2aa8eec5fc50
30 changes: 30 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,33 @@ static void ath9k_htc_init_rate(struct ath9k_htc_priv *priv,
sta->addr, be32_to_cpu(trate.capflags));
}

static void ath9k_htc_update_rate(struct ath9k_htc_priv *priv,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf)
{
struct ath_common *common = ath9k_hw_common(priv->ah);
struct ath9k_htc_target_rate trate;
struct ieee80211_sta *sta;
int ret;

memset(&trate, 0, sizeof(struct ath9k_htc_target_rate));

rcu_read_lock();
sta = ieee80211_find_sta(vif, bss_conf->bssid);
if (!sta) {
rcu_read_unlock();
return;
}
ath9k_htc_setup_rate(priv, sta, &trate);
rcu_read_unlock();

ret = ath9k_htc_send_rate_cmd(priv, &trate);
if (!ret)
ath_print(common, ATH_DBG_CONFIG,
"Updated target sta: %pM, rate caps: 0x%X\n",
bss_conf->bssid, be32_to_cpu(trate.capflags));
}

static int ath9k_htc_aggr_oper(struct ath9k_htc_priv *priv,
struct ieee80211_vif *vif,
u8 *sta_addr, u8 tid, bool oper)
Expand Down Expand Up @@ -1595,6 +1622,9 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
ath9k_hw_init_global_settings(ah);
}

if (changed & BSS_CHANGED_HT)
ath9k_htc_update_rate(priv, vif, bss_conf);

ath9k_htc_ps_restore(priv);
mutex_unlock(&priv->mutex);
}
Expand Down

0 comments on commit 28bb99f

Please sign in to comment.