summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-08-14 13:17:28 +0300
committerLuciano Coelho <coelho@ti.com>2011-08-22 12:35:29 +0300
commit99d5ad7b9ccedee4a9ff8e24688c7c20e428cd21 (patch)
treebb9b73ad2bf21e58aac318d07b378e930eb186cd /drivers/net/wireless/wl12xx/cmd.c
parent0b932ab9f156488a56577873b638ecb1e65fa8d7 (diff)
wl12xx: AP-mode - configure STA HT rates on join
When a new STA joins the BSS, configure the HT rates it supports to the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index d8c39168104..d3e938012ac 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -1415,10 +1415,12 @@ out_free:
out:
return ret;
}
+
int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid)
{
struct wl12xx_cmd_add_peer *cmd;
int ret;
+ u32 sta_rates;
wl1271_debug(DEBUG_CMD, "cmd add peer %d", (int)hlid);
@@ -1437,8 +1439,12 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid)
cmd->hlid = hlid;
cmd->wmm = sta->wme ? 1 : 0;
- cmd->supported_rates = cpu_to_le32(wl1271_tx_enabled_rates_get(wl,
- sta->supp_rates[wl->band]));
+ sta_rates = sta->supp_rates[wl->band];
+ if (sta->ht_cap.ht_supported)
+ sta_rates |= sta->ht_cap.mcs.rx_mask[0] << HW_HT_RATES_OFFSET;
+
+ cmd->supported_rates =
+ cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates));
wl1271_debug(DEBUG_CMD, "new peer rates: 0x%x", cmd->supported_rates);