From 995a53bccab4decaf024d295b07a4f2999a47fd0 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Fri, 7 Apr 2017 12:12:47 +0530 Subject: [PATCH] qcacld-3.0: If Hw is DBS capable dont allow scan in IBSS dev For IBSS, firmware does not add self peer for each mac and thus if HW is capable of DBS the firmware crash when scan req is received on IBSS vdev. Also IBSS vdev does not need to scan to establish IBSS connection. To fix the crash, block the scan on IBSS vdev when DBS is enabled. Change-Id: I41eda671d263a72ccb2b0c27212dd1d983043bca CRs-Fixed: 2029880 --- core/hdd/src/wlan_hdd_scan.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 9d3f1234fa..6e4951bf36 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -1537,6 +1537,19 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); + /* + * IBSS vdev does not have peers on other macs, + * so it does not support scan on other band, + * and IBSS vdev does not need to scan to establish + * IBSS connection. If IBSS vdev need to support scan, + * Firmware need to make the change to add self peer + * per mac for IBSS vdev. + */ + if (policy_mgr_is_hw_dbs_capable(pHddCtx->hdd_psoc) && + (QDF_IBSS_MODE == pAdapter->device_mode)) { + hdd_err("Scan not supported for IBSS in if HW support DBS"); + return -EINVAL; + } cfg_param = pHddCtx->config; pScanInfo = &pAdapter->scan_info;