summaryrefslogtreecommitdiff
path: root/net/mac80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-09 19:31:03 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-09 19:31:03 +0400
commit660ca5317d229ca27dec6a3159423bc0c5291c2d (patch)
tree518372de3101f687f3ba92ead2fe65d2d97f8982 /net/mac80211/ieee80211_ioctl.c
parente7bc15a9ad07269c48732e9a9874e5938b4700ee (diff)
parentf34d1955dff5a5769d24614d137003f0316406f3 (diff)
downloadlinux-660ca5317d229ca27dec6a3159423bc0c5291c2d.tar.xz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [TCP]: H-TCP maxRTT estimation at startup [NETFILTER]: nf_nat: add symbolic dependency on IPv4 conntrack [NETFILTER]: ctnetlink: return EEXIST instead of EINVAL for existing nat'ed conntracks [NETFILTER]: ipt_recent: avoid a possible NULL pointer deref in recent_seq_open() [NET] net/core/utils: fix sparse warning [NetLabel]: add missing rcu_dereference() calls in the LSM domain mapping hash table [PATCH] mac80211: don't allow scanning in monitor mode [PATCH] mac80211: Fix sparse error for sta_last_seq_ctrl_read [PATCH] mac80211: use do { } while (0) for multi-line macros [PATCH] mac80211: missing dev_put in ieee80211_master_start_xmit
Diffstat (limited to 'net/mac80211/ieee80211_ioctl.c')
-rw-r--r--net/mac80211/ieee80211_ioctl.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index d0e1ab5589db..e7904db55325 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -697,17 +697,24 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev,
if (!netif_running(dev))
return -ENETDOWN;
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
- if (sdata->type == IEEE80211_IF_TYPE_STA ||
- sdata->type == IEEE80211_IF_TYPE_IBSS) {
+ switch (sdata->type) {
+ case IEEE80211_IF_TYPE_STA:
+ case IEEE80211_IF_TYPE_IBSS:
+ if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
ssid = sdata->u.sta.ssid;
ssid_len = sdata->u.sta.ssid_len;
- } else if (sdata->type == IEEE80211_IF_TYPE_AP) {
+ }
+ break;
+ case IEEE80211_IF_TYPE_AP:
+ if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
ssid = sdata->u.ap.ssid;
ssid_len = sdata->u.ap.ssid_len;
- } else
- return -EINVAL;
+ }
+ break;
+ default:
+ return -EOPNOTSUPP;
}
+
return ieee80211_sta_req_scan(dev, ssid, ssid_len);
}