wlan: Set scan_type to P2P_DISCOVERY only for social channel scan.
Scan type should be set to P2P_DISCOVERY only if it is a p2p search on
social channel. Otherwise it should not be set. Fixes: Scanning invalid
channels during p2p scan.
Change-Id: I011568eac0cdc17a707dc342a38ea3b861fb9489
CR-Fixed: 412053
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 97e1acc..6d1a520 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -3870,6 +3870,8 @@
pScanInfo->flushP2pScanResults = 1;
sme_ScanFlushP2PResult( WLAN_HDD_GET_HAL_CTX(pAdapter),
sessionId );
+ /* set requestType to P2P Discovery */
+ scanRequest.requestType = eCSR_SCAN_P2P_DISCOVERY;
}
/*
@@ -3885,8 +3887,6 @@
scanRequest.skipDfsChnlInP2pSearch = 0;
}
- /* set requestType to P2P Discovery */
- scanRequest.requestType = eCSR_SCAN_P2P_DISCOVERY;
}
}
#endif