aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore/cmd.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-11-20 13:20:08 +0200
committerLuciano Coelho <coelho@ti.com>2012-11-27 10:49:06 +0200
commit42ec1f82a862b38eb84bc3bbd7fb97b1aa48f18c (patch)
treef419806dc7073b7f0e8125885bce66d406c3cde2 /drivers/net/wireless/ti/wlcore/cmd.c
parentwlcore: set active psm on association (diff)
downloadlinux-dev-42ec1f82a862b38eb84bc3bbd7fb97b1aa48f18c.tar.xz
linux-dev-42ec1f82a862b38eb84bc3bbd7fb97b1aa48f18c.zip
wlcore: specify correct supported_rates
The supported_rates field should contain all our supported rates, even if the remote peer doesn't support them. (rename CONF_TX_AP_ENABLED_RATES to CONF_TX_ENABLED_RATES, as we now use it for both ap and sta) Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/cmd.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/cmd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 38fa8ff8d577..1cf1225d2f5c 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -441,6 +441,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
struct wl12xx_cmd_role_start *cmd;
+ u32 supported_rates;
int ret;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
@@ -461,7 +462,14 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
cmd->sta.ssid_len = wlvif->ssid_len;
memcpy(cmd->sta.ssid, wlvif->ssid, wlvif->ssid_len);
memcpy(cmd->sta.bssid, vif->bss_conf.bssid, ETH_ALEN);
- cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
+
+ supported_rates = CONF_TX_ENABLED_RATES | CONF_TX_MCS_RATES |
+ wlcore_hw_sta_get_ap_rate_mask(wl, wlvif);
+ if (wlvif->p2p)
+ supported_rates &= ~CONF_TX_CCK_RATES;
+
+ cmd->sta.local_rates = cpu_to_le32(supported_rates);
+
cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type);
if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) {
@@ -601,7 +609,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
memcpy(cmd->ap.ssid, bss_conf->ssid, bss_conf->ssid_len);
}
- supported_rates = CONF_TX_AP_ENABLED_RATES | CONF_TX_MCS_RATES |
+ supported_rates = CONF_TX_ENABLED_RATES | CONF_TX_MCS_RATES |
wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif);
wl1271_debug(DEBUG_CMD, "cmd role start ap with supported_rates 0x%08x",