diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 12 |
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)); |
