net: wireless: bcmdhd: Fix scan crash in ibss mode
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 2 Dec 2011 21:24:01 +0000 (13:24 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Mon, 19 Dec 2011 21:22:43 +0000 (13:22 -0800)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 9c2533028df52541401529bf609da8f96cd83064..7bf42055aaae4d05a3de87ffffc43952a6767afb 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;
        }