diff options
| author | Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org> | 2017-03-02 13:00:26 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-06 04:34:59 -0800 |
| commit | 4bc9b9c41d707314d110e2d29ea74245072aba75 (patch) | |
| tree | 78436f0fb0b465786e981bdd1fc24dd29c024a37 | |
| parent | c53980236dbae98418aea7d71ffd026fa8b29a1c (diff) | |
qcacld-2.0: Fix stripping of IEs in p2p scan
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_cfg80211.c | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index cb56b132ffd6..eeeb1bdec2f4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -20689,7 +20689,9 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy, wlan_hdd_update_scan_rand_attrs((void *)&scanRequest, (void *)request, WLAN_HDD_HOST_SCAN); - if (!hdd_connIsConnected(station_ctx) && + if (pAdapter->device_mode == WLAN_HDD_INFRA_STATION && + !is_p2p_scan && + !hdd_connIsConnected(station_ctx) && (pHddCtx->cfg_ini->probe_req_ie_whitelist)) { if (pHddCtx->no_of_probe_req_ouis != 0) { scanRequest.voui = (struct vendor_oui *)vos_mem_malloc( diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 9ff7d5e753fa..06436b39a266 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -10789,18 +10789,6 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, WMI_CHAR_ARRAY_TO_MAC_ADDR(scan_req->mac_addr_mask, &cmd->mac_mask); } - if (scan_req->ie_whitelist) - cmd->scan_ctrl_flags |= - WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ; - - WMA_LOGI("scan_ctrl_flags = %x", cmd->scan_ctrl_flags); - - if (scan_req->ie_whitelist) { - for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++) - cmd->ie_bitmap[i] = scan_req->probe_req_ie_bitmap[i]; - } - - cmd->num_vendor_oui = scan_req->num_vendor_oui; if (!scan_req->p2pScanType) { WMA_LOGD("Normal Scan request"); @@ -10823,6 +10811,16 @@ VOS_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; + if (scan_req->ie_whitelist) { + cmd->scan_ctrl_flags |= + WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ; + for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++) + cmd->ie_bitmap[i] = + scan_req->probe_req_ie_bitmap[i]; + } + + cmd->num_vendor_oui = scan_req->num_vendor_oui; + /* * Decide burst_duration and dwell_time_active based on * what type of devices are active. |
