summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2016-08-26 18:18:47 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-21 17:01:21 -0700
commit7e11bc35152c24c587aa3230cc0306b8e2f6ee53 (patch)
treefc1dd9eaf4c712b18c32443bcf39ff892f123890
parentd8ff63215478d49592cac0341a157d5328c356e3 (diff)
qcacld-3.0: Flush p2p scan results before single channel p2p scan
qcacld-2.0 to qcacld-3.0 propagation Currently the p2p scan results are not flushed if the p2p scan is issued for a single channel scan which would result in a stale entry. To address this, flush the p2p scan results before issuing single channel p2p scan. Change-Id: Iaaee1b4b4147e68e99927ea90082bc6f288a2e72 CRS-Fixed: 855782
-rw-r--r--core/hdd/src/wlan_hdd_scan.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 93cbade33aef..d1700bbd984e 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -1309,6 +1309,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
hdd_adapter_t *con_sap_adapter;
uint16_t con_dfs_ch;
uint8_t num_chan = 0;
+ bool is_p2p_scan = false;
ENTER();
@@ -1522,12 +1523,17 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
* fails which is not desired
*/
- if (request->n_channels != WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN) {
+ if ((request->n_ssids == 1) &&
+ (request->ssids != NULL) &&
+ qdf_mem_cmp(&request->ssids[0], "DIRECT-", 7))
+ is_p2p_scan = true;
+
+ if (is_p2p_scan ||
+ (request->n_channels != WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN)) {
hdd_debug("Flushing P2P Results");
sme_scan_flush_p2p_result(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId);
+ pAdapter->sessionId);
}
-
if (request->ie_len) {
/* save this for future association (join requires this) */
memset(&pScanInfo->scanAddIE, 0, sizeof(pScanInfo->scanAddIE));