summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArunk Khandavalli <akhandav@codeaurora.org>2017-09-27 15:38:04 +0530
committersnandini <snandini@codeaurora.org>2017-09-28 05:52:10 -0700
commit85bed0e12caae90dca14c4584f9744d4d14923b7 (patch)
tree9412f99094fc618f3704bbbe46ab7d725f0254f7
parentfe53c3c3eb30615e4e846a4a470889beb118e423 (diff)
qcacld-3.0: Allow pno scan only for station mode
In some scenarios pno scan request is recieved from the framework when the adapter is not in station mode resulting in firmware crash. To mitigate the issue allow the pno scan only for station interface. CRs-Fixed: 2117227 Change-Id: I65527cd4e0b01f519e7c170d16c07fce7dc8f3df
-rw-r--r--core/hdd/src/wlan_hdd_scan.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 581610da8ad1..0393a5a2abdb 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -3198,6 +3198,12 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
if (0 != ret)
return ret;
+ if (pAdapter->device_mode != QDF_STA_MODE) {
+ hdd_info("Sched scan not supported for device mode:%d",
+ pAdapter->device_mode);
+ return -EINVAL;
+ }
+
if ((eConnectionState_Associated ==
WLAN_HDD_GET_STATION_CTX_PTR(pAdapter)->
conn_info.connState) &&
@@ -3519,6 +3525,12 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev)
goto exit;
}
+ if (adapter->device_mode != QDF_STA_MODE) {
+ hdd_info("Sched scan not supported for device mode:%d",
+ adapter->device_mode);
+ return -EINVAL;
+ }
+
hHal = WLAN_HDD_GET_HAL_CTX(adapter);
if (NULL == hHal) {
hdd_err(" HAL context is Null!!!");