diff options
author | Luciano Coelho <coelho@ti.com> | 2012-05-10 05:14:13 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-05 08:58:32 -0400 |
commit | 174a73034cdbe2bb2784c9963e75d196364c348e (patch) | |
tree | 09d6b8f28c239c869183a28c3684515ddc751fa5 /drivers/net/wireless/ti/wl18xx/main.c | |
parent | 06bba80e711b9b66e9316d4d228b55f768c27749 (diff) |
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: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/main.c')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 8262a4f7a10f..6a81edf702eb 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #define WL18XX_RX_CHECKSUM_MASK 0x40 | 43 | #define WL18XX_RX_CHECKSUM_MASK 0x40 |
44 | 44 | ||
45 | static char *ht_mode_param; | 45 | static char *ht_mode_param = "wide"; |
46 | static char *board_type_param = "hdk"; | 46 | static char *board_type_param = "hdk"; |
47 | static bool dc2dc_param = false; | 47 | static bool dc2dc_param = false; |
48 | static int n_antennas_2_param = 1; | 48 | static int n_antennas_2_param = 1; |
@@ -941,11 +941,12 @@ static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl, | |||
941 | static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, | 941 | static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, |
942 | struct wl12xx_vif *wlvif) | 942 | struct wl12xx_vif *wlvif) |
943 | { | 943 | { |
944 | if (wlvif->channel_type == NL80211_CHAN_HT40MINUS || | 944 | if ((wlvif->channel_type == NL80211_CHAN_HT40MINUS || |
945 | wlvif->channel_type == NL80211_CHAN_HT40PLUS) { | 945 | wlvif->channel_type == NL80211_CHAN_HT40PLUS) && |
946 | !strcmp(ht_mode_param, "wide")) { | ||
946 | wl1271_debug(DEBUG_ACX, "using wide channel rate mask"); | 947 | wl1271_debug(DEBUG_ACX, "using wide channel rate mask"); |
947 | return CONF_TX_RATE_USE_WIDE_CHAN; | 948 | return CONF_TX_RATE_USE_WIDE_CHAN; |
948 | } else { | 949 | } else if (!strcmp(ht_mode_param, "mimo")) { |
949 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); | 950 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); |
950 | 951 | ||
951 | /* | 952 | /* |
@@ -959,6 +960,8 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, | |||
959 | return CONF_TX_MIMO_RATES & ~CONF_HW_BIT_RATE_MCS_13; | 960 | return CONF_TX_MIMO_RATES & ~CONF_HW_BIT_RATE_MCS_13; |
960 | 961 | ||
961 | return CONF_TX_MIMO_RATES; | 962 | return CONF_TX_MIMO_RATES; |
963 | } else { | ||
964 | return 0; | ||
962 | } | 965 | } |
963 | } | 966 | } |
964 | 967 | ||
@@ -1106,7 +1109,7 @@ int __devinit wl18xx_probe(struct platform_device *pdev) | |||
1106 | wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics); | 1109 | wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics); |
1107 | wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); | 1110 | wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); |
1108 | memcpy(&wl->ht_cap, &wl18xx_ht_cap, sizeof(wl18xx_ht_cap)); | 1111 | memcpy(&wl->ht_cap, &wl18xx_ht_cap, sizeof(wl18xx_ht_cap)); |
1109 | if (ht_mode_param && !strcmp(ht_mode_param, "mimo")) | 1112 | if (!strcmp(ht_mode_param, "mimo")) |
1110 | memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap, | 1113 | memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap, |
1111 | sizeof(wl18xx_mimo_ht_cap)); | 1114 | sizeof(wl18xx_mimo_ht_cap)); |
1112 | 1115 | ||