From: Dmitry Shmidt Date: Fri, 2 Dec 2011 21:24:01 +0000 (-0800) Subject: net: wireless: bcmdhd: Fix scan crash in ibss mode X-Git-Tag: firefly_0821_release~7613^2~207 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4f36cb88d6e7e5afcdef42f6d2d70cbffbd2c541;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Fix scan crash in ibss mode Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index 9c2533028df5..7bf42055aaae 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -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; }