cfg80211: allow drivers that can't scan for specific ssids
authorDavid Kilroy <kilroyd@googlemail.com>
Thu, 18 Jun 2009 22:21:15 +0000 (23:21 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 19:01:42 +0000 (15:01 -0400)
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/core.c
net/wireless/wext-compat.c

index d5850292b3df1785053cf51cd07073441eb482a6..a98670ca98b84285c974160557c1eebc52062268 100644 (file)
@@ -346,9 +346,6 @@ int wiphy_register(struct wiphy *wiphy)
        int i;
        u16 ifmodes = wiphy->interface_modes;
 
-       if (WARN_ON(wiphy->max_scan_ssids < 1))
-               return -EINVAL;
-
        /* sanity check ifmodes */
        WARN_ON(!ifmodes);
        ifmodes &= ((1 << __NL80211_IFTYPE_AFTER_LAST) - 1) & ~1;
index 7dbe6c62e5c8b280c1dc143593b4919a9e2ba5b6..bb97061219ca43d2d2ee3a3bd182b5842f0e92e2 100644 (file)
@@ -247,7 +247,8 @@ int cfg80211_wext_giwrange(struct net_device *dev,
        IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
        IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN);
 
-       range->scan_capa |= IW_SCAN_CAPA_ESSID;
+       if (wdev->wiphy->max_scan_ssids > 0)
+               range->scan_capa |= IW_SCAN_CAPA_ESSID;
 
        return 0;
 }