summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisweswara Tanuku <vtanuku@codeaurora.org>2017-02-08 14:02:09 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-19 22:32:42 -0800
commit9ceadc4195968b690b34fd2dfaf879c1daf900c2 (patch)
tree40c2940381fbff38003768375ef1bbe2d3e47cf0
parent07511b9ebecf6ed9cd6eb202c2a8a296807bcd6e (diff)
qcacld-2.0: Take care not to override the scan type unnecessarily
The change Ie4aedc891c90364d8e5d21191d89bd60894797f5 overrode the scan type for AP mode to ACTIVE without checking for the intended scenario of AP+AP. This leads to sending probe requests unintentionally even for standalone AP case, leading to active scan on DFS channels. Fix by checking active sessions of AP to address the original issue Thus the standalone scenario shall not be affected. Change-Id: I06dc96d1dc30fc30c33a80a295144b3404e8af5a CRs-Fixed: 2003916
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 0c362cfb800e..34b3e17e607f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -20397,8 +20397,7 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
/* set the scan type to active */
scanRequest.scanType = eSIR_ACTIVE_SCAN;
}
- else if (WLAN_HDD_P2P_GO == pAdapter->device_mode ||
- WLAN_HDD_SOFTAP == pAdapter->device_mode)
+ else if (WLAN_HDD_P2P_GO == pAdapter->device_mode)
{
/* set the scan type to active */
scanRequest.scanType = eSIR_ACTIVE_SCAN;
@@ -20409,8 +20408,19 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
*Set the scan type to passive if there is no ssid list provided else
*set default type configured in the driver.
*/
- if (!request->ssids)
- scanRequest.scanType = eSIR_PASSIVE_SCAN;
+ if (!request->ssids) {
+ /* In case of AP+AP there is a reason to fix scanType to
+ * ACTIVE, historically this is to increase probablity of
+ * successfull OBSS scan
+ */
+ if((WLAN_HDD_SOFTAP == pAdapter->device_mode) && \
+ (pHddCtx->no_of_active_sessions[VOS_STA_SAP_MODE] > 1)) {
+ scanRequest.scanType = eSIR_ACTIVE_SCAN;
+ }
+ else {
+ scanRequest.scanType = eSIR_PASSIVE_SCAN;
+ }
+ }
else
scanRequest.scanType = pHddCtx->ioctl_scan_mode;
}