diff options
| author | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-07-21 15:12:52 -0700 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-09-08 15:42:38 -0700 |
| commit | b95a8e54b3fe20eb3ffe2a9c7384cca217d22fdf (patch) | |
| tree | ed9b2a21d04156783bfaac9eea24e9904f99d305 | |
| parent | d7441fbc9edd13acb3767c7899c280ac997f08a5 (diff) | |
qcacld-3.0: vendor support to block scans
Add vendor command support to block all the
scans triggered from host.
Change-Id: I7860408f3ea3f0531e923e0613d555e2cdff5e5e
CRs-Fixed: 2080146
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 7 | ||||
| -rw-r--r-- | core/sme/src/common/sme_api.c | 1 | ||||
| -rw-r--r-- | uapi/linux/qca_vendor.h | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 66b2fd3595db..b349945ca5bb 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -4951,6 +4951,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = { [ANT_DIV_ACK_SNR_WEIGHT] = {.type = NLA_U32}, [QCA_WLAN_VENDOR_ATTR_CONFIG_LISTEN_INTERVAL] = {.type = NLA_U32 }, [QCA_WLAN_VENDOR_ATTR_CONFIG_LRO] = {.type = NLA_U8 }, + [QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_ENABLE] = {.type = NLA_U8 }, [QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT] = { .type = NLA_U8}, }; @@ -5156,6 +5157,12 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy, enable_flag); } + if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_ENABLE]) { + enable_flag = + nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_ENABLE]); + sme_set_scan_disable(hdd_ctx->hHal, !enable_flag); + } + if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER]) { qpower = nla_get_u8( tb[QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER]); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 24c5d5928278..cf93a8ace9e1 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -1284,6 +1284,7 @@ void sme_set_scan_disable(tHalHandle h_hal, int value) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(h_hal); + sme_info("scan disable %d", value); mac_ctx->lim.scan_disabled = value; } /** diff --git a/uapi/linux/qca_vendor.h b/uapi/linux/qca_vendor.h index b380aaece2b0..8d5744c765fb 100644 --- a/uapi/linux/qca_vendor.h +++ b/uapi/linux/qca_vendor.h @@ -3175,6 +3175,11 @@ enum qca_wlan_vendor_attr_config { * 1 - Enable , 0 - Disable. */ QCA_WLAN_VENDOR_ATTR_CONFIG_LRO = 50, + /* + * 8 bit unsigned value to globally enable/disable scan + * 1 - Enable, 0 - Disable. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_ENABLE = 51, /* 8-bit unsigned value to set the total beacon miss count */ QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT = 52, |
