From d5e1d1c12f372ce63c1aba749ce69382a964e8f7 Mon Sep 17 00:00:00 2001 From: Ajit Vaishya Date: Mon, 21 Sep 2020 03:27:30 +0530 Subject: [PATCH] qcacld-3.0: Advertise Adaptive 11R supported feature to user space Currently when Adaptive 11R feature is disable via ini then user space parse Vendor Specific IE and trigger connection in FT-PSK/EAP based on STA configured key mgmt, but due to feature disabled via ini it failed to connect AP and trigger Assoc reject to user space. To overcome this advertise Adaptive 11R supported feature bit to user space and based on this feature bit user space parse, trigger connection in FT-PSK/EAP other wise fallback to PSK/EAP. Change-Id: I5d67a0cb77c3f39328467a6313a7a795e6a7a4d8 CRs-Fixed: 2785878 --- .../mlme/dispatcher/inc/wlan_mlme_ucfg_api.h | 18 ++++++++++++++++++ .../mlme/dispatcher/src/wlan_mlme_ucfg_api.c | 16 ++++++++++++++++ core/hdd/src/wlan_hdd_cfg80211.c | 10 ++++++++++ 3 files changed, 44 insertions(+) diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 07d668e71b33..06bb14cc8745 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -1195,6 +1195,16 @@ ucfg_mlme_is_roam_scan_offload_enabled(struct wlan_objmgr_psoc *psoc, QDF_STATUS ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc, bool val); +/** + * ucfg_mlme_get_adaptive11r_enabled() - get adaptive 11R enabled status + * @psoc: pointer to psoc object + * @value: pointer to the value which will be filled for the caller + * + * Return: QDF Status + */ +QDF_STATUS +ucfg_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc, + bool *value); #else static inline QDF_STATUS ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc, @@ -1202,6 +1212,14 @@ ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc, { return QDF_STATUS_SUCCESS; } + +static inline QDF_STATUS +ucfg_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + *value = false; + return QDF_STATUS_SUCCESS; +} #endif /** diff --git a/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c b/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c index 33e39cb7f135..5ac49133d69f 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c @@ -868,6 +868,22 @@ ucfg_mlme_set_tgt_adaptive_11r_cap(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } + +QDF_STATUS +ucfg_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc, bool *val) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) { + *val = cfg_default(CFG_ADAPTIVE_11R); + return QDF_STATUS_E_INVAL; + } + + *val = mlme_obj->cfg.lfr.enable_adaptive_11r; + + return QDF_STATUS_SUCCESS; +} #endif QDF_STATUS diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 2fc8330bfb6d..cf7bad4b6289 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -4001,6 +4001,16 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy, wlan_hdd_cfg80211_set_feature(feature_flags, QCA_WLAN_VENDOR_FEATURE_OCE_STA_CFON); + value = false; + status = ucfg_mlme_get_adaptive11r_enabled(hdd_ctx->psoc, &value); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("could not get FT-Adaptive 11R info"); + if (value) { + hdd_debug("FT-Adaptive 11R is Enabled"); + wlan_hdd_cfg80211_set_feature(feature_flags, + QCA_WLAN_VENDOR_FEATURE_ADAPTIVE_11R); + } + ucfg_mlme_get_twt_requestor(hdd_ctx->psoc, &twt_req); ucfg_mlme_get_twt_responder(hdd_ctx->psoc, &twt_res);