aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-08-23 23:28:03 -0400
committerLuciano Coelho <luciano.coelho@nokia.com>2010-09-28 05:15:11 -0400
commit11eb54298fa7197cb4187f8a3474ead0709f76ff (patch)
tree55434c508b40bd8c20eb2752193fe4a278013fa0 /drivers
parent65cddbf1353212f8ab00c6084e3063d85c419201 (diff)
wl1271: Enable 11a support always, prevent scanning for unsupporting chips
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_init.c15
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c4
2 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index 879bae095a63..5614a352528b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -53,6 +53,7 @@ static int wl1271_init_hwenc_config(struct wl1271 *wl)
53int wl1271_init_templates_config(struct wl1271 *wl) 53int wl1271_init_templates_config(struct wl1271 *wl)
54{ 54{
55 int ret, i; 55 int ret, i;
56 size_t size;
56 57
57 /* send empty templates for fw memory reservation */ 58 /* send empty templates for fw memory reservation */
58 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL, 59 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)
61 if (ret < 0) 62 if (ret < 0)
62 return ret; 63 return ret;
63 64
64 if (wl->enable_11a) { 65 size = sizeof(struct wl12xx_probe_req_template);
65 size_t size = sizeof(struct wl12xx_probe_req_template); 66 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
66 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5, 67 NULL, size, 0,
67 NULL, size, 0, 68 WL1271_RATE_AUTOMATIC);
68 WL1271_RATE_AUTOMATIC); 69 if (ret < 0)
69 if (ret < 0) 70 return ret;
70 return ret;
71 }
72 71
73 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL, 72 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL,
74 sizeof(struct wl12xx_null_data_template), 73 sizeof(struct wl12xx_null_data_template),
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 81f92a0100d9..f0c253213cd8 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -2403,9 +2403,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
2403 BIT(NL80211_IFTYPE_ADHOC); 2403 BIT(NL80211_IFTYPE_ADHOC);
2404 wl->hw->wiphy->max_scan_ssids = 1; 2404 wl->hw->wiphy->max_scan_ssids = 1;
2405 wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz; 2405 wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz;
2406 2406 wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
2407 if (wl->enable_11a)
2408 wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;
2409 2407
2410 wl->hw->queues = 4; 2408 wl->hw->queues = 4;
2411 wl->hw->max_rates = 1; 2409 wl->hw->max_rates = 1;