aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_ioctl.c')
-rw-r--r--net/mac80211/ieee80211_ioctl.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index da3350d44da1..bbd9bc572a54 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -513,7 +513,6 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev,
513 struct iw_request_info *info, 513 struct iw_request_info *info,
514 union iwreq_data *wrqu, char *extra) 514 union iwreq_data *wrqu, char *extra)
515{ 515{
516 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
517 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 516 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
518 struct iw_scan_req *req = NULL; 517 struct iw_scan_req *req = NULL;
519 u8 *ssid = NULL; 518 u8 *ssid = NULL;
@@ -522,21 +521,9 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev,
522 if (!netif_running(dev)) 521 if (!netif_running(dev))
523 return -ENETDOWN; 522 return -ENETDOWN;
524 523
525 switch (sdata->type) { 524 if (sdata->type != IEEE80211_IF_TYPE_STA &&
526 case IEEE80211_IF_TYPE_STA: 525 sdata->type != IEEE80211_IF_TYPE_IBSS &&
527 case IEEE80211_IF_TYPE_IBSS: 526 sdata->type != IEEE80211_IF_TYPE_AP) {
528 if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
529 ssid = sdata->u.sta.ssid;
530 ssid_len = sdata->u.sta.ssid_len;
531 }
532 break;
533 case IEEE80211_IF_TYPE_AP:
534 if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
535 ssid = sdata->u.ap.ssid;
536 ssid_len = sdata->u.ap.ssid_len;
537 }
538 break;
539 default:
540 return -EOPNOTSUPP; 527 return -EOPNOTSUPP;
541 } 528 }
542 529