From f0f81ad646fedabdec1561a84596f3776cc2786f Mon Sep 17 00:00:00 2001 From: Kabilan Kannan Date: Thu, 14 Dec 2017 18:04:10 -0800 Subject: [PATCH] qcacld-3.0: Reject scan command, when firmware is down Scan command is entertained, when the firmware is down, and it causes crash in the system. Reject the scan command, when firmware is down. Change-Id: Ib3501e14846dea9ea99f6fa13695108d4ae58bf0 CRs-Fixed: 2159449 --- core/hdd/src/wlan_hdd_scan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index bb2575ee334c..0896078e44b3 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -461,6 +461,11 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, ENTER(); + if (cds_is_fw_down()) { + hdd_err("firmware is down, scan cmd cannot be processed"); + return -EINVAL; + } + if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { hdd_err("Command not allowed in FTM mode"); return -EINVAL;