aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_main.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-08-18 22:41:15 -0400
committerLuciano Coelho <luciano.coelho@nokia.com>2010-09-28 05:15:10 -0400
commit02fabb0eafde901ae51532ad15fdd4737b7d71e3 (patch)
treea9fc503d1618bb15dcefdf7df559bc4e1490f171 /drivers/net/wireless/wl12xx/wl1271_main.c
parent18c311b71899803de91f1ed41b9d87eb81017a91 (diff)
wl1271: Enable/disable 11a support based on INI configuration
Instead of hardcoding 11a support, enable/disable driver support based on the dual-mode-select parameter in the nvs-file general paramters. 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>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index bbd075a88f2d..11e112ff79d6 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -622,20 +622,6 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
622 return ret; 622 return ret;
623 } 623 }
624 624
625 /*
626 * FIXME: the LEGACY NVS image support (NVS's missing the 5GHz band
627 * configurations) can be removed when those NVS files stop floating
628 * around.
629 */
630 if (fw->size != sizeof(struct wl1271_nvs_file) &&
631 (fw->size != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
632 wl1271_11a_enabled())) {
633 wl1271_error("nvs size is not as expected: %zu != %zu",
634 fw->size, sizeof(struct wl1271_nvs_file));
635 ret = -EILSEQ;
636 goto out;
637 }
638
639 wl->nvs = kmemdup(fw->data, sizeof(struct wl1271_nvs_file), GFP_KERNEL); 625 wl->nvs = kmemdup(fw->data, sizeof(struct wl1271_nvs_file), GFP_KERNEL);
640 626
641 if (!wl->nvs) { 627 if (!wl->nvs) {
@@ -644,6 +630,8 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
644 goto out; 630 goto out;
645 } 631 }
646 632
633 wl->nvs_len = fw->size;
634
647out: 635out:
648 release_firmware(fw); 636 release_firmware(fw);
649 637
@@ -2414,7 +2402,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
2414 wl->hw->wiphy->max_scan_ssids = 1; 2402 wl->hw->wiphy->max_scan_ssids = 1;
2415 wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz; 2403 wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz;
2416 2404
2417 if (wl1271_11a_enabled()) 2405 if (wl->enable_11a)
2418 wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz; 2406 wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
2419 2407
2420 wl->hw->queues = 4; 2408 wl->hw->queues = 4;