diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-06-18 18:21:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:42 -0400 |
commit | 51cd4aabd082144881644c308647ca501690b68c (patch) | |
tree | b9db3a760de882bacf46001fe19eeba2c098403c /net/wireless | |
parent | 3daf097594d398b2ddd2dca6caeaa92cb9148e23 (diff) |
cfg80211: allow drivers that can't scan for specific ssids
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 3 | ||||
-rw-r--r-- | net/wireless/wext-compat.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index d5850292b3df..a98670ca98b8 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -346,9 +346,6 @@ int wiphy_register(struct wiphy *wiphy) | |||
346 | int i; | 346 | int i; |
347 | u16 ifmodes = wiphy->interface_modes; | 347 | u16 ifmodes = wiphy->interface_modes; |
348 | 348 | ||
349 | if (WARN_ON(wiphy->max_scan_ssids < 1)) | ||
350 | return -EINVAL; | ||
351 | |||
352 | /* sanity check ifmodes */ | 349 | /* sanity check ifmodes */ |
353 | WARN_ON(!ifmodes); | 350 | WARN_ON(!ifmodes); |
354 | ifmodes &= ((1 << __NL80211_IFTYPE_AFTER_LAST) - 1) & ~1; | 351 | ifmodes &= ((1 << __NL80211_IFTYPE_AFTER_LAST) - 1) & ~1; |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 7dbe6c62e5c8..bb97061219ca 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -247,7 +247,8 @@ int cfg80211_wext_giwrange(struct net_device *dev, | |||
247 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); | 247 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); |
248 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); | 248 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); |
249 | 249 | ||
250 | range->scan_capa |= IW_SCAN_CAPA_ESSID; | 250 | if (wdev->wiphy->max_scan_ssids > 0) |
251 | range->scan_capa |= IW_SCAN_CAPA_ESSID; | ||
251 | 252 | ||
252 | return 0; | 253 | return 0; |
253 | } | 254 | } |