aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-07-05 15:23:02 +0300
committerJohn W. Linville <linville@tuxdriver.com>2012-07-10 12:10:15 -0400
commit0344dcd3b50f68bb79473d00e46c5fd503c21039 (patch)
treea27949c9cb462986275f9dcff7128e83d684e4ee
parentwlcore: check ssid length against the correct element (diff)
downloadlinux-dev-0344dcd3b50f68bb79473d00e46c5fd503c21039.tar.xz
linux-dev-0344dcd3b50f68bb79473d00e46c5fd503c21039.zip
wlcore: determine AP extra rates correctly
Don't use the ht_mode module parameter for determining AP supported rates. We can rely on channel type, since HT40 won't be enabled if our HT cap doesn't support it. Enable MIMO only if there enough antennas, and rely on per-peer rate limitation to prevent IOPs. Signed-off-by: Arik Nemtsov <arik@wizery.com>
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index 23f100a3d271..b378b34c4a6a 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -1025,14 +1025,24 @@ static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl,
static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
struct wl12xx_vif *wlvif)
{
- if ((wlvif->channel_type == NL80211_CHAN_HT40MINUS ||
- wlvif->channel_type == NL80211_CHAN_HT40PLUS) &&
- !strcmp(ht_mode_param, "wide")) {
+ struct wl18xx_priv *priv = wl->priv;
+
+ if (wlvif->channel_type == NL80211_CHAN_HT40MINUS ||
+ wlvif->channel_type == NL80211_CHAN_HT40PLUS) {
wl1271_debug(DEBUG_ACX, "using wide channel rate mask");
+
+ /* sanity check - we don't support this */
+ if (WARN_ON(wlvif->band != IEEE80211_BAND_5GHZ))
+ return 0;
+
return CONF_TX_RATE_USE_WIDE_CHAN;
- } else if (!strcmp(ht_mode_param, "mimo")) {
+ } else if (priv->conf.phy.number_of_assembled_ant2_4 >= 2 &&
+ wlvif->band == IEEE80211_BAND_2GHZ) {
wl1271_debug(DEBUG_ACX, "using MIMO rate mask");
-
+ /*
+ * we don't care about HT channel here - if a peer doesn't
+ * support MIMO, we won't enable it in its rates
+ */
return CONF_TX_MIMO_RATES;
} else {
return 0;