summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-10 23:25:41 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 21:45:26 +0300
commit60b22511921fe79b2a94a27c09cadfd32fcef5d5 (patch)
tree9e77ff55f56493f4bc80b43752ba99c9c5403f0c /net/mac80211
parente4e5e2b0b83c816e581ca4671569306bcba77667 (diff)
downloadlinux-60b22511921fe79b2a94a27c09cadfd32fcef5d5.tar.xz
mac80211: reject extra IEs for probe request when hw_scan
We cannot currently hand off extra IEs to hw_scan, so reject configuring extra IEs for probe request frames when hw_scan is set. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a1a1344c5c4b..42d692fd9bec 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1176,11 +1176,16 @@ static int ieee80211_set_channel(struct wiphy *wiphy,
return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
}
-static int set_mgmt_extra_ie_sta(struct ieee80211_if_sta *ifsta, u8 subtype,
- u8 *ies, size_t ies_len)
+static int set_mgmt_extra_ie_sta(struct ieee80211_sub_if_data *sdata,
+ u8 subtype, u8 *ies, size_t ies_len)
{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+
switch (subtype) {
case IEEE80211_STYPE_PROBE_REQ >> 4:
+ if (local->ops->hw_scan)
+ break;
kfree(ifsta->ie_probereq);
ifsta->ie_probereq = ies;
ifsta->ie_probereq_len = ies_len;
@@ -1244,7 +1249,7 @@ static int ieee80211_set_mgmt_extra_ie(struct wiphy *wiphy,
switch (sdata->vif.type) {
case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_ADHOC:
- ret = set_mgmt_extra_ie_sta(&sdata->u.sta, params->subtype,
+ ret = set_mgmt_extra_ie_sta(sdata, params->subtype,
ies, ies_len);
break;
default: