qcacld-3.0: Add support to get feature set info
Based on the new requirement, add support to get requested feature set info from different feature components. Change-Id: I1bfc097c8ae8c4ab678d4dc07b7932cf3272d851 CRs-Fixed: 3262868
This commit is contained in:

committed by
Madan Koyyalamudi

parent
7034ffe097
commit
2490a83a25
@@ -4511,4 +4511,13 @@ bool policy_mgr_is_ap_ap_mcc_allow(struct wlan_objmgr_psoc *psoc,
|
||||
bool policy_mgr_any_other_vdev_on_same_mac_as_freq(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t freq, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_sbs_cfg() - Get SBS INI value
|
||||
* @psoc: PSOC object
|
||||
* @sbs: output sbs cfg value
|
||||
*
|
||||
*/
|
||||
QDF_STATUS policy_mgr_get_sbs_cfg(struct wlan_objmgr_psoc *psoc, bool *sbs);
|
||||
|
||||
#endif /* __WLAN_POLICY_MGR_API_H */
|
||||
|
@@ -8714,3 +8714,17 @@ bool policy_mgr_any_other_vdev_on_same_mac_as_freq(
|
||||
|
||||
return same_mac;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_get_sbs_cfg(struct wlan_objmgr_psoc *psoc, bool *sbs)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("pm_ctx is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
*sbs = pm_ctx->cfg.sbs_enable;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -28,6 +28,19 @@
|
||||
#include <wlan_cmn.h>
|
||||
#include "sme_api.h"
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* wlan_mlme_get_feature_info() - Get mlme features
|
||||
* @psoc: psoc context
|
||||
* @mlme_feature_set: MLME feature set info structure
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_mlme_get_feature_info(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_features *mlme_feature_set);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_cfg_str() - Copy the uint8_t array for a particular CFG
|
||||
* @dst: pointer to the destination buffer.
|
||||
|
@@ -2740,4 +2740,47 @@ struct wlan_change_bi {
|
||||
uint8_t session_id;
|
||||
};
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* struct wlan_mlme_features - Mlme feature set structure
|
||||
* @enable_wifi_optimizer: indicates wifi optimizer is enabled or disabled
|
||||
* @roaming_high_cu_roam_trigger: Roaming high CPU trigger enabled or disabled
|
||||
* @roaming_emergency_trigger: Roaming emergency trigger enabled or disabled
|
||||
* @roaming_btm_trihgger: Roaming btm trigger enabled or disabled
|
||||
* @roaming_idle_trigger: Roaming idle trigger enabled or disabled
|
||||
* @roaming_wtc_trigger: Roaming wtc trigger enabled or disabled
|
||||
* @roaming_btcoex_trigger: Roaming btcoex trigger enabled or disabled
|
||||
* @roaming_btw_wpa_wpa2: Roaming btw wpa wpa2 enabled or disabled
|
||||
* @roaming_manage_chan_list_api: Roaming manage chan list api enabled or
|
||||
* disabled
|
||||
* @roaming_adaptive_11r: Roaming adaptive 11r enabled or disabled
|
||||
* @roaming_ctrl_api_get_set: Roaming ctrl api get set enabled or disabled
|
||||
* @roaming_ctrl_api_reassoc: Roaming ctrl api reassoc enabled or disabled
|
||||
* @roaming_ctrl_get_cu: Roaming ctrl get cu enabled or disabled
|
||||
* @vendor_req_1_version: Vendor requirement version 1
|
||||
* @vendor_req_2_version: Vendor requirement version 2
|
||||
* @sta_dual_p2p_support: STA + dual p2p support enabled or not
|
||||
* @enable2x2: Enable 2x2
|
||||
*/
|
||||
struct wlan_mlme_features {
|
||||
bool enable_wifi_optimizer;
|
||||
uint8_t sap_max_num_clients;
|
||||
bool roaming_high_cu_roam_trigger;
|
||||
bool roaming_emergency_trigger;
|
||||
bool roaming_btm_trihgger;
|
||||
bool roaming_idle_trigger;
|
||||
bool roaming_wtc_trigger;
|
||||
bool roaming_btcoex_trigger;
|
||||
bool roaming_btw_wpa_wpa2;
|
||||
bool roaming_manage_chan_list_api;
|
||||
bool roaming_adaptive_11r;
|
||||
bool roaming_ctrl_api_get_set;
|
||||
bool roaming_ctrl_api_reassoc;
|
||||
bool roaming_ctrl_get_cu;
|
||||
WMI_HOST_VENDOR1_REQ1_VERSION vendor_req_1_version;
|
||||
WMI_HOST_VENDOR1_REQ2_VERSION vendor_req_2_version;
|
||||
bool sta_dual_p2p_support;
|
||||
bool enable2x2;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -52,5 +52,21 @@ struct twt_context {
|
||||
uint8_t num_twt_sessions;
|
||||
struct twt_session_info session_info[WLAN_MAX_TWT_SESSIONS_PER_PEER];
|
||||
};
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* struct wlan_twt_features - TWT features info
|
||||
* @enable_twt: Enable TWT
|
||||
* enable_twt_requester Enable TWT requester
|
||||
* @enable_twt_broadcast: Enable TWT broadcast
|
||||
* @enable_twt_flexible: Enable flexible TWT
|
||||
*/
|
||||
struct wlan_twt_features {
|
||||
bool enable_twt;
|
||||
bool enable_twt_requester;
|
||||
bool enable_twt_broadcast;
|
||||
bool enable_twt_flexible;
|
||||
};
|
||||
#endif /* FEATURE_SET */
|
||||
#endif /* WLAN_SUPPORT_TWT */
|
||||
#endif /* _WLAN_MLME_TWT_PUBLIC_STRUCT_H_ */
|
||||
|
@@ -6030,3 +6030,117 @@ wlan_mlme_get_peer_ch_width(struct wlan_objmgr_psoc *psoc, uint8_t *mac)
|
||||
|
||||
return wlan_mlme_get_ch_width_from_phymode(phy_mode);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_latency_enable() - get wlm latency cfg value
|
||||
* @psoc: psoc context
|
||||
* @value: Pointer in which wlam latency cfg value needs to be filled
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success or QDF_STATUS_E_INVAL on failure
|
||||
*/
|
||||
static QDF_STATUS
|
||||
wlan_mlme_get_latency_enable(struct wlan_objmgr_psoc *psoc, bool *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
mlme_legacy_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*value = mlme_obj->cfg.wlm_config.latency_enable;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_ADAPTIVE_11R
|
||||
/**
|
||||
* wlan_mlme_get_adaptive11r_enabled() - get adaptive 11r cfg value
|
||||
* @psoc: psoc context
|
||||
* @val: Pointer in which adaptive 11r cfg value needs to be filled
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success or QDF_STATUS_E_INVAL on failure
|
||||
*/
|
||||
static QDF_STATUS
|
||||
wlan_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;
|
||||
}
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wlan_mlme_get_adaptive11r_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
*val = false;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_P2P_P2P_STA
|
||||
static bool
|
||||
wlan_mlme_get_p2p_p2p_host_conc_support(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
static bool
|
||||
wlan_mlme_get_p2p_p2p_host_conc_support(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void wlan_mlme_get_feature_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_features *mlme_feature_set)
|
||||
{
|
||||
uint32_t roam_triggers;
|
||||
int sap_max_num_clients;
|
||||
|
||||
wlan_mlme_get_latency_enable(psoc,
|
||||
&mlme_feature_set->enable_wifi_optimizer);
|
||||
wlan_mlme_get_sap_max_peers(psoc, &sap_max_num_clients);
|
||||
mlme_feature_set->sap_max_num_clients = sap_max_num_clients;
|
||||
mlme_feature_set->vendor_req_1_version =
|
||||
WMI_HOST_VENDOR1_REQ1_VERSION_3_20;
|
||||
roam_triggers = wlan_mlme_get_roaming_triggers(psoc);
|
||||
|
||||
mlme_feature_set->roaming_high_cu_roam_trigger =
|
||||
roam_triggers & BIT(ROAM_TRIGGER_REASON_BSS_LOAD);
|
||||
mlme_feature_set->roaming_emergency_trigger =
|
||||
roam_triggers & BIT(ROAM_TRIGGER_REASON_FORCED);
|
||||
mlme_feature_set->roaming_btm_trihgger =
|
||||
roam_triggers & BIT(ROAM_TRIGGER_REASON_BTM);
|
||||
mlme_feature_set->roaming_idle_trigger =
|
||||
roam_triggers & BIT(ROAM_TRIGGER_REASON_IDLE);
|
||||
mlme_feature_set->roaming_wtc_trigger =
|
||||
roam_triggers & BIT(ROAM_TRIGGER_REASON_WTC_BTM);
|
||||
mlme_feature_set->roaming_btcoex_trigger =
|
||||
roam_triggers & BIT(ROAM_TRIGGER_REASON_BTC);
|
||||
mlme_feature_set->roaming_btw_wpa_wpa2 = true;
|
||||
mlme_feature_set->roaming_manage_chan_list_api = true;
|
||||
|
||||
wlan_mlme_get_adaptive11r_enabled(
|
||||
psoc,
|
||||
&mlme_feature_set->roaming_adaptive_11r);
|
||||
mlme_feature_set->roaming_ctrl_api_get_set = true;
|
||||
mlme_feature_set->roaming_ctrl_api_reassoc = true;
|
||||
mlme_feature_set->roaming_ctrl_get_cu = true;
|
||||
|
||||
mlme_feature_set->vendor_req_2_version =
|
||||
WMI_HOST_VENDOR1_REQ2_VERSION_3_20;
|
||||
mlme_feature_set->sta_dual_p2p_support =
|
||||
wlan_mlme_get_p2p_p2p_host_conc_support();
|
||||
wlan_mlme_get_vht_enable2x2(psoc, &mlme_feature_set->enable2x2);
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -25,6 +26,20 @@
|
||||
#include "wlan_objmgr_vdev_obj.h"
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* wlan_tdls_get_features_info() - Get tdls features info
|
||||
* @psoc: psoc context
|
||||
* @tdls_feature_set: TDLS feature set info structure
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
||||
void wlan_tdls_get_features_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_tdls_features *tdls_feature_set);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wlan_tdls_teardown_links() - notify TDLS module to teardown all TDLS links
|
||||
* @psoc: psoc object
|
||||
|
@@ -1400,4 +1400,19 @@ struct tdls_link_teardown {
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
};
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* struct wlan_tdls_features - TDLS feature set struct
|
||||
* @enable_tdls: enable/disable tdls
|
||||
* @enable_tdls_offchannel: enable/disable tdls offchannel
|
||||
* @max_tdls_peers: Max tdls Peers
|
||||
* @enable_tdls_capability_enhance: enable tdls capability enhance
|
||||
*/
|
||||
struct wlan_tdls_features {
|
||||
bool enable_tdls;
|
||||
bool enable_tdls_offchannel;
|
||||
bool max_tdls_peers;
|
||||
bool enable_tdls_capability_enhance;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -27,6 +28,7 @@
|
||||
#include "../../core/src/wlan_tdls_mgmt.h"
|
||||
#include <wlan_objmgr_global_obj.h>
|
||||
#include <wlan_objmgr_cmn.h>
|
||||
#include "wlan_tdls_cfg_api.h"
|
||||
|
||||
static QDF_STATUS tdls_teardown_flush_cb(struct scheduler_msg *msg)
|
||||
{
|
||||
@@ -251,3 +253,18 @@ wlan_tdls_notify_sta_connect(uint8_t session_id,
|
||||
tdls_notify_connect(¬ify_info);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
void wlan_tdls_get_features_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_tdls_features *tdls_feature_set)
|
||||
{
|
||||
cfg_tdls_get_support_enable(psoc, &tdls_feature_set->enable_tdls);
|
||||
if (tdls_feature_set->enable_tdls) {
|
||||
cfg_tdls_get_off_channel_enable(
|
||||
psoc,
|
||||
&tdls_feature_set->enable_tdls_offchannel);
|
||||
tdls_feature_set->max_tdls_peers =
|
||||
cfg_tdls_get_max_peer_count(psoc);
|
||||
tdls_feature_set->enable_tdls_capability_enhance = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
#include <wlan_twt_public_structs.h>
|
||||
#include <wlan_mlme_twt_public_struct.h>
|
||||
|
||||
/**
|
||||
* wlan_twt_cfg_get_req_flag() - Get TWT requestor flag
|
||||
* @psoc: Pointer to global psoc object
|
||||
@@ -63,6 +65,19 @@ wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS
|
||||
wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val);
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* wlan_twt_get_feature_info() - Get TWT feature set information
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @twt_feature_set: pointer to output twt feature set structure
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_twt_get_feature_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_twt_features *twt_feature_set);
|
||||
#endif
|
||||
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
|
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
#include <wlan_twt_cfg_ext_api.h>
|
||||
#include "twt/core/src/wlan_twt_cfg.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
#include "wlan_mlme_twt_api.h"
|
||||
|
||||
QDF_STATUS
|
||||
wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
@@ -41,3 +43,21 @@ wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
return wlan_twt_cfg_get_requestor(psoc, val);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
void wlan_twt_get_feature_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_twt_features *twt_feature_set)
|
||||
{
|
||||
twt_feature_set->enable_twt = mlme_is_twt_enabled(psoc);
|
||||
if (twt_feature_set->enable_twt) {
|
||||
wlan_twt_cfg_get_bcast_requestor(
|
||||
psoc,
|
||||
&twt_feature_set->enable_twt_broadcast);
|
||||
wlan_twt_cfg_get_requestor(
|
||||
psoc,
|
||||
&twt_feature_set->enable_twt_requester);
|
||||
twt_feature_set->enable_twt_flexible =
|
||||
mlme_is_flexible_twt_enabled(psoc);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user