Commit 174a7303 authored by Luciano Coelho's avatar Luciano Coelho

wl18xx: don't use MIMO when ht_mode is set to wide

If the wl18xx module is loaded with ht_mode=wide (the default), we
shouldn't use MIMO rates when the channel type is not HT40.  Fix this
by checking the ht_mode before deciding which rates to used.
Additionally, set the ht_mode parameter explicitly to "wide" as the
default.
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
parent 06bba80e
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define WL18XX_RX_CHECKSUM_MASK 0x40 #define WL18XX_RX_CHECKSUM_MASK 0x40
static char *ht_mode_param; static char *ht_mode_param = "wide";
static char *board_type_param = "hdk"; static char *board_type_param = "hdk";
static bool dc2dc_param = false; static bool dc2dc_param = false;
static int n_antennas_2_param = 1; static int n_antennas_2_param = 1;
...@@ -941,11 +941,12 @@ static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl, ...@@ -941,11 +941,12 @@ static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl,
static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
struct wl12xx_vif *wlvif) struct wl12xx_vif *wlvif)
{ {
if (wlvif->channel_type == NL80211_CHAN_HT40MINUS || if ((wlvif->channel_type == NL80211_CHAN_HT40MINUS ||
wlvif->channel_type == NL80211_CHAN_HT40PLUS) { wlvif->channel_type == NL80211_CHAN_HT40PLUS) &&
!strcmp(ht_mode_param, "wide")) {
wl1271_debug(DEBUG_ACX, "using wide channel rate mask"); wl1271_debug(DEBUG_ACX, "using wide channel rate mask");
return CONF_TX_RATE_USE_WIDE_CHAN; return CONF_TX_RATE_USE_WIDE_CHAN;
} else { } else if (!strcmp(ht_mode_param, "mimo")) {
wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); wl1271_debug(DEBUG_ACX, "using MIMO rate mask");
/* /*
...@@ -959,6 +960,8 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, ...@@ -959,6 +960,8 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
return CONF_TX_MIMO_RATES & ~CONF_HW_BIT_RATE_MCS_13; return CONF_TX_MIMO_RATES & ~CONF_HW_BIT_RATE_MCS_13;
return CONF_TX_MIMO_RATES; return CONF_TX_MIMO_RATES;
} else {
return 0;
} }
} }
...@@ -1106,7 +1109,7 @@ int __devinit wl18xx_probe(struct platform_device *pdev) ...@@ -1106,7 +1109,7 @@ int __devinit wl18xx_probe(struct platform_device *pdev)
wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics); wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics);
wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv);
memcpy(&wl->ht_cap, &wl18xx_ht_cap, sizeof(wl18xx_ht_cap)); memcpy(&wl->ht_cap, &wl18xx_ht_cap, sizeof(wl18xx_ht_cap));
if (ht_mode_param && !strcmp(ht_mode_param, "mimo")) if (!strcmp(ht_mode_param, "mimo"))
memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap, memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap,
sizeof(wl18xx_mimo_ht_cap)); sizeof(wl18xx_mimo_ht_cap));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment