summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>2017-03-15 15:16:39 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-17 12:00:14 -0700
commitecc2ecb2a93ca0348a51ca1b4cb826b0004fa8f5 (patch)
tree52291c325e1689f3f0a1caa7a48d6d8db0fd24ca
parent681211fce69385f0d3bc229770c0b31900c19bd3 (diff)
qcacld-3.0: Fix stripping of IEs in p2p scan
qcacld-2.0 to qcacld-3.0 propagation. When IE whitelisting is enabled, only probe requests from INFRA STA during scan should contain selective IEs, but in current code, probe requests of P2P scans are also containing selective IEs which is bug. To fix this, invoke IE whitelisting only for INFRA STA. Change-Id: Icd2984013b3f29714b1e852389110ef2257be94b CRs-Fixed: 2014387
-rw-r--r--core/hdd/src/wlan_hdd_scan.c4
-rw-r--r--core/wma/src/wma_scan_roam.c22
2 files changed, 15 insertions, 11 deletions
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index cb0b9631b988..40c68f32f28e 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -1971,7 +1971,9 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
wlan_hdd_update_scan_rand_attrs((void *)&scan_req, (void *)request,
WLAN_HDD_HOST_SCAN);
- if (!hdd_conn_is_connected(station_ctx) &&
+ if (pAdapter->device_mode == QDF_STA_MODE &&
+ !is_p2p_scan &&
+ !hdd_conn_is_connected(station_ctx) &&
(pHddCtx->config->probe_req_ie_whitelist)) {
if (pHddCtx->no_of_probe_req_ouis != 0) {
scan_req.voui = qdf_mem_malloc(
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 656f1dabd29f..1c91c4eb79e9 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -283,16 +283,6 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
qdf_mem_copy(cmd->mac_addr_mask, scan_req->mac_addr_mask,
QDF_MAC_ADDR_SIZE);
- /* probe req ie whitelisting attributes */
- cmd->ie_whitelist = scan_req->ie_whitelist;
- if (cmd->ie_whitelist) {
- for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++)
- cmd->probe_req_ie_bitmap[i] =
- scan_req->probe_req_ie_bitmap[i];
- cmd->num_vendor_oui = scan_req->num_vendor_oui;
- cmd->oui_field_len = scan_req->oui_field_len;
- cmd->voui = (uint8_t *)scan_req + scan_req->oui_field_offset;
- }
if (!scan_req->p2pScanType) {
WMA_LOGD("Normal Scan request");
@@ -304,6 +294,18 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
cmd->scan_ctrl_flags |= WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ;
cmd->scan_ctrl_flags |= WMI_SCAN_FILTER_PROBE_REQ;
+ /* probe req ie whitelisting attributes */
+ cmd->ie_whitelist = scan_req->ie_whitelist;
+ if (cmd->ie_whitelist) {
+ for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++)
+ cmd->probe_req_ie_bitmap[i] =
+ scan_req->probe_req_ie_bitmap[i];
+ cmd->num_vendor_oui = scan_req->num_vendor_oui;
+ cmd->oui_field_len = scan_req->oui_field_len;
+ cmd->voui = (uint8_t *)scan_req +
+ scan_req->oui_field_offset;
+ }
+
/*
* Decide burst_duration and dwell_time_active based on
* what type of devices are active.