net: wireless: bcmdhd: Fix scan crash in ibss mode
Dmitry Shmidt [Fri, 2 Dec 2011 21:24:01 +0000 (13:24 -0800)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 17ed972..16de422 100644 (file)
@@ -1461,7 +1461,7 @@ __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
                        (int)wl->status));
                return -EAGAIN;
        }
-       if (request->n_ssids > WL_SCAN_PARAMS_SSID_MAX) {
+       if (request && request->n_ssids > WL_SCAN_PARAMS_SSID_MAX) {
                WL_ERR(("n_ssids > WL_SCAN_PARAMS_SSID_MAX\n"));
                return -EOPNOTSUPP;
        }