]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wl1271: Enable 11a support always, prevent scanning for unsupporting chips
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Tue, 24 Aug 2010 03:28:03 +0000 (06:28 +0300)
committerLuciano Coelho <luciano.coelho@nokia.com>
Tue, 28 Sep 2010 09:15:11 +0000 (12:15 +0300)
This patch always enables 11a band towards the mac80211, but prevents scanning
(and hence the usage of) 11a band channels if the chipset does not support it.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
drivers/net/wireless/wl12xx/wl1271_init.c
drivers/net/wireless/wl12xx/wl1271_main.c

index 879bae095a6370eaf0ca8a9a9901cf56e37edf66..5614a352528b2375b35b783ca4828bbc0a4829ed 100644 (file)
@@ -53,6 +53,7 @@ static int wl1271_init_hwenc_config(struct wl1271 *wl)
 int wl1271_init_templates_config(struct wl1271 *wl)
 {
        int ret, i;
+       size_t size;
 
        /* send empty templates for fw memory reservation */
        ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL,
@@ -61,14 +62,12 @@ int wl1271_init_templates_config(struct wl1271 *wl)
        if (ret < 0)
                return ret;
 
-       if (wl->enable_11a) {
-               size_t size = sizeof(struct wl12xx_probe_req_template);
-               ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
-                                             NULL, size, 0,
-                                             WL1271_RATE_AUTOMATIC);
-               if (ret < 0)
-                       return ret;
-       }
+       size = sizeof(struct wl12xx_probe_req_template);
+       ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
+                                     NULL, size, 0,
+                                     WL1271_RATE_AUTOMATIC);
+       if (ret < 0)
+               return ret;
 
        ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL,
                                      sizeof(struct wl12xx_null_data_template),
index 81f92a0100d97a18d710f5acb66d3626e33296ab..f0c253213cd81c79c336fff6c973444907287685 100644 (file)
@@ -2403,9 +2403,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
                BIT(NL80211_IFTYPE_ADHOC);
        wl->hw->wiphy->max_scan_ssids = 1;
        wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz;
-
-       if (wl->enable_11a)
-               wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
+       wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
 
        wl->hw->queues = 4;
        wl->hw->max_rates = 1;