summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorGuy Eilam <guy@wizery.com>2010-12-09 14:54:59 (GMT)
committerLuciano Coelho <luciano.coelho@nokia.com>2010-12-15 13:41:04 (GMT)
commitea559b460509b241cc1a3f36eebe0b2b634b3cf2 (patch)
tree345f4cc80cd3a25a6ae261629e4fcc0c4e19925d /drivers/net/wireless/wl12xx/main.c
parentc5312772156bb5f9b2e95e4c91526d578426a069 (diff)
downloadlinux-fsl-qoriq-ea559b460509b241cc1a3f36eebe0b2b634b3cf2.tar.xz
wl1271: fixed problem with WPS IEs in probe requests
Inclusion of a WPS IE in probe requests caused a problem in the driver due to the maximum size of the probe request template and the max_scan_ie_len values at initialization. Increased the size of probe request template to the maximum size allowed by the firmware. Struct wl12xx_probe_req_template, which was only used for calculating the max size of the probe request template, is no longer used and needed. max_scan_ie_len is used for validating the size of additional IEs in scan requests. Initialized the max_scan_ie_len field to the maximum size of the probe request template minus the ieee80211 header size. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index f7d7cad..0865585 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2666,6 +2666,13 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC);
wl->hw->wiphy->max_scan_ssids = 1;
+ /*
+ * Maximum length of elements in scanning probe request templates
+ * should be the maximum length possible for a template, without
+ * the IEEE80211 header of the template
+ */
+ wl->hw->wiphy->max_scan_ie_len = WL1271_CMD_TEMPL_MAX_SIZE -
+ sizeof(struct ieee80211_header);
wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1271_band_2ghz;
wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wl1271_band_5ghz;