summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zhang <paulz@codeaurora.org>2017-09-12 17:32:34 +0800
committersnandini <snandini@codeaurora.org>2017-09-18 14:53:23 -0700
commitca00b2bb6f02861b0502b3f1b9a19498da24f867 (patch)
tree48ef3dca10030888864b599f569a8e018d79fc56
parentdd0fc12f2d26c309319577ed4fb181b11aadabca (diff)
qcacld-3.0: control mac spoofing scan by INI
The function wlan_hdd_cfg80211_scan_randomization_init will set mac spoofing scan feature ignore the ini configuration on gEnableMacAddrSpoof. CRs-fixed: 2108137 Change-Id: I8164aa15e83c6fbe1a4249efeca4c7f6474604f8
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 11874ce56602..aa02b4cbdf4c 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -11900,8 +11900,15 @@ int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
static void wlan_hdd_cfg80211_scan_randomization_init(struct wiphy *wiphy)
{
- wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
- wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR;
+ hdd_context_t *hdd_ctx;
+ hdd_ctx = wiphy_priv(wiphy);
+
+ if (false == hdd_ctx->config->enable_mac_spoofing) {
+ hdd_warn("MAC address spoofing is not enabled");
+ } else {
+ wiphy->features |= NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
+ wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR;
+ }
}
#else
static void wlan_hdd_cfg80211_scan_randomization_init(struct wiphy *wiphy)