From 3f034c2fded217af8599feb8b06d2387ab93a035 Mon Sep 17 00:00:00 2001 From: Deepthi Gowri Date: Tue, 20 Oct 2015 13:02:23 +0530 Subject: qcacld-2.0: Flush p2p scan results before single channel p2p scan prima to qcacld-2.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 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index fa76b73e5d47..62abf9330e8d 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -15536,6 +15536,7 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy, v_U8_t* pP2pIe = NULL; hdd_adapter_t *con_sap_adapter; uint16_t con_dfs_ch; + bool is_p2p_scan = false; ENTER(); @@ -15767,7 +15768,13 @@ 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) + && vos_mem_compare(&request->ssids[0], "DIRECT-", 7)) + is_p2p_scan = true; + + if (is_p2p_scan || + (request->n_channels != WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN) ) { hddLog(VOS_TRACE_LEVEL_DEBUG, "Flushing P2P Results"); sme_ScanFlushP2PResult( WLAN_HDD_GET_HAL_CTX(pAdapter), -- cgit v1.2.3