diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index fab5ba4673..e77327e4b4 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -207,36 +207,37 @@ static void mlme_update_sap_protection_cfg(struct wlan_objmgr_psoc *psoc, static void mlme_update_sap_cfg(struct wlan_objmgr_psoc *psoc, struct wlan_mlme_cfg_sap *sap_cfg) { - sap_cfg->beacon_interval = cfg_default(CFG_BEACON_INTERVAL); + sap_cfg->beacon_interval = cfg_get(psoc, CFG_BEACON_INTERVAL); sap_cfg->dtim_interval = cfg_default(CFG_DTIM_PERIOD); sap_cfg->listen_interval = cfg_default(CFG_LISTEN_INTERVAL); sap_cfg->sap_11g_policy = cfg_default(CFG_11G_ONLY_POLICY); sap_cfg->assoc_sta_limit = cfg_default(CFG_ASSOC_STA_LIMIT); - sap_cfg->enable_lte_coex = cfg_get(psoc, CFG_INI_ENABLE_LTE_COEX); + sap_cfg->enable_lte_coex = cfg_get(psoc, CFG_ENABLE_LTE_COEX); sap_cfg->rmc_action_period_freq = cfg_default(CFG_RMC_ACTION_PERIOD_FREQUENCY); - sap_cfg->rate_tx_mgmt = cfg_get(psoc, CFG_INI_RATE_FOR_TX_MGMT); - sap_cfg->rate_tx_mgmt_2g = cfg_get(psoc, CFG_INI_RATE_FOR_TX_MGMT_2G); - sap_cfg->rate_tx_mgmt_5g = cfg_get(psoc, CFG_INI_RATE_FOR_TX_MGMT_5G); - sap_cfg->tele_bcn_wakeup_en = cfg_get(psoc, CFG_INI_TELE_BCN_WAKEUP_EN); - sap_cfg->tele_bcn_max_li = cfg_get(psoc, CFG_INI_TELE_BCN_MAX_LI); - sap_cfg->sap_get_peer_info = cfg_get(psoc, CFG_INI_SAP_GET_PEER_INFO); + sap_cfg->rate_tx_mgmt = cfg_get(psoc, CFG_RATE_FOR_TX_MGMT); + sap_cfg->rate_tx_mgmt_2g = cfg_get(psoc, CFG_RATE_FOR_TX_MGMT_2G); + sap_cfg->rate_tx_mgmt_5g = cfg_get(psoc, CFG_RATE_FOR_TX_MGMT_5G); + sap_cfg->tele_bcn_wakeup_en = cfg_get(psoc, CFG_TELE_BCN_WAKEUP_EN); + sap_cfg->tele_bcn_max_li = cfg_get(psoc, CFG_TELE_BCN_MAX_LI); + sap_cfg->sap_get_peer_info = cfg_get(psoc, CFG_SAP_GET_PEER_INFO); sap_cfg->sap_allow_all_chan_param_name = - cfg_get(psoc, CFG_INI_SAP_ALLOW_ALL_CHANNEL_PARAM); - sap_cfg->sap_max_no_peers = cfg_get(psoc, CFG_INI_SAP_MAX_NO_PEERS); + cfg_get(psoc, CFG_SAP_ALLOW_ALL_CHANNEL_PARAM); + sap_cfg->sap_max_no_peers = cfg_get(psoc, CFG_SAP_MAX_NO_PEERS); sap_cfg->sap_max_offload_peers = - cfg_get(psoc, CFG_INI_SAP_MAX_OFFLOAD_PEERS); + cfg_get(psoc, CFG_SAP_MAX_OFFLOAD_PEERS); sap_cfg->sap_max_offload_reorder_buffs = - cfg_get(psoc, CFG_INI_SAP_MAX_OFFLOAD_REORDER_BUFFS); + cfg_get(psoc, CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS); sap_cfg->sap_ch_switch_beacon_cnt = - cfg_get(psoc, CFG_INI_SAP_CH_SWITCH_BEACON_CNT); - sap_cfg->sap_ch_switch_mode = cfg_get(psoc, CFG_INI_SAP_CH_SWITCH_MODE); - sap_cfg->sap_internal_restart_name = - cfg_get(psoc, CFG_INI_SAP_INTERNAL_RESTART_NAME); + cfg_get(psoc, CFG_SAP_CH_SWITCH_BEACON_CNT); + sap_cfg->sap_ch_switch_mode = cfg_get(psoc, CFG_SAP_CH_SWITCH_MODE); + sap_cfg->sap_internal_restart = + cfg_get(psoc, CFG_SAP_INTERNAL_RESTART); sap_cfg->chan_switch_hostapd_rate_enabled_name = - cfg_get(psoc, CFG_INI_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME); + cfg_get(psoc, CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME); sap_cfg->reduced_beacon_interval = - cfg_get(psoc, CFG_INI_REDUCED_BEACON_INTERVAL); + cfg_get(psoc, CFG_REDUCED_BEACON_INTERVAL); + } static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sap.h b/components/mlme/dispatcher/inc/cfg_mlme_sap.h index 888c51f6e6..ca41356a3f 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sap.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sap.h @@ -30,8 +30,8 @@ "1,2,3,4,5,6,7,8,9,0", \ "CFG_SSID") -#define CFG_BEACON_INTERVAL CFG_UINT( \ - "cfg_beacon_interval", \ +#define CFG_BEACON_INTERVAL CFG_INI_UINT( \ + "gBeaconInterval", \ 0, \ 65535, \ 100, \ @@ -87,10 +87,10 @@ * * */ - #define CFG_INI_ENABLE_LTE_COEX CFG_INI_BOOL( \ - "cfg_enable_lte_coex", \ + #define CFG_ENABLE_LTE_COEX CFG_INI_BOOL( \ + "gEnableLTECoex", \ 0, \ - "CFG_ENABLE_LTE_COEX") + "enabled lte coex") #define CFG_RMC_ACTION_PERIOD_FREQUENCY CFG_UINT( \ "cfg_rcm_action_period_frequency", \ @@ -117,13 +117,13 @@ * * */ - #define CFG_INI_RATE_FOR_TX_MGMT CFG_INI_UINT( \ - "cfg_rate_for_tx_mgmt", \ + #define CFG_RATE_FOR_TX_MGMT CFG_INI_UINT( \ + "gRateForTxMgmt", \ 0, \ 0xFF, \ 0xFF, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_RATE_FOR_TX_MGMT") + "set rate for mgmt tx") /* * @@ -141,13 +141,13 @@ * * */ - #define CFG_INI_RATE_FOR_TX_MGMT_2G CFG_INI_UINT( \ - "cfg_rate_for_tx_mgmt_2g", \ + #define CFG_RATE_FOR_TX_MGMT_2G CFG_INI_UINT( \ + "gRateForTxMgmt2G", \ 0, \ 255, \ 255, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_RATE_FOR_TX_MGMT_2G") + "set rate for mgmt tx 2g") /* * @@ -166,13 +166,13 @@ * * */ - #define CFG_INI_RATE_FOR_TX_MGMT_5G CFG_INI_UINT( \ - "cfg_rate_for_tx_mgmt_5g", \ + #define CFG_RATE_FOR_TX_MGMT_5G CFG_INI_UINT( \ + "gRateForTxMgmt5G", \ 0, \ 255, \ 255, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_RATE_FOR_TX_MGMT_5G") + "set rate for mgmt tx 5g") /* * @@ -191,10 +191,10 @@ * * */ -#define CFG_INI_TELE_BCN_WAKEUP_EN CFG_INI_BOOL( \ +#define CFG_TELE_BCN_WAKEUP_EN CFG_INI_BOOL( \ "gTelescopicBeaconWakeupEn", \ 0, \ - "CFG_TELE_BCN_WAKEUP_EN") + "set tescopic beacon wakeup") /* * @@ -213,13 +213,13 @@ * * */ - #define CFG_INI_TELE_BCN_MAX_LI CFG_INI_UINT( \ + #define CFG_TELE_BCN_MAX_LI CFG_INI_UINT( \ "telescopicBeaconMaxListenInterval", \ 0, \ 7, \ 5, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_TELE_BCN_MAX_LI") + "set telescopic beacon max listen") /* * @@ -234,10 +234,10 @@ * * */ - #define CFG_INI_SAP_GET_PEER_INFO CFG_INI_BOOL( \ + #define CFG_SAP_GET_PEER_INFO CFG_INI_BOOL( \ "gSapGetPeerInfo", \ 0, \ - "CFG_INI_SAP_GET_PEER_INFO") + "sap get peer info") /* * @@ -256,10 +256,10 @@ * * */ - #define CFG_INI_SAP_ALLOW_ALL_CHANNEL_PARAM CFG_INI_BOOL( \ + #define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM CFG_INI_BOOL( \ "gSapAllowAllChannel", \ 0, \ - "CFG_INI_SAP_ALLOW_ALL_CHANNEL_PARAM") + "sap allow all channel params") /* * @@ -278,13 +278,13 @@ * * */ - #define CFG_INI_SAP_MAX_NO_PEERS CFG_INI_UINT( \ + #define CFG_SAP_MAX_NO_PEERS CFG_INI_UINT( \ "gSoftApMaxPeers", \ 1, \ 32, \ 32, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_SAP_MAX_NO_PEERS") + "max no of peers") /* * @@ -303,13 +303,13 @@ * * */ - #define CFG_INI_SAP_MAX_OFFLOAD_PEERS CFG_INI_UINT( \ + #define CFG_SAP_MAX_OFFLOAD_PEERS CFG_INI_UINT( \ "gMaxOffloadPeers", \ 2, \ 5, \ 2, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_SAP_MAX_OFFLOAD_PEERS") + "max offload peers") /* * @@ -328,13 +328,13 @@ * * */ - #define CFG_INI_SAP_MAX_OFFLOAD_REORDER_BUFFS CFG_INI_UINT( \ + #define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS CFG_INI_UINT( \ "gMaxOffloadReorderBuffs", \ 0, \ 3, \ 2, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_SAP_MAX_OFFLOAD_REORDER_BUFFS") + "sap max offload reorder buffs") /* * @@ -353,13 +353,13 @@ * * */ - #define CFG_INI_SAP_CH_SWITCH_BEACON_CNT CFG_INI_UINT( \ + #define CFG_SAP_CH_SWITCH_BEACON_CNT CFG_INI_UINT( \ "g_sap_chanswitch_beacon_cnt", \ 1, \ 10, \ 10, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_SAP_CH_SWITCH_BEACON_CNT") + "set channel switch beacon count") /* * @@ -376,10 +376,10 @@ * * */ -#define CFG_INI_SAP_CH_SWITCH_MODE CFG_INI_BOOL( \ +#define CFG_SAP_CH_SWITCH_MODE CFG_INI_BOOL( \ "g_sap_chanswitch_mode", \ 1, \ - "CFG_INI_SAP_CH_SWITCH_MODE") + "sap channel switch mode") /* * @@ -398,10 +398,10 @@ * * */ - #define CFG_INI_SAP_INTERNAL_RESTART_NAME CFG_INI_BOOL( \ + #define CFG_SAP_INTERNAL_RESTART CFG_INI_BOOL( \ "gEnableSapInternalRestart", \ 1, \ - "CFG_SAP_INTERNAL_RESTART_NAME") + "sap internal restart") /* * @@ -420,10 +420,10 @@ * * */ - #define CFG_INI_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME CFG_INI_BOOL( \ + #define CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME CFG_INI_BOOL( \ "gChanSwitchHostapdRateEnabled", \ 0, \ - "CFG_INI_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME") + "chan switch hostapd rate enabled") /* * gReducedBeaconInterval - beacon interval reduced @@ -444,13 +444,13 @@ * * */ -#define CFG_INI_REDUCED_BEACON_INTERVAL CFG_INI_UINT( \ +#define CFG_REDUCED_BEACON_INTERVAL CFG_INI_UINT( \ "gReducedBeaconInterval", \ 0, \ 100, \ 0, \ CFG_VALUE_OR_DEFAULT, \ - "CFG_INI_REDUCED_BEACON_INTERVAL") + "reduced beacon interval") #define CFG_SAP_ALL \ CFG(CFG_SSID) \ @@ -459,22 +459,22 @@ CFG(CFG_LISTEN_INTERVAL) \ CFG(CFG_11G_ONLY_POLICY) \ CFG(CFG_ASSOC_STA_LIMIT) \ - CFG(CFG_INI_ENABLE_LTE_COEX) \ + CFG(CFG_ENABLE_LTE_COEX) \ CFG(CFG_RMC_ACTION_PERIOD_FREQUENCY) \ - CFG(CFG_INI_RATE_FOR_TX_MGMT) \ - CFG(CFG_INI_RATE_FOR_TX_MGMT_2G) \ - CFG(CFG_INI_RATE_FOR_TX_MGMT_5G) \ - CFG(CFG_INI_TELE_BCN_WAKEUP_EN) \ - CFG(CFG_INI_TELE_BCN_MAX_LI) \ - CFG(CFG_INI_SAP_GET_PEER_INFO) \ - CFG(CFG_INI_SAP_ALLOW_ALL_CHANNEL_PARAM) \ - CFG(CFG_INI_SAP_MAX_NO_PEERS) \ - CFG(CFG_INI_SAP_MAX_OFFLOAD_PEERS) \ - CFG(CFG_INI_SAP_MAX_OFFLOAD_REORDER_BUFFS) \ - CFG(CFG_INI_SAP_CH_SWITCH_BEACON_CNT) \ - CFG(CFG_INI_SAP_CH_SWITCH_MODE) \ - CFG(CFG_INI_SAP_INTERNAL_RESTART_NAME) \ - CFG(CFG_INI_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME) \ - CFG(CFG_INI_REDUCED_BEACON_INTERVAL) + CFG(CFG_RATE_FOR_TX_MGMT) \ + CFG(CFG_RATE_FOR_TX_MGMT_2G) \ + CFG(CFG_RATE_FOR_TX_MGMT_5G) \ + CFG(CFG_TELE_BCN_WAKEUP_EN) \ + CFG(CFG_TELE_BCN_MAX_LI) \ + CFG(CFG_SAP_GET_PEER_INFO) \ + CFG(CFG_SAP_ALLOW_ALL_CHANNEL_PARAM) \ + CFG(CFG_SAP_MAX_NO_PEERS) \ + CFG(CFG_SAP_MAX_OFFLOAD_PEERS) \ + CFG(CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS) \ + CFG(CFG_SAP_CH_SWITCH_BEACON_CNT) \ + CFG(CFG_SAP_CH_SWITCH_MODE) \ + CFG(CFG_SAP_INTERNAL_RESTART) \ + CFG(CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME) \ + CFG(CFG_REDUCED_BEACON_INTERVAL) #endif /* __CFG_MLME_SAP_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 85f531fd15..8489022739 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -126,4 +126,151 @@ QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc, uint8_t session_id); +/** + * wlan_mlme_set_sap_listen_interval() - Set the sap listen interval + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc, + int value); + +/** + * wlan_mlme_set_assoc_sta_limit() - Set the assoc sta limit + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_set_assoc_sta_limit(struct wlan_objmgr_psoc *psoc, + int value); + +/** + * wlan_mlme_set_rmc_action_period_freq() - Set the rmc action period frequency + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc, + int value); + +/** + * wlan_mlme_set_sap_get_peer_info() - get the sap get peer info + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc, + bool *value); + +/** + * wlan_mlme_get_sap_allow_all_channels() - get the value of sap allow all + * channels + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc, + bool *value); + +/** + * wlan_mlme_get_sap_allow_all_channels() - get the value sap max peers + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_max_peers(struct wlan_objmgr_psoc *psoc, + int *value); + +/** + * wlan_mlme_set_sap_max_peers() - set the value sap max peers + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_set_sap_max_peers(struct wlan_objmgr_psoc *psoc, + int value); + +/** + * wlan_mlme_get_sap_max_offload_peers() - get the value sap max offload peers + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_max_offload_peers(struct wlan_objmgr_psoc *psoc, + int *value); + +/** + * wlan_mlme_get_sap_max_offload_reorder_buffs() - get the value sap max offload + * reorder buffs. + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_max_offload_reorder_buffs(struct wlan_objmgr_psoc + *psoc, int *value); + +/** + * wlan_mlme_get_sap_chn_switch_bcn_count() - get the value sap max channel + * switch beacon count + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_chn_switch_bcn_count(struct wlan_objmgr_psoc *psoc, + int *value); + +/** + * wlan_mlme_get_sap_chn_switch_mode() - get the sap channel + * switch mode + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_chn_switch_mode(struct wlan_objmgr_psoc *psoc, + bool *value); + +/** + * wlan_mlme_get_sap_internal_restart() - get the sap internal + * restart + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc, + bool *value); + +/** + * wlan_mlme_get_sap_reduced_beacon_interval() - get the sap reduced + * beacon interval + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc + *psoc, int *value); + +/** + * wlan_mlme_get_sap_chan_switch_rate_enabled() - get the sap rate hostapd + * enabled beacon interval + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc + *psoc, bool *value); + #endif /* _WLAN_MLME_API_H_ */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index e6db47642c..bcd1a15125 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -113,8 +113,8 @@ struct wlan_mlme_cfg_sap { uint8_t sap_max_offload_peers; uint8_t sap_max_offload_reorder_buffs; uint8_t sap_ch_switch_beacon_cnt; + bool sap_internal_restart; bool sap_ch_switch_mode; - bool sap_internal_restart_name; bool chan_switch_hostapd_rate_enabled_name; uint8_t reduced_beacon_interval; }; diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index ad039e3aa1..1c44081917 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -366,4 +366,231 @@ ucfg_mlme_set_roaming_offload(struct wlan_objmgr_psoc *psoc, QDF_STATUS ucfg_mlme_get_first_scan_bucket_threshold(struct wlan_objmgr_psoc *psoc, uint8_t *val); +/** + * ucfg_mlme_set_sap_listen_interval() - Set the Sap listen interval + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc, + int value) +{ + return wlan_mlme_set_sap_listen_interval(psoc, value); +} + +/** + * ucfg_mlme_set_assoc_sta_limit() - Set the assoc sta limit + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_set_assoc_sta_limit(struct wlan_objmgr_psoc *psoc, + int value) +{ + return wlan_mlme_set_assoc_sta_limit(psoc, value); +} + +/** + * ucfg_mlme_set_rmc_action_period_freq() - Set the rmc action period frequency + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc, + int value) +{ + return wlan_mlme_set_rmc_action_period_freq(psoc, value); +} + +/** + * ucfg_mlme_get_sap_get_peer_info() - get the sap get peer info + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_get_sap_get_peer_info(psoc, value); +} + +/** + * ucfg_mlme_get_sap_allow_all_channels() - get the sap allow all channels + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_get_sap_allow_all_channels(psoc, value); +} + +/** + * ucfg_mlme_get_sap_max_peers() - get the sap max peers + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_max_peers(struct wlan_objmgr_psoc *psoc, + int *value) +{ + return wlan_mlme_get_sap_max_peers(psoc, value); +} + +/** + * ucfg_mlme_set_sap_max_peers() - Set the sap max peers + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_set_sap_max_peers(struct wlan_objmgr_psoc *psoc, int value) +{ + return wlan_mlme_set_sap_max_peers(psoc, value); +} + +/** + * ucfg_mlme_get_sap_max_offload_peers() - get the sap max offload peers + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_max_offload_peers(struct wlan_objmgr_psoc *psoc, + int *value) +{ + return wlan_mlme_get_sap_max_offload_peers(psoc, value); +} + +/** + * ucfg_mlme_get_sap_max_offload_reorder_buffs() - get the sap max offload + * reorder buffs + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_max_offload_reorder_buffs(struct wlan_objmgr_psoc + *psoc, int *value) +{ + return wlan_mlme_get_sap_max_offload_reorder_buffs(psoc, value); +} + +/** + * ucfg_mlme_get_sap_chn_switch_bcn_count() - get the sap channel + * switch beacon count + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_chn_switch_bcn_count(struct wlan_objmgr_psoc *psoc, + int *value) +{ + return wlan_mlme_get_sap_chn_switch_bcn_count(psoc, value); +} + +/** + * ucfg_mlme_get_sap_channel_switch_mode() - get the sap channel switch mode + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_channel_switch_mode(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_get_sap_chn_switch_mode(psoc, value); +} + +/** + * ucfg_mlme_get_sap_internal_restart() - get sap internal restart value + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_get_sap_internal_restart(psoc, value); +} + +/** + * ucfg_mlme_get_sap_reduces_beacon_interval() - get the sap reduces beacon + * interval + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_reduces_beacon_interval(struct wlan_objmgr_psoc + *psoc, int *value) +{ + return wlan_mlme_get_sap_reduced_beacon_interval(psoc, value); +} + +/** + * ucfg_mlme_get_sap_chan_switch_rate_enabled() - get the sap channel + * switch rate enabled. + * @psoc: pointer to psoc object + * @value: Value that needs to be set from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc + *psoc, bool *value) +{ + return wlan_mlme_get_sap_chan_switch_rate_enabled(psoc, value); +} + #endif /* _WLAN_MLME_UCFG_API_H_ */ diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 27d5798f67..d3faac6442 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -226,3 +226,239 @@ QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } + +QDF_STATUS wlan_mlme_set_sap_listen_interval(struct wlan_objmgr_psoc *psoc, + int value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + if (cfg_in_range(CFG_LISTEN_INTERVAL, value)) + mlme_obj->cfg.sap_cfg.listen_interval = value; + else + return QDF_STATUS_E_FAILURE; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_set_assoc_sta_limit(struct wlan_objmgr_psoc *psoc, + int value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + if (cfg_in_range(CFG_ASSOC_STA_LIMIT, value)) + mlme_obj->cfg.sap_cfg.assoc_sta_limit = value; + else + return QDF_STATUS_E_FAILURE; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_set_rmc_action_period_freq(struct wlan_objmgr_psoc *psoc, + int value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + if (cfg_in_range(CFG_RMC_ACTION_PERIOD_FREQUENCY, value)) + mlme_obj->cfg.sap_cfg.rmc_action_period_freq = value; + else + return QDF_STATUS_E_FAILURE; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_get_peer_info(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_get_peer_info; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_allow_all_chan_param_name; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_max_peers(struct wlan_objmgr_psoc *psoc, + int *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_max_no_peers; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_set_sap_max_peers(struct wlan_objmgr_psoc *psoc, + int value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + if (cfg_in_range(CFG_RMC_ACTION_PERIOD_FREQUENCY, value)) + mlme_obj->cfg.sap_cfg.sap_max_no_peers = value; + else + return QDF_STATUS_E_FAILURE; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_max_offload_peers(struct wlan_objmgr_psoc *psoc, + int *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_max_offload_peers; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_max_offload_reorder_buffs(struct wlan_objmgr_psoc + *psoc, int *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_max_offload_reorder_buffs; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_chn_switch_bcn_count(struct wlan_objmgr_psoc *psoc, + int *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_ch_switch_beacon_cnt; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_chn_switch_mode(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_ch_switch_mode; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_internal_restart(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.sap_internal_restart; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc + *psoc, int *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.reduced_beacon_interval; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc + *psoc, bool *value) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *value = mlme_obj->cfg.sap_cfg.chan_switch_hostapd_rate_enabled_name; + + return QDF_STATUS_SUCCESS; +} diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index f13b69d3f0..566dc80262 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -68,6 +68,7 @@ #ifdef QCA_WIFI_QCA8074 #include #endif +#include "wlan_mlme_ucfg_api.h" /* Preprocessor Definitions and Constants */ @@ -594,7 +595,7 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc) * con_mode change happens from FTM mode to any other mode. */ if (QDF_DRIVER_TYPE_PRODUCTION == cds_cfg->driver_type) - hdd_ctx->config->maxNumberOfPeers = cds_cfg->max_station; + ucfg_mlme_set_sap_max_peers(psoc, cds_cfg->max_station); HTCHandle = cds_get_context(QDF_MODULE_ID_HTC); if (!HTCHandle) { diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 7a2e83f30c..0b7aa7b8b5 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2487,28 +2487,6 @@ enum hdd_dot11_mode { #define CFG_AP_LINK_MONITOR_PERIOD_MAX (50) #define CFG_AP_LINK_MONITOR_PERIOD_DEFAULT (10) -/* - * - * gBeaconInterval - Beacon interval for SoftAP - * @Min: 0 - * @Max: 65535 - * @Default: 100 - * - * This ini is used to set beacon interval for SoftAP - * - * Related: None. - * - * Supported Feature: SAP - * - * Usage: Internal/External - * - * - */ -#define CFG_BEACON_INTERVAL_NAME "gBeaconInterval" -#define CFG_BEACON_INTERVAL_MIN WNI_CFG_BEACON_INTERVAL_STAMIN -#define CFG_BEACON_INTERVAL_MAX WNI_CFG_BEACON_INTERVAL_STAMAX -#define CFG_BEACON_INTERVAL_DEFAULT WNI_CFG_BEACON_INTERVAL_STADEF - #ifdef FEATURE_WLAN_AUTO_SHUTDOWN #define CFG_WLAN_AUTO_SHUTDOWN "gWlanAutoShutdown" #define CFG_WLAN_AUTO_SHUTDOWN_MIN (0) @@ -2555,11 +2533,6 @@ enum hdd_dot11_mode { #define CFG_DISABLE_PACKET_FILTER_MAX (1) #define CFG_DISABLE_PACKET_FILTER_DEFAULT (1) -#define CFG_ENABLE_LTE_COEX "gEnableLTECoex" -#define CFG_ENABLE_LTE_COEX_MIN (0) -#define CFG_ENABLE_LTE_COEX_MAX (1) -#define CFG_ENABLE_LTE_COEX_DEFAULT (0) - #define CFG_VCC_RSSI_TRIGGER_NAME "gVccRssiTrigger" #define CFG_VCC_RSSI_TRIGGER_MIN (0) #define CFG_VCC_RSSI_TRIGGER_MAX (80) @@ -3792,11 +3765,6 @@ enum station_keepalive_method { #define CFG_RM_CAPABILITY_NAME "rm_capability" #define CFG_RM_CAPABILITY_DEFAULT "73,10,91,00,04" -#define CFG_TELE_BCN_MAX_LI_NAME "telescopicBeaconMaxListenInterval" -#define CFG_TELE_BCN_MAX_LI_MIN (0) -#define CFG_TELE_BCN_MAX_LI_MAX (7) -#define CFG_TELE_BCN_MAX_LI_DEFAULT (5) - #define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_NAME "gNeighborLookupThreshold" #define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN (10) #define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX (120) @@ -3827,29 +3795,6 @@ enum station_keepalive_method { #define CFG_ROAM_BEACON_RSSI_WEIGHT_MAX (16) #define CFG_ROAM_BEACON_RSSI_WEIGHT_DEFAULT (14) -/* - * - * gTelescopicBeaconWakeupEn - Set teles copic beacon wakeup - * @Min: 0 - * @Max: 1 - * @Default: 0 - * - * This ini is used to set default teles copic beacon wakeup - * - * Related: None - * - * Supported Feature: STA - * - * Usage: Internal/External - * - * - */ - -#define CFG_TELE_BCN_WAKEUP_EN_NAME "gTelescopicBeaconWakeupEn" -#define CFG_TELE_BCN_WAKEUP_EN_MIN (0) -#define CFG_TELE_BCN_WAKEUP_EN_MAX (1) -#define CFG_TELE_BCN_WAKEUP_EN_DEFAULT (0) - #define CFG_AP_DATA_AVAIL_POLL_PERIOD_NAME "gApDataAvailPollInterval" #define CFG_AP_DATA_AVAIL_POLL_PERIOD_MIN (WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD_STAMIN) #define CFG_AP_DATA_AVAIL_POLL_PERIOD_MAX (WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD_STAMAX) @@ -5255,85 +5200,6 @@ enum hdd_link_speed_rpt_type { #define CFG_ENABLE_TX_STBC_MAX (1) #define CFG_ENABLE_TX_STBC_DEFAULT (0) -/* - * - * gSapGetPeerInfo - Enable/Disable remote peer info query support - * @Min: 0 - Disable remote peer info query support - * @Max: 1 - Enable remote peer info query support - * @Default: 0 - * - * This ini is used to enable/disable remote peer info query support - * - * Usage: External - * - * - */ -#define CFG_SAP_GET_PEER_INFO "gSapGetPeerInfo" -#define CFG_SAP_GET_PEER_INFO_MIN (0) -#define CFG_SAP_GET_PEER_INFO_MAX (1) -#define CFG_SAP_GET_PEER_INFO_DEFAULT (0) - -/* - * - * gRateForTxMgmt - rate for tx mgmt frame - * @Min: 0x0 - * @Max: 0xFF - * @Default: 0xFF - * - * This ini is used to configure the rate for tx - * mgmt frame. Default 0xFF means disable. - * - * Usage: External - * - * - */ -#define CFG_RATE_FOR_TX_MGMT "gRateForTxMgmt" -#define CFG_RATE_FOR_TX_MGMT_MIN (WNI_CFG_RATE_FOR_TX_MGMT_STAMIN) -#define CFG_RATE_FOR_TX_MGMT_MAX (WNI_CFG_RATE_FOR_TX_MGMT_STAMAX) -#define CFG_RATE_FOR_TX_MGMT_DEFAULT (WNI_CFG_RATE_FOR_TX_MGMT_STADEF) - -/* - * - * gRateForTxMgmt2G - rate for tx mgmt frame on 2G - * @Min: 0x0 - * @Max: 0xFF - * @Default: 0xFF - * - * This ini is used to configure the rate for tx - * mgmt frame on 2G Band. Default 0xFF means disable. - * It has higher priority and will overwrite gRateForTxMgmt - * setting. - * - * Usage: External - * - * - */ -#define CFG_RATE_FOR_TX_MGMT_2G "gRateForTxMgmt2G" -#define CFG_RATE_FOR_TX_MGMT_2G_MIN (WNI_CFG_RATE_FOR_TX_MGMT_2G_STAMIN) -#define CFG_RATE_FOR_TX_MGMT_2G_MAX (WNI_CFG_RATE_FOR_TX_MGMT_2G_STAMAX) -#define CFG_RATE_FOR_TX_MGMT_2G_DEFAULT (WNI_CFG_RATE_FOR_TX_MGMT_2G_STADEF) - -/* - * - * gRateForTxMgmt5G - rate for tx mgmt frame on 5G - * @Min: 0x0 - * @Max: 0xFF - * @Default: 0xFF - * - * This ini is used to configure the rate for tx - * mgmt frame on 5G Band. Default 0xFF means disable. - * It has higher priority and will overwrite gRateForTxMgmt - * setting. - * - * Usage: External - * - * - */ -#define CFG_RATE_FOR_TX_MGMT_5G "gRateForTxMgmt5G" -#define CFG_RATE_FOR_TX_MGMT_5G_MIN (WNI_CFG_RATE_FOR_TX_MGMT_5G_STAMIN) -#define CFG_RATE_FOR_TX_MGMT_5G_MAX (WNI_CFG_RATE_FOR_TX_MGMT_5G_STAMAX) -#define CFG_RATE_FOR_TX_MGMT_5G_DEFAULT (WNI_CFG_RATE_FOR_TX_MGMT_5G_STADEF) - /* * * gPreventLinkDown - Enable to prevent bus link from going down @@ -5513,14 +5379,6 @@ enum hdd_link_speed_rpt_type { #define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MAX (1) #define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_DEFAULT (0) -/* - * SAP ALLOW All Channels - */ -#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_NAME "gSapAllowAllChannel" -#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_MIN (0) -#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_MAX (1) -#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_DEFAULT (0) - #define CFG_DISABLE_LDPC_WITH_TXBF_AP "gDisableLDPCWithTxbfAP" #define CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN (0) #define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX (1) @@ -5691,11 +5549,6 @@ enum hdd_link_speed_rpt_type { #define CFG_VHT_MPDU_LEN_MAX (2) #define CFG_VHT_MPDU_LEN_DEFAULT (0) -#define CFG_SAP_MAX_NO_PEERS "gSoftApMaxPeers" -#define CFG_SAP_MAX_NO_PEERS_MIN (1) -#define CFG_SAP_MAX_NO_PEERS_MAX (SIR_SAP_MAX_NUM_PEERS) -#define CFG_SAP_MAX_NO_PEERS_DEFAULT (SIR_SAP_MAX_NUM_PEERS) - /* * * gEnableDebugLog - Enable/Disable the Connection related logs @@ -6043,16 +5896,6 @@ enum hdd_link_speed_rpt_type { #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ -#define CFG_SAP_MAX_OFFLOAD_PEERS "gMaxOffloadPeers" -#define CFG_SAP_MAX_OFFLOAD_PEERS_MIN (2) -#define CFG_SAP_MAX_OFFLOAD_PEERS_MAX (5) -#define CFG_SAP_MAX_OFFLOAD_PEERS_DEFAULT (2) - -#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS "gMaxOffloadReorderBuffs" -#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_MIN (0) -#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_MAX (3) -#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_DEFAULT (2) - #ifdef FEATURE_WLAN_RA_FILTERING #define CFG_RA_FILTER_ENABLE_NAME "gRAFilterEnable" #define CFG_RA_FILTER_ENABLE_MIN (0) @@ -7874,11 +7717,6 @@ enum hdd_link_speed_rpt_type { #define CFG_SUB_20_CHANNEL_WIDTH_MAX (WLAN_SUB_20_CH_WIDTH_10) #define CFG_SUB_20_CHANNEL_WIDTH_DEFAULT (WLAN_SUB_20_CH_WIDTH_NONE) -#define CFG_SAP_INTERNAL_RESTART_NAME "gEnableSapInternalRestart" -#define CFG_SAP_INTERNAL_RESTART_MIN (0) -#define CFG_SAP_INTERNAL_RESTART_MAX (1) -#define CFG_SAP_INTERNAL_RESTART_DEFAULT (1) - /* * * restart_beaconing_on_chan_avoid_event - control the beaconing entity to move @@ -9419,7 +9257,6 @@ enum hdd_wext_control { * corresponding IE needs to be included in probe request. * * Example: - * ======== * If IE 221 needs to be in the probe request, set the corresponding bit * as follows: * a= IE/32 = 221/32 = 6 = g_probe_req_ie_bitmap_6 @@ -9642,46 +9479,6 @@ enum hdd_wext_control { #define CFG_PROBE_REQ_OUI_DEFAULT "" /* End of probe request IE whitelisting feature ini params */ -/* - * - * g_sap_chanswitch_beacon_cnt - channel switch beacon count - * @Min: 1 - * @Max: 10 - * @Default: 10 - * - * This ini is used to configure channel switch beacon count - * - * Related: none - * - * Usage: External - * - * - */ -#define CFG_SAP_CH_SWITCH_BEACON_CNT "g_sap_chanswitch_beacon_cnt" -#define CFG_SAP_CH_SWITCH_BEACON_CNT_MIN (1) -#define CFG_SAP_CH_SWITCH_BEACON_CNT_MAX (10) -#define CFG_SAP_CH_SWITCH_BEACON_CNT_DEFAULT (10) - -/* - * - * g_sap_chanswitch_mode - channel switch mode - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to configure channel switch mode - * - * Related: none - * - * Usage: External - * - * - */ -#define CFG_SAP_CH_SWITCH_MODE "g_sap_chanswitch_mode" -#define CFG_SAP_CH_SWITCH_MODE_MIN (0) -#define CFG_SAP_CH_SWITCH_MODE_MAX (1) -#define CFG_SAP_CH_SWITCH_MODE_DEFAULT (1) - /** * gSetRTSForSIFSBursting - set rts for sifs bursting * @Min: 0 @@ -10133,35 +9930,6 @@ enum hdd_external_acs_policy { #define CFG_IS_SAE_ENABLED_MIN (0) #define CFG_IS_SAE_ENABLED_MAX (1) -/* - * - * gChanSwitchHostapdRateEnabled - Enable/disable hostapd rate when doing SAP - * channel switch - * @Min: 0 - * @Max: 1 - * @Default: 0 - * - * This ini is used to set supported rates calculated from hostapd.conf file - * or not when doing SAP channel switch. It must set it to 0 when cross-band - * channel switch happens such as from 2G to 5G or 5G to 2G. - * - * Related: When doing SAP channel switch, if gChanSwitchHostapdRateEnabled is - * set to 1, supported rates will be calculated from hostapd.conf file, - * if gChanSwitchHostapdRateEnabled is set to 0, supported rates will be - * calculated from driver default rates. - * - * Supported Feature: SAP - * - * Usage: External - * - * - */ -#define CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME \ - "gChanSwitchHostapdRateEnabled" -#define CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_MIN (0) -#define CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_MAX (1) -#define CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_DEFAULT (0) - #ifdef WLAN_FEATURE_PACKET_FILTERING /* * @@ -10222,30 +9990,6 @@ enum hdd_external_acs_policy { #define CFG_DFS_BEACON_TX_ENHANCED_MAX (1) #define CFG_DFS_BEACON_TX_ENHANCED_DEFAULT (0) -/* - * gReducedBeaconInterval - beacon interval reduced - * @Min: 0 - * @Max: 100 - * @Default: 0 - * - * This ini is used to reduce beacon interval before channel - * switch (when val great than 0, or the feature is disabled). - * It would reduce the downtime on the STA side which is - * waiting for beacons from the AP to resume back transmission. - * Switch back the beacon_interval to its original value after - * channel switch based on the timeout. - * - * Related: none - * - * Usage: External - * - * - */ -#define CFG_REDUCED_BEACON_INTERVAL "gReducedBeaconInterval" -#define CFG_REDUCED_BEACON_INTERVAL_MIN (0) -#define CFG_REDUCED_BEACON_INTERVAL_MAX (100) -#define CFG_REDUCED_BEACON_INTERVAL_DEFAULT (0) - /* * oce_enable_rssi_assoc_reject - Enable/disable rssi based assoc rejection * @Min: 0 @@ -11322,11 +11066,9 @@ struct hdd_config { uint16_t apProtection; bool apOBSSProtEnabled; bool apDisableIntraBssFwd; - uint8_t enableLTECoex; uint32_t apKeepAlivePeriod; enum station_keepalive_method sta_keepalive_method; uint32_t apLinkMonitorPeriod; - uint32_t nBeaconInterval; uint8_t nTxPowerCap; /* In dBm */ bool allow_tpc_from_ap; uint8_t disablePacketFilter; @@ -11480,7 +11222,6 @@ struct hdd_config { bool AddTSWhenACMIsOff; uint8_t nBandCapability; - bool teleBcnWakeupEn; /* QDF Trace Control*/ uint16_t qdf_trace_enable_wdi; @@ -11510,7 +11251,6 @@ struct hdd_config { #ifdef ENABLE_MTRACE_LOG bool enable_mtrace; #endif - uint16_t nTeleBcnMaxListenInterval; uint8_t enableBypass11d; uint8_t enableDFSChnlScan; uint8_t enable_dfs_pno_chnl_scan; @@ -11591,7 +11331,6 @@ struct hdd_config { uint8_t scanAgingTimeout; uint8_t disableLDPCWithTxbfAP; uint8_t enableMCCAdaptiveScheduler; - bool sapAllowAllChannel; bool enableSSR; bool enable_data_stall_det; bool enableVhtFor24GHzBand; @@ -11637,7 +11376,6 @@ struct hdd_config { uint32_t WlanAutoShutdown; #endif uint8_t wowEnable; - uint8_t maxNumberOfPeers; uint8_t disableDFSChSwitch; uint8_t enableDFSMasterCap; uint16_t thermalTempMinLevel0; @@ -11658,10 +11396,6 @@ struct hdd_config { bool fRegChangeDefCountry; bool acs_with_more_param; uint32_t auto_channel_select_weight; - bool sap_get_peer_info; - uint8_t rate_for_tx_mgmt; - uint8_t rate_for_tx_mgmt_2g; - uint8_t rate_for_tx_mgmt_5g; #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL uint32_t TxFlowLowWaterMark; uint32_t TxFlowHighWaterMarkOffset; @@ -11677,8 +11411,6 @@ struct hdd_config { uint32_t TxFlowStopQueueThreshold; uint32_t TxFlowStartQueueOffset; #endif - uint8_t apMaxOffloadPeers; - uint8_t apMaxOffloadReorderBuffs; bool advertiseConcurrentOperation; bool enableMemDeepSleep; bool enable_cck_tx_fir_override; @@ -11896,9 +11628,6 @@ struct hdd_config { bool multicast_replay_filter; bool goptimize_chan_avoid_event; bool fw_timeout_crash; - /* beacon count before channel switch */ - uint8_t sap_chanswitch_beacon_cnt; - uint8_t sap_chanswitch_mode; uint32_t rx_wakelock_timeout; uint32_t max_sched_scan_plan_interval; uint32_t max_sched_scan_plan_iterations; @@ -11976,7 +11705,6 @@ struct hdd_config { bool enable_dtim_1chrx; int8_t rssi_thresh_offset_5g; uint32_t scan_11d_interval; - bool chan_switch_hostapd_rate_enabled; bool is_bssid_hint_priority; bool is_fils_enabled; uint16_t wlm_latency_enable; @@ -11990,7 +11718,6 @@ struct hdd_config { #endif uint8_t enable_phy_reg_retention; uint8_t dfs_beacon_tx_enhanced; - uint16_t reduced_beacon_interval; bool rssi_assoc_reject_enabled; bool oce_probe_req_rate_enabled; bool oce_probe_resp_rate_enabled; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index f007d77c1e..b199be2efe 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -611,13 +611,6 @@ struct reg_table_entry g_registry_table[] = { CFG_AP_STA_SECURITY_SEPERATION_MIN, CFG_AP_STA_SECURITY_SEPERATION_MAX), - REG_VARIABLE(CFG_ENABLE_LTE_COEX, WLAN_PARAM_Integer, - struct hdd_config, enableLTECoex, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ENABLE_LTE_COEX_DEFAULT, - CFG_ENABLE_LTE_COEX_MIN, - CFG_ENABLE_LTE_COEX_MAX), - #ifdef FEATURE_WLAN_DYNAMIC_CVM REG_VARIABLE(CFG_VC_MODE_BITMAP, WLAN_PARAM_HexInteger, struct hdd_config, vc_mode_cfg_bitmap, @@ -655,13 +648,6 @@ struct reg_table_entry g_registry_table[] = { CFG_DISABLE_PACKET_FILTER_MIN, CFG_DISABLE_PACKET_FILTER_MAX), - REG_VARIABLE(CFG_BEACON_INTERVAL_NAME, WLAN_PARAM_Integer, - struct hdd_config, nBeaconInterval, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, - CFG_BEACON_INTERVAL_DEFAULT, - CFG_BEACON_INTERVAL_MIN, - CFG_BEACON_INTERVAL_MAX), - REG_VARIABLE(CFG_VCC_RSSI_TRIGGER_NAME, WLAN_PARAM_Integer, struct hdd_config, nVccRssiTrigger, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -1443,13 +1429,6 @@ struct reg_table_entry g_registry_table[] = { CFG_QOS_WMM_TS_INFO_ACK_POLICY_MIN, CFG_QOS_WMM_TS_INFO_ACK_POLICY_MAX), - REG_VARIABLE(CFG_TELE_BCN_WAKEUP_EN_NAME, WLAN_PARAM_Integer, - struct hdd_config, teleBcnWakeupEn, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_TELE_BCN_WAKEUP_EN_DEFAULT, - CFG_TELE_BCN_WAKEUP_EN_MIN, - CFG_TELE_BCN_WAKEUP_EN_MAX), - REG_VARIABLE(CFG_STA_KEEPALIVE_METHOD_NAME, WLAN_PARAM_Integer, struct hdd_config, sta_keepalive_method, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -1642,13 +1621,6 @@ struct reg_table_entry g_registry_table[] = { CFG_ENABLE_MTRACE_MAX), #endif - REG_VARIABLE(CFG_TELE_BCN_MAX_LI_NAME, WLAN_PARAM_Integer, - struct hdd_config, nTeleBcnMaxListenInterval, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_TELE_BCN_MAX_LI_DEFAULT, - CFG_TELE_BCN_MAX_LI_MIN, - CFG_TELE_BCN_MAX_LI_MAX), - REG_VARIABLE(CFG_ENABLE_BYPASS_11D_NAME, WLAN_PARAM_Integer, struct hdd_config, enableBypass11d, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -1970,34 +1942,6 @@ struct reg_table_entry g_registry_table[] = { CFG_DISABLE_DFS_JAPAN_W53_MAX, ch_notify_set_g_disable_dfs_japan_w53, 0), - REG_VARIABLE(CFG_SAP_GET_PEER_INFO, WLAN_PARAM_Integer, - struct hdd_config, sap_get_peer_info, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SAP_GET_PEER_INFO_DEFAULT, - CFG_SAP_GET_PEER_INFO_MIN, - CFG_SAP_GET_PEER_INFO_MAX), - - REG_VARIABLE(CFG_RATE_FOR_TX_MGMT, WLAN_PARAM_HexInteger, - struct hdd_config, rate_for_tx_mgmt, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_RATE_FOR_TX_MGMT_DEFAULT, - CFG_RATE_FOR_TX_MGMT_MIN, - CFG_RATE_FOR_TX_MGMT_MAX), - - REG_VARIABLE(CFG_RATE_FOR_TX_MGMT_2G, WLAN_PARAM_HexInteger, - struct hdd_config, rate_for_tx_mgmt_2g, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_RATE_FOR_TX_MGMT_2G_DEFAULT, - CFG_RATE_FOR_TX_MGMT_2G_MIN, - CFG_RATE_FOR_TX_MGMT_2G_MAX), - - REG_VARIABLE(CFG_RATE_FOR_TX_MGMT_5G, WLAN_PARAM_HexInteger, - struct hdd_config, rate_for_tx_mgmt_5g, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_RATE_FOR_TX_MGMT_5G_DEFAULT, - CFG_RATE_FOR_TX_MGMT_5G_MIN, - CFG_RATE_FOR_TX_MGMT_5G_MAX), - REG_VARIABLE(CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME, WLAN_PARAM_Integer, struct hdd_config, enableFirstScan2GOnly, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2111,13 +2055,6 @@ struct reg_table_entry g_registry_table[] = { CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MIN, CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MAX), - REG_VARIABLE(CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_NAME, WLAN_PARAM_Integer, - struct hdd_config, sapAllowAllChannel, - VAR_FLAGS_OPTIONAL, - CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_DEFAULT, - CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_MIN, - CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_MAX), - REG_VARIABLE(CFG_DISABLE_LDPC_WITH_TXBF_AP, WLAN_PARAM_Integer, struct hdd_config, disableLDPCWithTxbfAP, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2309,13 +2246,6 @@ struct reg_table_entry g_registry_table[] = { CFG_IBSS_ATIM_WIN_SIZE_MIN, CFG_IBSS_ATIM_WIN_SIZE_MAX), - REG_VARIABLE(CFG_SAP_MAX_NO_PEERS, WLAN_PARAM_Integer, - struct hdd_config, maxNumberOfPeers, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SAP_MAX_NO_PEERS_DEFAULT, - CFG_SAP_MAX_NO_PEERS_MIN, - CFG_SAP_MAX_NO_PEERS_MAX), - REG_VARIABLE(CFG_IBSS_IS_POWER_SAVE_ALLOWED_NAME, WLAN_PARAM_Integer, struct hdd_config, isIbssPowerSaveAllowed, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2572,20 +2502,6 @@ struct reg_table_entry g_registry_table[] = { CFG_INITIAL_SCAN_NO_DFS_CHNL_MIN, CFG_INITIAL_SCAN_NO_DFS_CHNL_MAX), - REG_VARIABLE(CFG_SAP_MAX_OFFLOAD_PEERS, WLAN_PARAM_Integer, - struct hdd_config, apMaxOffloadPeers, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, - CFG_SAP_MAX_OFFLOAD_PEERS_DEFAULT, - CFG_SAP_MAX_OFFLOAD_PEERS_MIN, - CFG_SAP_MAX_OFFLOAD_PEERS_MAX), - - REG_VARIABLE(CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS, WLAN_PARAM_Integer, - struct hdd_config, apMaxOffloadReorderBuffs, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK, - CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_DEFAULT, - CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_MIN, - CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_MAX), - REG_VARIABLE(CFG_ADVERTISE_CONCURRENT_OPERATION_NAME, WLAN_PARAM_Integer, struct hdd_config, advertiseConcurrentOperation, @@ -3694,18 +3610,7 @@ struct reg_table_entry g_registry_table[] = { CFG_RX_WAKELOCK_TIMEOUT_DEFAULT, CFG_RX_WAKELOCK_TIMEOUT_MIN, CFG_RX_WAKELOCK_TIMEOUT_MAX), - REG_VARIABLE(CFG_SAP_CH_SWITCH_BEACON_CNT, WLAN_PARAM_Integer, - struct hdd_config, sap_chanswitch_beacon_cnt, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SAP_CH_SWITCH_BEACON_CNT_DEFAULT, - CFG_SAP_CH_SWITCH_BEACON_CNT_MIN, - CFG_SAP_CH_SWITCH_BEACON_CNT_MAX), - REG_VARIABLE(CFG_SAP_CH_SWITCH_MODE, WLAN_PARAM_Integer, - struct hdd_config, sap_chanswitch_mode, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SAP_CH_SWITCH_MODE_DEFAULT, - CFG_SAP_CH_SWITCH_MODE_MIN, - CFG_SAP_CH_SWITCH_MODE_MAX), + REG_VARIABLE(CFG_MAX_SCHED_SCAN_PLAN_INT_NAME, WLAN_PARAM_Integer, struct hdd_config, max_sched_scan_plan_interval, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -3726,13 +3631,6 @@ struct reg_table_entry g_registry_table[] = { CFG_PRIVATE_WEXT_CONTROL_MIN, CFG_PRIVATE_WEXT_CONTROL_MAX), - REG_VARIABLE(CFG_SAP_INTERNAL_RESTART_NAME, WLAN_PARAM_Integer, - struct hdd_config, sap_internal_restart, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SAP_INTERNAL_RESTART_DEFAULT, - CFG_SAP_INTERNAL_RESTART_MIN, - CFG_SAP_INTERNAL_RESTART_MAX), - REG_VARIABLE(CFG_RESTART_BEACONING_ON_CH_AVOID_NAME, WLAN_PARAM_Integer, struct hdd_config, restart_beaconing_on_chan_avoid_event, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -4084,14 +3982,6 @@ struct reg_table_entry g_registry_table[] = { CFG_SCAN_11D_INTERVAL_MIN, CFG_SCAN_11D_INTERVAL_MAX), - REG_VARIABLE(CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_NAME, - WLAN_PARAM_Integer, - struct hdd_config, chan_switch_hostapd_rate_enabled, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_DEFAULT, - CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_MIN, - CFG_CHAN_SWITCH_HOSTAPD_RATE_ENABLED_MAX), - REG_VARIABLE(CFG_IS_BSSID_HINT_PRIORITY_NAME, WLAN_PARAM_Integer, struct hdd_config, is_bssid_hint_priority, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -4165,13 +4055,6 @@ struct reg_table_entry g_registry_table[] = { CFG_DFS_BEACON_TX_ENHANCED_MIN, CFG_DFS_BEACON_TX_ENHANCED_MAX), - REG_VARIABLE(CFG_REDUCED_BEACON_INTERVAL, WLAN_PARAM_Integer, - struct hdd_config, reduced_beacon_interval, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_REDUCED_BEACON_INTERVAL_DEFAULT, - CFG_REDUCED_BEACON_INTERVAL_MIN, - CFG_REDUCED_BEACON_INTERVAL_MAX), - REG_VARIABLE(CFG_OCE_ENABLE_RSSI_BASED_ASSOC_REJECT_NAME, WLAN_PARAM_Integer, struct hdd_config, rssi_assoc_reject_enabled, @@ -5158,8 +5041,8 @@ static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx) * Make sure CFG is updated because PE reads this * from CFG at the time of assoc or reassoc */ - sme_cfg_set_int(hdd_ctx->mac_handle, WNI_CFG_LISTEN_INTERVAL, - listenInterval); + ucfg_mlme_set_sap_listen_interval(hdd_ctx->hdd_psoc, + listenInterval); } } @@ -5906,12 +5789,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) hdd_err("Couldn't pass on WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME to CFG"); } - if (sme_cfg_set_int(mac_handle, WNI_CFG_BEACON_INTERVAL, - config->nBeaconInterval) == QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_BEACON_INTERVAL to CFG"); - } - if (sme_cfg_set_int(mac_handle, WNI_CFG_MAX_PS_POLL, config->nMaxPsPoll) == QDF_STATUS_E_FAILURE) { status = false; @@ -5931,11 +5808,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) hdd_err("Fail to pass WNI_CFG_PS_WOW_DATA_INACTIVITY_TO CFG"); } - if (sme_cfg_set_int(mac_handle, WNI_CFG_ENABLE_LTE_COEX, - config->enableLTECoex) == QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_ENABLE_LTE_COEX to CFG"); - } if (sme_cfg_set_int(mac_handle, WNI_CFG_AP_KEEP_ALIVE_TIMEOUT, config->apKeepAlivePeriod) == QDF_STATUS_E_FAILURE) { @@ -5949,19 +5821,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) hdd_err("Couldn't pass on WNI_CFG_AP_LINK_MONITOR_TIMEOUT to CFG"); } - if (sme_cfg_set_int(mac_handle, WNI_CFG_TELE_BCN_WAKEUP_EN, - config->teleBcnWakeupEn) == QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_TELE_BCN_WAKEUP_EN to CFG"); - } - - if (sme_cfg_set_int(mac_handle, WNI_CFG_TELE_BCN_MAX_LI, - config->nTeleBcnMaxListenInterval) == - QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_TELE_BCN_MAX_LI to CFG"); - } - if (sme_cfg_set_int(mac_handle, WNI_CFG_FRAGMENTATION_THRESHOLD, config->FragmentationThreshold) == QDF_STATUS_E_FAILURE) { status = false; @@ -6033,34 +5892,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) hdd_err("Couldn't pass on WNI_CFG_IBSS_ATIM_WIN_SIZE to CFG"); } - if (sme_cfg_set_int(mac_handle, WNI_CFG_RATE_FOR_TX_MGMT, - config->rate_for_tx_mgmt) == - QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_RATE_FOR_TX_MGMT to CCM"); - } - - if (sme_cfg_set_int(mac_handle, WNI_CFG_RATE_FOR_TX_MGMT_2G, - config->rate_for_tx_mgmt_2g) == - QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_RATE_FOR_TX_MGMT_2G to CCM"); - } - - if (sme_cfg_set_int(mac_handle, WNI_CFG_RATE_FOR_TX_MGMT_5G, - config->rate_for_tx_mgmt_5g) == - QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_RATE_FOR_TX_MGMT_5G to CCM"); - } - - if (sme_cfg_set_int(mac_handle, WNI_CFG_ASSOC_STA_LIMIT, - config->maxNumberOfPeers) == - QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_ASSOC_STA_LIMIT to CFG"); - } - return status; } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 8e4dd0b930..c65bc53dad 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -125,6 +125,7 @@ #include "wlan_crypto_global_api.h" #include "wlan_nl_to_crypto_params.h" #include "wlan_crypto_global_def.h" +#include "cfg_ucfg_api.h" #define g_mode_rates_size (12) #define a_mode_rates_size (8) @@ -12238,8 +12239,6 @@ int wlan_hdd_cfg80211_init(struct device *dev, if (pCfg->enableDFSMasterCap) wlan_hdd_cfg80211_set_dfs_offload_feature(wiphy); - wiphy->max_ap_assoc_sta = pCfg->maxNumberOfPeers; - #ifdef QCA_HT_2040_COEX wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE; #endif @@ -12352,8 +12351,10 @@ static void wlan_hdd_update_ht_cap(struct hdd_context *hdd_ctx) */ void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx) { - hdd_ctx->wiphy->max_ap_assoc_sta = hdd_ctx->config->maxNumberOfPeers; + int value; + ucfg_mlme_get_sap_max_peers(hdd_ctx->hdd_psoc, &value); + hdd_ctx->wiphy->max_ap_assoc_sta = value; wlan_hdd_update_ht_cap(hdd_ctx); } @@ -12657,12 +12658,17 @@ QDF_STATUS wlan_hdd_validate_operation_channel(struct hdd_adapter *adapter, u32 indx = 0; mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter); uint8_t fValidChannel = false, count = 0; - struct hdd_config *hdd_pConfig_ini = - (WLAN_HDD_GET_CTX(adapter))->config; + QDF_STATUS status; + bool value; + struct hdd_context *hdd_ctx; num_ch = WNI_CFG_VALID_CHANNEL_LIST_LEN; - - if (hdd_pConfig_ini->sapAllowAllChannel) { + hdd_ctx = WLAN_HDD_GET_CTX(adapter); + status = ucfg_mlme_get_sap_allow_all_channels(hdd_ctx->hdd_psoc, + &value); + if (status != QDF_STATUS_SUCCESS) + hdd_err("Unable to fetch sap allow all channels"); + if (value) { /* Validate the channel */ for (count = CHAN_ENUM_1; count <= CHAN_ENUM_173; count++) { if (channel == WLAN_REG_CH_NUM(count)) { @@ -17243,14 +17249,12 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, } qdf_copy_macaddr(&bssid, &hdd_ctx->config->IbssBssid); } - if ((params->beacon_interval > CFG_BEACON_INTERVAL_MIN) - && (params->beacon_interval <= CFG_BEACON_INTERVAL_MAX)) + + if (cfg_in_range(CFG_BEACON_INTERVAL, params->beacon_interval)) roam_profile->beaconInterval = params->beacon_interval; - else { - roam_profile->beaconInterval = CFG_BEACON_INTERVAL_DEFAULT; - hdd_debug("input beacon interval %d TU is invalid, use default %d TU", - params->beacon_interval, roam_profile->beaconInterval); - } + else + roam_profile->beaconInterval = cfg_get(hdd_ctx->hdd_psoc, + CFG_BEACON_INTERVAL); /* Set Channel */ if (channelNum) { diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 40918e5268..21cf2f83dd 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -4508,6 +4508,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, enum dfs_mode mode; struct hdd_adapter *sta_adapter; uint8_t ignore_cac = 0; + int value; + bool val; hdd_enter(); @@ -4614,9 +4616,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, pConfig->auto_channel_select_weight = iniConfig->auto_channel_select_weight; pConfig->disableDFSChSwitch = iniConfig->disableDFSChSwitch; - pConfig->sap_chanswitch_beacon_cnt = - iniConfig->sap_chanswitch_beacon_cnt; - pConfig->sap_chanswitch_mode = iniConfig->sap_chanswitch_mode; + ucfg_mlme_get_sap_chn_switch_bcn_count(hdd_ctx->hdd_psoc, &value); + pConfig->sap_chanswitch_beacon_cnt = value; + ucfg_mlme_get_sap_channel_switch_mode(hdd_ctx->hdd_psoc, &val); + pConfig->sap_chanswitch_mode = val; /* channel is already set in the set_channel Call back */ /* pConfig->channel = pCommitConfig->channel; */ @@ -4624,19 +4627,20 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, /* Protection parameter to enable or disable */ pConfig->protEnabled = iniConfig->apProtEnabled; - pConfig->chan_switch_hostapd_rate_enabled = - iniConfig->chan_switch_hostapd_rate_enabled; + ucfg_mlme_get_sap_chan_switch_rate_enabled(hdd_ctx->hdd_psoc, &val); + pConfig->chan_switch_hostapd_rate_enabled = val; if (iniConfig->WlanMccToSccSwitchMode != QDF_MCC_TO_SCC_SWITCH_DISABLE) { pConfig->chan_switch_hostapd_rate_enabled = false; } - pConfig->enOverLapCh = iniConfig->gEnableOverLapCh; + + ucfg_mlme_get_sap_reduces_beacon_interval(hdd_ctx->hdd_psoc, &value); pConfig->dtim_period = pBeacon->dtim_period; pConfig->dfs_beacon_tx_enhanced = iniConfig->dfs_beacon_tx_enhanced; - pConfig->reduced_beacon_interval = - iniConfig->reduced_beacon_interval; + + pConfig->reduced_beacon_interval = value; hdd_debug("acs_mode %d", pConfig->acs_cfg.acs_mode); if (pConfig->acs_cfg.acs_mode == true) { diff --git a/core/hdd/src/wlan_hdd_hostapd_wext.c b/core/hdd/src/wlan_hdd_hostapd_wext.c index 0d04a1441e..b92854773e 100644 --- a/core/hdd/src/wlan_hdd_hostapd_wext.c +++ b/core/hdd/src/wlan_hdd_hostapd_wext.c @@ -39,6 +39,7 @@ #include "wlan_dfs_utils_api.h" #include #include +#include "wlan_mlme_ucfg_api.h" #define IS_UP(_dev) \ (((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP)) @@ -540,14 +541,13 @@ static __iw_softap_setparam(struct net_device *dev, hdd_warn("Setting it to max allowed and continuing"); set_value = WNI_CFG_ASSOC_STA_LIMIT_STAMAX; } - status = sme_cfg_set_int(mac_handle, - WNI_CFG_ASSOC_STA_LIMIT, - set_value); - if (status != QDF_STATUS_SUCCESS) { - hdd_err("setMaxAssoc failure, status: %d", - status); + if (ucfg_mlme_set_assoc_sta_limit(hdd_ctx->hdd_psoc, + set_value) != + QDF_STATUS_SUCCESS) { + hdd_err("CFG_ASSOC_STA_LIMIT failed"); ret = -EIO; } + } break; @@ -1205,7 +1205,6 @@ static __iw_softap_getparam(struct net_device *dev, struct hdd_adapter *adapter = (netdev_priv(dev)); int *value = (int *)extra; int sub_cmd = value[0]; - QDF_STATUS status; int ret; struct hdd_context *hdd_ctx; @@ -1222,14 +1221,12 @@ static __iw_softap_getparam(struct net_device *dev, switch (sub_cmd) { case QCSAP_PARAM_MAX_ASSOC: - status = sme_cfg_get_int(hdd_ctx->mac_handle, - WNI_CFG_ASSOC_STA_LIMIT, - (uint32_t *)value); - if (QDF_STATUS_SUCCESS != status) { - hdd_err("get WNI_CFG_ASSOC_STA_LIMIT failed status: %d", - status); + if (ucfg_mlme_set_assoc_sta_limit(hdd_ctx->hdd_psoc, *value) != + QDF_STATUS_SUCCESS) { + hdd_err("CFG_ASSOC_STA_LIMIT failed"); ret = -EIO; } + break; case QCSAP_PARAM_GET_WLAN_DBG: diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 24dfc820ea..fbc31d9c10 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -5109,11 +5109,10 @@ static int drv_cmd_set_rmc_action_period(struct hdd_adapter *adapter, hdd_debug("uActionPeriod %d", uActionPeriod); mac_handle = hdd_ctx->mac_handle; - if (sme_cfg_set_int(mac_handle, - WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY, - uActionPeriod)) { - hdd_err("Could not set SETRMCACTIONPERIOD %d", - uActionPeriod); + if (ucfg_mlme_set_rmc_action_period_freq(hdd_ctx->hdd_psoc, + uActionPeriod) != + QDF_STATUS_SUCCESS) { + hdd_err("Could not set SETRMCACTIONPERIOD %d", uActionPeriod); ret = -EINVAL; goto exit; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a9884c3835..bb69b99135 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1219,6 +1219,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx, bool tdls_off_channel; bool tdls_buffer_sta; uint32_t tdls_uapsd_mask; + bool value; #endif /* Set up UAPSD */ config->apUapsdEnabled &= cfg->uapsd; @@ -1264,11 +1265,14 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx, cfg_tdls_set_sleep_sta_enable(hdd_ctx->hdd_psoc, false); #endif hdd_update_roam_offload(hdd_ctx, cfg); - config->sap_get_peer_info &= cfg->get_peer_info_enabled; + + if (ucfg_mlme_get_sap_get_peer_info(hdd_ctx->hdd_psoc, &value) == + QDF_STATUS_SUCCESS) + value &= cfg->get_peer_info_enabled; + config->MAWCEnabled &= cfg->is_fw_mawc_capable; hdd_update_tdls_config(hdd_ctx); sme_update_tgt_services(hdd_ctx->mac_handle, cfg); - } /** @@ -2910,13 +2914,6 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) hdd_update_ipa_component_config(hdd_ctx); - ret = hdd_update_config(hdd_ctx); - if (ret) { - hdd_err("Failed to update configuration; errno: %d", - ret); - goto cds_free; - } - hdd_update_cds_ac_specs_params(hdd_ctx); status = hdd_component_psoc_open(hdd_ctx->hdd_psoc); @@ -2924,7 +2921,14 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit) hdd_err("Failed to Open legacy components; status: %d", status); ret = qdf_status_to_os_return(status); - goto deinit_config; + goto cds_free; + } + + ret = hdd_update_config(hdd_ctx); + if (ret) { + hdd_err("Failed to update configuration; errno: %d", + ret); + goto cds_free; } status = wbuff_module_init(); @@ -3035,8 +3039,6 @@ close: hdd_psoc_close: hdd_component_psoc_close(hdd_ctx->hdd_psoc); - -deinit_config: cds_deinit_ini_config(); cds_free: @@ -5406,6 +5408,7 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx) struct hdd_station_ctx *sta_ctx; struct qdf_mac_addr peerMacAddr; int sta_id; + bool value; hdd_enter(); @@ -5422,8 +5425,8 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx) hdd_notify_tdls_reset_adapter(adapter->vdev); adapter->session.station.hdd_reassoc_scenario = false; } - - if (hdd_ctx->config->sap_internal_restart && + ucfg_mlme_get_sap_internal_restart(hdd_ctx->hdd_psoc, &value); + if (value && adapter->device_mode == QDF_SAP_MODE) { wlan_hdd_netif_queue_control(adapter, WLAN_STOP_ALL_NETIF_QUEUE, @@ -6172,6 +6175,7 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx) { struct hdd_adapter *adapter; eConnectionState connState; + bool value; hdd_enter(); @@ -6240,7 +6244,9 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx) break; case QDF_SAP_MODE: - if (hdd_ctx->config->sap_internal_restart) + ucfg_mlme_get_sap_internal_restart(hdd_ctx->hdd_psoc, + &value); + if (value) hdd_start_ap_adapter(adapter); break; @@ -8423,6 +8429,7 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt) uint32_t i; bool found = false; uint8_t restart_chan; + bool value; hdd_for_each_adapter(hdd_ctxt, adapter) { if (!(adapter->device_mode == QDF_SAP_MODE && @@ -8483,9 +8490,10 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt) hdd_debug("sending coex indication"); wlan_hdd_send_svc_nlink_msg(hdd_ctxt->radio_index, WLAN_SVC_LTE_COEX_IND, NULL, 0); - hdd_debug("driver to start sap: %d", - hdd_ctxt->config->sap_internal_restart); - if (hdd_ctxt->config->sap_internal_restart) + ucfg_mlme_get_sap_internal_restart(hdd_ctxt->hdd_psoc, + &value); + hdd_debug("driver to start sap: %d", value); + if (value) hdd_switch_sap_channel(adapter, restart_chan, true); else @@ -9441,6 +9449,7 @@ static inline void hdd_ra_populate_cds_config(struct cds_config_info *cds_cfg, static int hdd_update_cds_config(struct hdd_context *hdd_ctx) { struct cds_config_info *cds_cfg; + int value; cds_cfg = (struct cds_config_info *)qdf_mem_malloc(sizeof(*cds_cfg)); if (!cds_cfg) { @@ -9485,10 +9494,13 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) hdd_ctx->config->crash_inject_enabled; cds_cfg->enable_mc_list = hdd_ctx->config->fEnableMCAddrList; - cds_cfg->ap_maxoffload_peers = hdd_ctx->config->apMaxOffloadPeers; - cds_cfg->ap_maxoffload_reorderbuffs = - hdd_ctx->config->apMaxOffloadReorderBuffs; + ucfg_mlme_get_sap_max_offload_peers(hdd_ctx->hdd_psoc, + &value); + cds_cfg->ap_maxoffload_peers = value; + ucfg_mlme_get_sap_max_offload_reorder_buffs(hdd_ctx->hdd_psoc, + &value); + cds_cfg->ap_maxoffload_reorderbuffs = value; cds_cfg->ap_disable_intrabss_fwd = hdd_ctx->config->apDisableIntraBssFwd; @@ -9544,7 +9556,8 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) cds_cfg->apf_packet_filter_enable = hdd_ctx->config->apf_packet_filter_enable; cds_cfg->self_gen_frm_pwr = hdd_ctx->config->self_gen_frm_pwr; - cds_cfg->max_station = hdd_ctx->config->maxNumberOfPeers; + ucfg_mlme_get_sap_max_peers(hdd_ctx->hdd_psoc, &value); + cds_cfg->max_station = value; cds_cfg->sub_20_channel_width = WLAN_SUB_20_CH_WIDTH_NONE; cds_cfg->flow_steering_enabled = hdd_ctx->config->flow_steering_enable; cds_cfg->max_msdus_per_rxinorderind = @@ -10686,6 +10699,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx) uint16_t num_11b_tx_chains = 0; uint16_t num_11ag_tx_chains = 0; struct policy_mgr_dp_cbacks dp_cbs = {0}; + bool value; mac_handle = hdd_ctx->mac_handle; @@ -10711,8 +10725,9 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx) set_value, PDEV_CMD); } - if (hdd_ctx->config->sap_get_peer_info) { - set_value = hdd_ctx->config->sap_get_peer_info; + ucfg_mlme_get_sap_get_peer_info(hdd_ctx->hdd_psoc, &value); + if (value) { + set_value = value; sme_cli_set_command(0, (int)WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, set_value, PDEV_CMD); diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index db1d00013f..fcc98c5bd3 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1316,6 +1316,7 @@ QDF_STATUS hdd_wlan_re_init(void) struct hdd_adapter *adapter; int ret; bool bug_on_reinit_failure = CFG_BUG_ON_REINIT_FAILURE_DEFAULT; + bool value; hdd_prevent_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT); @@ -1366,7 +1367,8 @@ QDF_STATUS hdd_wlan_re_init(void) hdd_send_default_scan_ies(hdd_ctx); hdd_info("WLAN host driver reinitiation completed!"); - if (hdd_ctx->config->sap_internal_restart) + ucfg_mlme_get_sap_internal_restart(hdd_ctx->hdd_psoc, &value); + if (value) hdd_ssr_restart_sap(hdd_ctx); hdd_wlan_ssr_reinit_event(); diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index e3f71d0e46..b43179c453 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -32,6 +32,7 @@ #include #include #include +#include "wlan_mlme_ucfg_api.h" /* * define short names for the global vendor params @@ -996,6 +997,8 @@ static int hdd_get_connected_station_info(struct hdd_context *hdd_ctx, uint32_t nl_buf_len; struct sir_peer_info_ext peer_info; bool txrx_rate = true; + bool value; + QDF_STATUS status; nl_buf_len = NLMSG_HDRLEN; nl_buf_len += (sizeof(stainfo->max_phy_rate) + NLA_HDRLEN) + @@ -1006,7 +1009,10 @@ static int hdd_get_connected_station_info(struct hdd_context *hdd_ctx, (sizeof(stainfo->is_qos_enabled) + NLA_HDRLEN) + (sizeof(stainfo->mode) + NLA_HDRLEN); - if (!hdd_ctx->config->sap_get_peer_info || + status = ucfg_mlme_get_sap_get_peer_info(hdd_ctx->hdd_psoc, &value); + if (status != QDF_STATUS_SUCCESS) + hdd_err("Unable to fetch sap ger peer info"); + if (!value || wlan_hdd_get_peer_info(adapter, mac_addr, &peer_info)) { hdd_err("fail to get tx/rx rate"); txrx_rate = false; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 017b2f0b22..8b730b1404 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -4178,13 +4178,9 @@ static int __iw_setint_getnone(struct net_device *dev, if (!mac_handle) return -EINVAL; - if ((WNI_CFG_ASSOC_STA_LIMIT_STAMIN > set_value) || - (WNI_CFG_ASSOC_STA_LIMIT_STAMAX < set_value)) { - ret = -EINVAL; - } else if (sme_cfg_set_int(mac_handle, WNI_CFG_ASSOC_STA_LIMIT, - set_value) + if (ucfg_mlme_set_assoc_sta_limit(hdd_ctx->hdd_psoc, set_value) != QDF_STATUS_SUCCESS) { - hdd_err("WNI_CFG_ASSOC_STA_LIMIT failed"); + hdd_err("CFG_ASSOC_STA_LIMIT failed"); ret = -EIO; } break; @@ -5531,11 +5527,12 @@ static int __iw_setnone_getint(struct net_device *dev, } case WE_GET_MAX_ASSOC: { - if (sme_cfg_get_int(mac_handle, WNI_CFG_ASSOC_STA_LIMIT, - (uint32_t *) value) != QDF_STATUS_SUCCESS) { - hdd_err("WNI_CFG_ASSOC_STA_LIMIT failed"); + if (ucfg_mlme_set_assoc_sta_limit(hdd_ctx->hdd_psoc, *value) != + QDF_STATUS_SUCCESS) { + hdd_err("CFG_ASSOC_STA_LIMIT failed"); ret = -EIO; } + break; } diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index ab23fbcf2a..4ab9caf91f 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -421,7 +421,6 @@ typedef struct sAniSirLim { /* / Variable to keep track of number of currently associated STAs */ uint16_t gLimNumOfAniSTAs; /* count of ANI peers */ - uint16_t gLimAssocStaLimit; /* Heart-Beat interval value */ uint32_t gLimHeartBeatCount; diff --git a/core/mac/src/pe/lim/lim_aid_mgmt.c b/core/mac/src/pe/lim/lim_aid_mgmt.c index 8308724135..3414c9b985 100644 --- a/core/mac/src/pe/lim/lim_aid_mgmt.c +++ b/core/mac/src/pe/lim/lim_aid_mgmt.c @@ -115,7 +115,8 @@ uint16_t lim_assign_peer_idx(tpAniSirGlobal pMac, tpPESession pSessionEntry) /* make sure we haven't exceeded the configurable limit on associations */ /* This count is global to ensure that it doesn't exceed the hardware limits. */ - if (pe_get_current_stas_count(pMac) >= pMac->lim.gLimAssocStaLimit) { + if (pe_get_current_stas_count(pMac) >= + pMac->mlme_cfg->sap_cfg.assoc_sta_limit) { /* too many associations already active */ return 0; } diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 26f5e114a5..5a7fe2b371 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -207,7 +207,6 @@ static void __lim_init_vars(tpAniSirGlobal pMac) static void __lim_init_assoc_vars(tpAniSirGlobal pMac) { - pMac->lim.gLimAssocStaLimit = 0; pMac->lim.gLimIbssStaLimit = 0; /* Place holder for current authentication request */ /* being handled */ @@ -280,13 +279,7 @@ static QDF_STATUS __lim_init_config(tpAniSirGlobal pMac) * and they will be used throughout when there is no session */ - if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val1) - != QDF_STATUS_SUCCESS){ - pe_err("cfg get assoc sta limit failed"); - return QDF_STATUS_E_FAILURE; - } - - pMac->lim.gLimAssocStaLimit = val1; + val1 = pMac->mlme_cfg->sap_cfg.assoc_sta_limit; pMac->lim.gLimIbssStaLimit = val1; ht_cap_info = &pMac->mlme_cfg->ht_caps.ht_cap_info; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index f9d56f329c..4b3f37afa9 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2899,10 +2899,7 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta, pAddStaParams->vhtLdpcCapable = ((psessionEntry->txLdpcIniFeatureEnabled >> 1) & 0x01); - if (wlan_cfg_get_int(pMac, WNI_CFG_LISTEN_INTERVAL, &listenInterval) != - QDF_STATUS_SUCCESS) - pe_err("Couldn't get LISTEN_INTERVAL"); - + listenInterval = pMac->mlme_cfg->sap_cfg.listen_interval; pAddStaParams->listenInterval = (uint16_t) listenInterval; if (QDF_P2P_CLIENT_MODE == psessionEntry->pePersona) { @@ -3798,9 +3795,8 @@ QDF_STATUS lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, qdf_mem_copy(pAddBssParams->staContext.bssId, bssDescription->bssId, sizeof(tSirMacAddr)); - if (wlan_cfg_get_int(pMac, WNI_CFG_LISTEN_INTERVAL, &listen_interval) != - QDF_STATUS_SUCCESS) - pe_err("Couldn't get LISTEN_INTERVAL"); + + listen_interval = pMac->mlme_cfg->sap_cfg.listen_interval; pAddBssParams->staContext.listenInterval = listen_interval; /* Fill Assoc id from the dph table */ @@ -4364,9 +4360,8 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t updateEnt qdf_mem_copy(pAddBssParams->staContext.bssId, bssDescription->bssId, sizeof(tSirMacAddr)); - if (wlan_cfg_get_int(pMac, WNI_CFG_LISTEN_INTERVAL, &listen_interval) != - QDF_STATUS_SUCCESS) - pe_err("Couldn't get LISTEN_INTERVAL"); + + listen_interval = pMac->mlme_cfg->sap_cfg.listen_interval; pAddBssParams->staContext.listenInterval = listen_interval; pAddBssParams->staContext.assocId = 0; pAddBssParams->staContext.uAPSD = 0; diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index 7ae726472a..169c2cd688 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -736,12 +736,7 @@ static bool lim_chk_is_11b_sta_supported(tpAniSirGlobal mac_ctx, uint32_t cfg_11g_only; if (phy_mode == WNI_CFG_PHY_MODE_11G) { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11G_ONLY_POLICY, - &cfg_11g_only) != QDF_STATUS_SUCCESS) { - pe_err("couldn't get 11g-only flag"); - return false; - } - + cfg_11g_only = mac_ctx->mlme_cfg->sap_cfg.sap_11g_policy; if (!assoc_req->extendedRatesPresent && cfg_11g_only) { /* * Received Re/Association Request from 11b STA when 11g @@ -1009,7 +1004,7 @@ static bool lim_process_assoc_req_no_sta_ctx(tpAniSirGlobal mac_ctx, { /* Requesting STA is not currently associated */ if (pe_get_current_stas_count(mac_ctx) == - mac_ctx->lim.gLimAssocStaLimit) { + mac_ctx->mlme_cfg->sap_cfg.assoc_sta_limit) { /* * Maximum number of STAs that AP can handle reached. * Send Association response to peer MAC entity diff --git a/core/mac/src/pe/lim/lim_process_cfg_updates.c b/core/mac/src/pe/lim/lim_process_cfg_updates.c index e421c93443..95ea06f6c7 100644 --- a/core/mac/src/pe/lim/lim_process_cfg_updates.c +++ b/core/mac/src/pe/lim/lim_process_cfg_updates.c @@ -234,14 +234,6 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId) } break; - case WNI_CFG_ASSOC_STA_LIMIT: - if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val1) != - QDF_STATUS_SUCCESS) { - pe_err("Unable to get WNI_CFG_ASSOC_STA_LIMIT"); - break; - } - pMac->lim.gLimAssocStaLimit = (uint16_t) val1; - break; default: break; } @@ -366,10 +358,5 @@ static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry) pe_err("cfg get 11d enabled failed"); psessionEntry->lim11dEnabled = (val) ? 1 : 0; - if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val) != QDF_STATUS_SUCCESS) { - pe_err("cfg get assoc sta limit failed"); - } - pMac->lim.gLimAssocStaLimit = (uint16_t) val; - pe_debug("Updated Lim shadow state based on CFG"); } diff --git a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c index 586409b765..b8303a28fe 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c +++ b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c @@ -522,9 +522,7 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac, psessionEntry); } - if (wlan_cfg_get_int(pMac, WNI_CFG_LISTEN_INTERVAL, &listenInterval) != - QDF_STATUS_SUCCESS) - pe_err("Couldn't get LISTEN_INTERVAL"); + listenInterval = pMac->mlme_cfg->sap_cfg.listen_interval; pAddStaParams->listenInterval = (uint16_t) listenInterval; wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &selfStaDot11Mode); @@ -660,38 +658,14 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, pMlmReassocReq->sessionId = psessionEntry->peSessionId; /* If telescopic beaconing is enabled, set listen interval - to WNI_CFG_TELE_BCN_MAX_LI + to CFG_TELE_BCN_MAX_LI */ - if (wlan_cfg_get_int(pMac, WNI_CFG_TELE_BCN_WAKEUP_EN, &teleBcnEn) != - QDF_STATUS_SUCCESS) { - pe_err("Couldn't get WNI_CFG_TELE_BCN_WAKEUP_EN"); - qdf_mem_free(pMlmReassocReq); - return; - } + teleBcnEn = pMac->mlme_cfg->sap_cfg.tele_bcn_wakeup_en; + if (teleBcnEn) + val = pMac->mlme_cfg->sap_cfg.tele_bcn_max_li; + else + val = pMac->mlme_cfg->sap_cfg.listen_interval; - if (teleBcnEn) { - if (wlan_cfg_get_int(pMac, WNI_CFG_TELE_BCN_MAX_LI, &val) != - QDF_STATUS_SUCCESS) { - /** - * Could not get ListenInterval value - * from CFG. Log error. - */ - pe_err("could not retrieve ListenInterval"); - qdf_mem_free(pMlmReassocReq); - return; - } - } else { - if (wlan_cfg_get_int(pMac, WNI_CFG_LISTEN_INTERVAL, &val) != - QDF_STATUS_SUCCESS) { - /** - * Could not get ListenInterval value - * from CFG. Log error. - */ - pe_err("could not retrieve ListenInterval"); - qdf_mem_free(pMlmReassocReq); - return; - } - } if (lim_set_link_state (pMac, eSIR_LINK_PREASSOC_STATE, psessionEntry->bssId, psessionEntry->selfMacAddr, NULL, NULL) != QDF_STATUS_SUCCESS) { diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index f9f4330146..0184c4cbe5 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -346,9 +346,7 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param, /* Configuration related parameters to be changed to support BT-AMP */ - if (QDF_STATUS_SUCCESS != wlan_cfg_get_int(mac_ctx, WNI_CFG_LISTEN_INTERVAL, - &val)) - pe_warn("Couldn't get LISTEN_INTERVAL"); + val = mac_ctx->mlme_cfg->sap_cfg.listen_interval; sta_param->listenInterval = (uint16_t) val; if (QDF_STATUS_SUCCESS != wlan_cfg_get_int(mac_ctx, WNI_CFG_SHORT_PREAMBLE, diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index 9b7003e313..020bfee3be 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -401,22 +401,14 @@ static void lim_send_mlm_assoc_req(tpAniSirGlobal mac_ctx, /* * If telescopic beaconing is enabled, set listen interval to - * WNI_CFG_TELE_BCN_MAX_LI + * CFG_TELE_BCN_MAX_LI */ - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_TELE_BCN_WAKEUP_EN, &tele_bcn) - != QDF_STATUS_SUCCESS) - pe_err("Couldn't get WNI_CFG_TELE_BCN_WAKEUP_EN"); + tele_bcn = mac_ctx->mlme_cfg->sap_cfg.tele_bcn_wakeup_en; + if (tele_bcn) + val = mac_ctx->mlme_cfg->sap_cfg.tele_bcn_max_li; + else + val = mac_ctx->mlme_cfg->sap_cfg.listen_interval; - val = WNI_CFG_LISTEN_INTERVAL_STADEF; - if (tele_bcn) { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_TELE_BCN_MAX_LI, &val) != - QDF_STATUS_SUCCESS) - pe_err("could not retrieve ListenInterval"); - } else { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_LISTEN_INTERVAL, - &val) != QDF_STATUS_SUCCESS) - pe_err("could not retrieve ListenInterval"); - } #ifdef FEATURE_WLAN_DIAG_SUPPORT lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_ASSOC_REQ_EVENT, session_entry, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS); @@ -2121,11 +2113,11 @@ static void lim_process_ap_mlm_add_bss_rsp(tpAniSirGlobal pMac, || (psessionEntry->gStartBssWPAIe.present)) pe_debug("WPA/WPA2 SAP configuration"); else { - if (pMac->lim.gLimAssocStaLimit > + if (pMac->mlme_cfg->sap_cfg.assoc_sta_limit > MAX_SUPPORTED_PEERS_WEP) { pe_debug("WEP SAP Configuration"); - pMac->lim.gLimAssocStaLimit = - MAX_SUPPORTED_PEERS_WEP; + pMac->mlme_cfg->sap_cfg.assoc_sta_limit + = MAX_SUPPORTED_PEERS_WEP; isWepEnabled = true; } } @@ -2145,9 +2137,11 @@ static void lim_process_ap_mlm_add_bss_rsp(tpAniSirGlobal pMac, /* In lim_apply_configuration gLimAssocStaLimit is assigned from cfg. * So update the value to 16 in case SoftAP is configured in WEP. */ - if ((pMac->lim.gLimAssocStaLimit > MAX_SUPPORTED_PEERS_WEP) + if ((pMac->mlme_cfg->sap_cfg.assoc_sta_limit > + MAX_SUPPORTED_PEERS_WEP) && (isWepEnabled)) - pMac->lim.gLimAssocStaLimit = MAX_SUPPORTED_PEERS_WEP; + pMac->mlme_cfg->sap_cfg.assoc_sta_limit = + MAX_SUPPORTED_PEERS_WEP; psessionEntry->staId = pAddBssParams->staContext.staIdx; mlmStartCnf.resultCode = eSIR_SME_SUCCESS; } else { diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 8f660bb96d..390930237c 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -983,9 +983,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) mlm_start_req->wps_state = session->wps_state; } else { - if (wlan_cfg_get_int(mac_ctx, - WNI_CFG_DTIM_PERIOD, &val) != QDF_STATUS_SUCCESS) - pe_err("could not retrieve DTIM Period"); + val = mac_ctx->mlme_cfg->sap_cfg.dtim_interval; mlm_start_req->dtimPeriod = (uint8_t) val; } @@ -1961,23 +1959,15 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, /* * If telescopic beaconing is enabled, set listen interval to - * WNI_CFG_TELE_BCN_MAX_LI + * CFG_TELE_BCN_MAX_LI */ - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_TELE_BCN_WAKEUP_EN, - &tele_bcn_en) != QDF_STATUS_SUCCESS) - pe_err("Couldn't get WNI_CFG_TELE_BCN_WAKEUP_EN"); - val = WNI_CFG_LISTEN_INTERVAL_STADEF; + tele_bcn_en = mac_ctx->mlme_cfg->sap_cfg.tele_bcn_wakeup_en; - if (tele_bcn_en) { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_TELE_BCN_MAX_LI, &val) != - QDF_STATUS_SUCCESS) - pe_err("could not retrieve ListenInterval"); - } else { - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_LISTEN_INTERVAL, &val) != - QDF_STATUS_SUCCESS) - pe_err("could not retrieve ListenInterval"); - } + if (tele_bcn_en) + val = mac_ctx->mlme_cfg->sap_cfg.tele_bcn_max_li; + else + val = mac_ctx->mlme_cfg->sap_cfg.listen_interval; mlm_reassoc_req->listenInterval = (uint16_t) val; diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index eaf4366495..e576245f56 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -600,13 +600,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, frm->BeaconInterval.interval = mac_ctx->sch.schObject.gSchBeaconInterval; } else { - sir_status = wlan_cfg_get_int(mac_ctx, - WNI_CFG_BEACON_INTERVAL, &cfg); - if (QDF_STATUS_SUCCESS != sir_status) { - pe_err("Failed to get WNI_CFG_BEACON_INTERVAL (%d)", - sir_status); - goto err_ret; - } + cfg = mac_ctx->mlme_cfg->sap_cfg.beacon_interval; frm->BeaconInterval.interval = (uint16_t) cfg; } diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index 43f107ed70..9e5204575c 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -212,7 +212,7 @@ static void pe_reset_protection_callback(void *ptr) qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); /* index 0, is self node, peers start from 1 */ - for (i = 1 ; i <= mac_ctx->lim.gLimAssocStaLimit ; i++) { + for (i = 1 ; i <= mac_ctx->mlme_cfg->sap_cfg.assoc_sta_limit ; i++) { station_hash_node = dph_get_hash_entry(mac_ctx, i, &pe_session_entry->dph.dphHashTable); if (NULL == station_hash_node) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index d6172e8489..c26063338e 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -6649,7 +6649,8 @@ void lim_del_pmf_sa_query_timer(tpAniSirGlobal mac_ctx, tpPESession pe_session) tpDphHashNode sta_ds = NULL; for (associated_sta = 1; - associated_sta < mac_ctx->lim.gLimAssocStaLimit; + associated_sta < + mac_ctx->mlme_cfg->sap_cfg.assoc_sta_limit; associated_sta++) { sta_ds = dph_get_hash_entry(mac_ctx, associated_sta, &pe_session->dph.dphHashTable); diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 7a4e4f122e..6384d89415 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -413,8 +413,11 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx, /* No need to send DTIM Period and Count to HAL/SMAC */ /* SMAC already parses TIM bit. */ - if (bcn->timPresent) - cfg_set_int(mac_ctx, WNI_CFG_DTIM_PERIOD, bcn->tim.dtimPeriod); + if (bcn->timPresent) { + if (cfg_in_range(CFG_DTIM_PERIOD, bcn->tim.dtimPeriod)) + mac_ctx->mlme_cfg->sap_cfg.dtim_interval = + bcn->tim.dtimPeriod; + } if (mac_ctx->lim.gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) diff --git a/core/mac/src/pe/sch/sch_message.c b/core/mac/src/pe/sch/sch_message.c index 181cbdec13..c75cd561a7 100644 --- a/core/mac/src/pe/sch/sch_message.c +++ b/core/mac/src/pe/sch/sch_message.c @@ -111,12 +111,6 @@ void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg) switch (pSchMsg->type) { case SIR_CFG_PARAM_UPDATE_IND: switch (pSchMsg->bodyval) { - case WNI_CFG_BEACON_INTERVAL: - /* What to do for IBSS ?? - TBD */ - if (LIM_IS_AP_ROLE(psessionEntry)) - sch_set_beacon_interval(pMac, psessionEntry); - break; - case WNI_CFG_COUNTRY_CODE: pe_debug("sch: WNI_CFG_COUNTRY_CODE changed"); sch_edca_profile_update_all(pMac); diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 129ec4f237..7cb29a3c69 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -3180,7 +3180,7 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx, FL("band_start_ch %d, band_end_ch %d"), band_start_ch, band_end_ch); - sme_cfg_get_int(hal, WNI_CFG_ENABLE_LTE_COEX, &en_lte_coex); + en_lte_coex = mac_ctx->mlme_cfg->sap_cfg.enable_lte_coex; /* Check if LTE coex is enabled and 2.4GHz is selected */ if (en_lte_coex && (band_start_ch == CHAN_ENUM_1) && diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index e0bd199889..228df49053 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -7179,10 +7179,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, ibss_log->operatingChannel = bss_desc->channelId; } - if (QDF_IS_STATUS_SUCCESS(wlan_cfg_get_int( - mac_ctx, - WNI_CFG_BEACON_INTERVAL, - &bi))) + bi = mac_ctx->mlme_cfg->sap_cfg.beacon_interval; /* U8 is not enough for BI */ ibss_log->beaconInterval = (uint8_t) bi; WLAN_HOST_DIAG_LOG_REPORT(ibss_log); @@ -11993,9 +11990,7 @@ csr_roam_diag_joined_new_bss(tpAniSirGlobal mac_ctx, pNewBss->ssId.length); pIbssLog->operatingChannel = pNewBss->channelNumber; } - if (QDF_IS_STATUS_SUCCESS(wlan_cfg_get_int(mac_ctx, - WNI_CFG_BEACON_INTERVAL, - &bi))) + bi = mac_ctx->mlme_cfg->sap_cfg.beacon_interval; /* U8 is not enough for beacon interval */ pIbssLog->beaconInterval = (uint8_t) bi; WLAN_HOST_DIAG_LOG_REPORT(pIbssLog); diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index c0c35ad9b4..9324ff60f9 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -3601,12 +3601,7 @@ QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma) WMITLV_GET_STRUCT_TLVLEN (wmi_rmc_set_action_period_cmd_fixed_param)); - if (wlan_cfg_get_int(mac, WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY, - &periodicity_msec) != QDF_STATUS_SUCCESS) { - WMA_LOGE("Failed to get value for RMC action period using default"); - periodicity_msec = WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY_STADEF; - } - + periodicity_msec = mac->mlme_cfg->sap_cfg.rmc_action_period_freq; p_rmc_cmd->vdev_id = vdev_id; p_rmc_cmd->periodicity_msec = periodicity_msec; diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index cd0270a58b..0a510ad218 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -715,61 +715,49 @@ void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id) return; } - if (wlan_cfg_get_int(mac, WNI_CFG_RATE_FOR_TX_MGMT, - &cfg_val) == QDF_STATUS_SUCCESS) { - band = CDS_BAND_ALL; - if ((cfg_val == WNI_CFG_RATE_FOR_TX_MGMT_STADEF) || - !wma_verify_rate_code(cfg_val, band)) { - WMA_LOGD("default WNI_CFG_RATE_FOR_TX_MGMT, ignore"); - } else { - ret = wma_vdev_set_param( - wma->wmi_handle, - vdev_id, - WMI_VDEV_PARAM_MGMT_TX_RATE, - cfg_val); - if (ret) - WMA_LOGE( - "Failed to set WMI_VDEV_PARAM_MGMT_TX_RATE" - ); - } + cfg_val = mac->mlme_cfg->sap_cfg.rate_tx_mgmt; + band = CDS_BAND_ALL; + if ((cfg_val == WNI_CFG_RATE_FOR_TX_MGMT_STADEF) || + !wma_verify_rate_code(cfg_val, band)) { + WMA_LOGD("default WNI_CFG_RATE_FOR_TX_MGMT, ignore"); } else { - WMA_LOGE("Failed to get value of WNI_CFG_RATE_FOR_TX_MGMT"); + ret = wma_vdev_set_param( + wma->wmi_handle, + vdev_id, + WMI_VDEV_PARAM_MGMT_TX_RATE, + cfg_val); + if (ret) + WMA_LOGE( + "Failed to set WMI_VDEV_PARAM_MGMT_TX_RATE" + ); } - if (wlan_cfg_get_int(mac, WNI_CFG_RATE_FOR_TX_MGMT_2G, - &cfg_val) == QDF_STATUS_SUCCESS) { - band = CDS_BAND_2GHZ; - if ((cfg_val == WNI_CFG_RATE_FOR_TX_MGMT_2G_STADEF) || - !wma_verify_rate_code(cfg_val, band)) { - WMA_LOGD("use default 2G MGMT rate."); - per_band_mgmt_tx_rate &= - ~(1 << TX_MGMT_RATE_2G_ENABLE_OFFSET); - } else { - per_band_mgmt_tx_rate |= - (1 << TX_MGMT_RATE_2G_ENABLE_OFFSET); - per_band_mgmt_tx_rate |= - ((cfg_val & 0x7FF) << TX_MGMT_RATE_2G_OFFSET); - } + cfg_val = mac->mlme_cfg->sap_cfg.rate_tx_mgmt_2g; + band = CDS_BAND_2GHZ; + if ((cfg_val == WNI_CFG_RATE_FOR_TX_MGMT_2G_STADEF) || + !wma_verify_rate_code(cfg_val, band)) { + WMA_LOGD("use default 2G MGMT rate."); + per_band_mgmt_tx_rate &= + ~(1 << TX_MGMT_RATE_2G_ENABLE_OFFSET); } else { - WMA_LOGE("Failed to get value of WNI_CFG_RATE_FOR_TX_MGMT_2G"); + per_band_mgmt_tx_rate |= + (1 << TX_MGMT_RATE_2G_ENABLE_OFFSET); + per_band_mgmt_tx_rate |= + ((cfg_val & 0x7FF) << TX_MGMT_RATE_2G_OFFSET); } - if (wlan_cfg_get_int(mac, WNI_CFG_RATE_FOR_TX_MGMT_5G, - &cfg_val) == QDF_STATUS_SUCCESS) { - band = CDS_BAND_5GHZ; - if ((cfg_val == WNI_CFG_RATE_FOR_TX_MGMT_5G_STADEF) || - !wma_verify_rate_code(cfg_val, band)) { - WMA_LOGD("use default 5G MGMT rate."); - per_band_mgmt_tx_rate &= - ~(1 << TX_MGMT_RATE_5G_ENABLE_OFFSET); - } else { - per_band_mgmt_tx_rate |= - (1 << TX_MGMT_RATE_5G_ENABLE_OFFSET); - per_band_mgmt_tx_rate |= - ((cfg_val & 0x7FF) << TX_MGMT_RATE_5G_OFFSET); - } + cfg_val = mac->mlme_cfg->sap_cfg.rate_tx_mgmt; + band = CDS_BAND_5GHZ; + if ((cfg_val == WNI_CFG_RATE_FOR_TX_MGMT_5G_STADEF) || + !wma_verify_rate_code(cfg_val, band)) { + WMA_LOGD("use default 5G MGMT rate."); + per_band_mgmt_tx_rate &= + ~(1 << TX_MGMT_RATE_5G_ENABLE_OFFSET); } else { - WMA_LOGE("Failed to get value of WNI_CFG_RATE_FOR_TX_MGMT_5G"); + per_band_mgmt_tx_rate |= + (1 << TX_MGMT_RATE_5G_ENABLE_OFFSET); + per_band_mgmt_tx_rate |= + ((cfg_val & 0x7FF) << TX_MGMT_RATE_5G_OFFSET); } ret = wma_vdev_set_param( diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c index d2b05741c7..c03ba4ec5d 100644 --- a/core/wma/src/wma_power.c +++ b/core/wma/src/wma_power.c @@ -693,13 +693,7 @@ static QDF_STATUS wma_set_force_sleep(tp_wma_handle wma, } /* Set Listen Interval */ - if (wlan_cfg_get_int(mac, WNI_CFG_LISTEN_INTERVAL, - &cfg_data_val) != QDF_STATUS_SUCCESS) { - QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, - "Failed to get value for WNI_CFG_LISTEN_INTERVAL"); - cfg_data_val = POWERSAVE_DEFAULT_LISTEN_INTERVAL; - } - + cfg_data_val = mac->mlme_cfg->sap_cfg.listen_interval; ret = wma_vdev_set_param(wma->wmi_handle, vdev_id, WMI_VDEV_PARAM_LISTEN_INTERVAL, cfg_data_val);