diff options
| author | Kiran Kumar Lokere <klokere@codeaurora.org> | 2017-09-13 17:20:55 -0700 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-09-15 22:30:56 -0700 |
| commit | 39f83cd8c46503989bd020e1b429a154adabcd7e (patch) | |
| tree | a7f31a8c30f981941b7c8c080d53c953ed03c712 | |
| parent | 266239a6473d9128efd6d69a49bfadc177a8cb20 (diff) | |
qcacld-3.0: Enable scan mac randomization if INI cfg is set
Enable scan randomization only if gEnableMacAddrSpoof
configuration is enabled
Change-Id: I1b9accb7fe1049ee6c5dda2a4f5920c0908196ff
CRs-Fixed: 2104796
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 1161077a2f9d..11874ce56602 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12212,7 +12212,8 @@ int wlan_hdd_cfg80211_init(struct device *dev, hdd_add_channel_switch_support(&wiphy->flags); wiphy->max_num_csa_counters = WLAN_HDD_MAX_NUM_CSA_COUNTERS; - wlan_hdd_cfg80211_scan_randomization_init(wiphy); + if (pCfg->enable_mac_spoofing) + wlan_hdd_cfg80211_scan_randomization_init(wiphy); wlan_hdd_cfg80211_action_frame_randomization_init(wiphy); EXIT(); diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index fa15d29648ec..47ccb50db8dc 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -2316,8 +2316,9 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, sme_scan_flush_result(WLAN_HDD_GET_HAL_CTX(pAdapter)); } #endif - wlan_hdd_update_scan_rand_attrs((void *)&scan_req, (void *)request, - WLAN_HDD_HOST_SCAN); + if (cfg_param->enable_mac_spoofing) + wlan_hdd_update_scan_rand_attrs((void *)&scan_req, + (void *)request, WLAN_HDD_HOST_SCAN); status = wlan_hdd_populate_ie_whitelist(pAdapter, pHddCtx, &scan_req, is_p2p_scan); @@ -3423,8 +3424,11 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, hdd_debug("SessionId %d, enable %d, modePNO %d", pAdapter->sessionId, pPnoRequest->enable, pPnoRequest->modePNO); - wlan_hdd_update_scan_rand_attrs((void *)pPnoRequest, (void *)request, - WLAN_HDD_PNO_SCAN); + if (pHddCtx->config->enable_mac_spoofing) + wlan_hdd_update_scan_rand_attrs((void *)pPnoRequest, + (void *)request, WLAN_HDD_PNO_SCAN); + else + pPnoRequest->enable_pno_scan_randomization = false; if (!hdd_conn_is_connected(station_ctx)) wlan_hdd_fill_whitelist_ie_attrs(&pPnoRequest->ie_whitelist, |
