wl18xx: split siso40 HT cap between 2Ghz and 5Ghz
authorArik Nemtsov <arik@wizery.com>
Wed, 13 Jun 2012 16:09:26 +0000 (19:09 +0300)
committerLuciano Coelho <coelho@ti.com>
Thu, 21 Jun 2012 13:48:20 +0000 (16:48 +0300)
Remove the cap IEEE80211_HT_CAP_DSSSCCK40 from the 5Ghz variant of
the siso40 HT capabilities. It is meaningless in 5Ghz.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wl18xx/main.c

index 485aeae2f777035af79e530fae28060d536a2603..2c0f51b449c42a869e23e123b3bdc0bcb225e466 100644 (file)
@@ -1215,8 +1215,8 @@ static struct wlcore_ops wl18xx_ops = {
        .pre_pkt_send   = wl18xx_pre_pkt_send,
 };
 
-/* HT cap appropriate for wide channels */
-static struct ieee80211_sta_ht_cap wl18xx_siso40_ht_cap = {
+/* HT cap appropriate for wide channels in 2Ghz */
+static struct ieee80211_sta_ht_cap wl18xx_siso40_ht_cap_2ghz = {
        .cap = IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 |
               IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_DSSSCCK40,
        .ht_supported = true,
@@ -1229,6 +1229,20 @@ static struct ieee80211_sta_ht_cap wl18xx_siso40_ht_cap = {
                },
 };
 
+/* HT cap appropriate for wide channels in 5Ghz */
+static struct ieee80211_sta_ht_cap wl18xx_siso40_ht_cap_5ghz = {
+       .cap = IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40 |
+              IEEE80211_HT_CAP_SUP_WIDTH_20_40,
+       .ht_supported = true,
+       .ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K,
+       .ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
+       .mcs = {
+               .rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
+               .rx_highest = cpu_to_le16(150),
+               .tx_params = IEEE80211_HT_MCS_TX_DEFINED,
+               },
+};
+
 /* HT cap appropriate for SISO 20 */
 static struct ieee80211_sta_ht_cap wl18xx_siso20_ht_cap = {
        .cap = IEEE80211_HT_CAP_SGI_20,
@@ -1345,12 +1359,12 @@ static int __devinit wl18xx_probe(struct platform_device *pdev)
 
                /* 5Ghz is always wide */
                wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ,
-                                 &wl18xx_siso40_ht_cap);
+                                 &wl18xx_siso40_ht_cap_5ghz);
        } else if (!strcmp(ht_mode_param, "wide")) {
                wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ,
-                                 &wl18xx_siso40_ht_cap);
+                                 &wl18xx_siso40_ht_cap_2ghz);
                wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ,
-                                 &wl18xx_siso40_ht_cap);
+                                 &wl18xx_siso40_ht_cap_5ghz);
        } else if (!strcmp(ht_mode_param, "siso20")) {
                wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ,
                                  &wl18xx_siso20_ht_cap);