diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2017-01-06 12:42:16 -0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-15 23:36:09 -0700 |
| commit | 80c6f32714e9bfec8a4f2a464473f82dc2081109 (patch) | |
| tree | dadfda5fd11b60b94a2340fb60159baa6a825f26 | |
| parent | 4f53db0759e649af78b10056db4cc26d4aa0b496 (diff) | |
qcacld-3.0: Enable feature bits in get_supported_features()
This is a qcacld-2.0 to qcacld-3.0 propagation.
Enable feature bits WIFI_FEATURE_CONTROL_ROAMING,
WIFI_FEATURE_IE_WHITELIST and WIFI_FEATURE_SCAN_RAND.
Change-Id: Ia0f136e038e7da040faae04eaa11bcf56bb72443
CRs-Fixed: 1102187
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 46 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 9 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.h | 3 |
3 files changed, 58 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index b4e1fcbf6c9a..47a7b3444729 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1849,6 +1849,52 @@ bool hdd_is_5g_supported(hdd_context_t *pHddCtx); int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter); +#ifdef FEATURE_WLAN_LFR +static inline bool hdd_driver_roaming_supported(hdd_context_t *hdd_ctx) +{ + return hdd_ctx->cfg_ini->isFastRoamIniFeatureEnabled; +} +#else +static inline bool hdd_driver_roaming_supported(hdd_context_t *hdd_ctx) +{ + return false; +} +#endif + +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD +static inline bool hdd_firmware_roaming_supported(hdd_context_t *hdd_ctx) +{ + return hdd_ctx->cfg_ini->isRoamOffloadScanEnabled; +} +#else +static inline bool hdd_firmware_roaming_supported(hdd_context_t *hdd_ctx) +{ + return false; +} +#endif + +static inline bool hdd_roaming_supported(hdd_context_t *hdd_ctx) +{ + bool val; + + val = hdd_driver_roaming_supported(hdd_ctx) || + hdd_firmware_roaming_supported(hdd_ctx); + + return val; +} + +#ifdef CFG80211_SCAN_RANDOM_MAC_ADDR +static inline bool hdd_scan_random_mac_addr_supported(void) +{ + return true; +} +#else +static inline bool hdd_scan_random_mac_addr_supported(void) +{ + return false; +} +#endif + void hdd_get_fw_version(hdd_context_t *hdd_ctx, uint32_t *major_spid, uint32_t *minor_spid, uint32_t *siid, uint32_t *crmid); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 64f99d868aed..288e082ca000 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1902,6 +1902,15 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy, if (hdd_link_layer_stats_supported()) fset |= WIFI_FEATURE_LINK_LAYER_STATS; + if (hdd_roaming_supported(pHddCtx)) + fset |= WIFI_FEATURE_CONTROL_ROAMING; + + if (pHddCtx->config->probe_req_ie_whitelist) + fset |= WIFI_FEATURE_IE_WHITELIST; + + if (hdd_scan_random_mac_addr_supported()) + fset |= WIFI_FEATURE_SCAN_RAND; + skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(fset) + NLMSG_HDRLEN); if (!skb) { diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index 172fe7166f9d..48f6105e68a6 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -2335,6 +2335,9 @@ enum qca_wlan_vendor_attr_sap_conditional_chan_switch { #define WIFI_FEATURE_MKEEP_ALIVE 0x100000 /* WiFi mkeep_alive */ #define WIFI_FEATURE_CONFIG_NDO 0x200000 /* ND offload configure */ #define WIFI_FEATURE_TX_TRANSMIT_POWER 0x400000 /* Tx transmit power levels */ +#define WIFI_FEATURE_CONTROL_ROAMING 0x800000 /* Enable/Disable roaming */ +#define WIFI_FEATURE_IE_WHITELIST 0x1000000 /* Support Probe IE white listing */ +#define WIFI_FEATURE_SCAN_RAND 0x2000000 /* Support MAC & Probe Sequence Number randomization */ /** * enum wifi_logger_supported_features - values for supported logger features |
