From 3abd7300a53e619a99e502afce73a58fddb9878d Mon Sep 17 00:00:00 2001 From: Manjeet Singh Date: Wed, 11 Jan 2017 16:07:42 +0530 Subject: [PATCH] qcacld-3.0: Accept gscan request only if netdev is up The vendor command QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_GET_VALID_CHANNELS coming in netdev down state resulting in crash. Add WIPHY_VENDOR_CMD_NEED_RUNNING flag to reject the vendor command QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_GET_VALID_CHANNELS if netdev is down. CRs-Fixed: 1109145 Change-Id: I007341a51ccdd1b5cf5b6e2319c8b71d4f26f9ce --- core/hdd/src/wlan_hdd_cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 00c6c627ce73..ce2505fe1788 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -10518,7 +10518,8 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = { { .info.vendor_id = QCA_NL80211_VENDOR_ID, .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_GET_VALID_CHANNELS, - .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV, + .flags = WIPHY_VENDOR_CMD_NEED_WDEV | + WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING, .doit = wlan_hdd_cfg80211_extscan_get_valid_channels }, {