qcacld-3.0: Refactor two INI about channel bonding
Based on new cfg framework, refactor below WNI/INI: - CFG_CHANNEL_BONDING_MODE_24GHZ_NAME - CFG_CHANNEL_BONDING_MODE_5GHZ_NAME Change-Id: Ia18fd79738a8079c41df557934335e54c8016e43 CRs-Fixed: 2381831
This commit is contained in:
@@ -906,6 +906,10 @@ static void mlme_init_feature_flag_in_cfg(
|
||||
feature_flags->mcc_bcast_prob_rsp = cfg_get(psoc,
|
||||
CFG_FW_MCC_BCAST_PROB_RESP);
|
||||
feature_flags->enable_mcc = cfg_get(psoc, CFG_MCC_FEATURE);
|
||||
feature_flags->channel_bonding_mode_24ghz =
|
||||
cfg_get(psoc, CFG_CHANNEL_BONDING_MODE_24GHZ);
|
||||
feature_flags->channel_bonding_mode_5ghz =
|
||||
cfg_get(psoc, CFG_CHANNEL_BONDING_MODE_5GHZ);
|
||||
}
|
||||
|
||||
static void mlme_init_sap_protection_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2019 The Linux Foundation. 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
|
||||
@@ -158,6 +158,56 @@
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Enable/Disable MCC feature.")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gChannelBondingMode24GHz - Configures Channel Bonding in 24 GHz
|
||||
* @Min: 0
|
||||
* @Max: 10
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to set default channel bonding mode 24GHZ
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_CHANNEL_BONDING_MODE_24GHZ CFG_INI_UINT( \
|
||||
"gChannelBondingMode24GHz", \
|
||||
0, \
|
||||
10, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Configures Channel Bonding in 24 GHz")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gChannelBondingMode5GHz - Configures Channel Bonding in 5 GHz
|
||||
* @Min: 0
|
||||
* @Max: 10
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to set default channel bonding mode 5GHZ
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_CHANNEL_BONDING_MODE_5GHZ CFG_INI_UINT( \
|
||||
"gChannelBondingMode5GHz", \
|
||||
0, \
|
||||
10, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Configures Channel Bonding in 5 GHz")
|
||||
|
||||
#define CFG_FEATURE_FLAG_ALL \
|
||||
CFG(CFG_ACCEPT_SHORT_SLOT_ASSOC_ONLY) \
|
||||
CFG(CFG_HCF_ENABLED) \
|
||||
@@ -169,7 +219,9 @@
|
||||
CFG(CFG_11G_SHORT_SLOT_TIME_ENABLED) \
|
||||
CFG(CFG_CHANNEL_BONDING_MODE) \
|
||||
CFG(CFG_BLOCK_ACK_ENABLED) \
|
||||
CFG(CFG_ENABLE_AMPDUPS)
|
||||
CFG(CFG_ENABLE_AMPDUPS) \
|
||||
CFG(CFG_CHANNEL_BONDING_MODE_24GHZ) \
|
||||
CFG(CFG_CHANNEL_BONDING_MODE_5GHZ)
|
||||
|
||||
#endif /* __CFG_MLME_FEATURE_FLAG_H */
|
||||
|
||||
|
@@ -893,11 +893,16 @@ struct wlan_mlme_rates {
|
||||
* @enable_hcf: enable HCF feature
|
||||
* @enable_rsn: enable RSN for connection
|
||||
* @enable_short_preamble_11g: enable short preamble for 11g
|
||||
* @enable_short_slot_time_11g
|
||||
* @enable_ampdu: enable AMPDU feature
|
||||
* @enable_mcc: enable MCC feature
|
||||
* @mcc_rts_cts_prot: RTS-CTS protection in MCC
|
||||
* @mcc_bcast_prob_rsp: broadcast Probe Response in MCC
|
||||
* @channel_bonding_mode: channel bonding mode
|
||||
* @enable_block_ack: enable block ack feature
|
||||
* @enable_ampdu: Enable AMPDU feature
|
||||
* @channel_bonding_mode_24ghz: configures Channel Bonding in 24 GHz
|
||||
* @channel_bonding_mode_5ghz: configures Channel Bonding in 5 GHz
|
||||
*/
|
||||
|
||||
struct wlan_mlme_feature_flag {
|
||||
bool accept_short_slot_assoc;
|
||||
bool enable_hcf;
|
||||
@@ -910,6 +915,8 @@ struct wlan_mlme_feature_flag {
|
||||
uint8_t mcc_bcast_prob_rsp;
|
||||
uint32_t channel_bonding_mode;
|
||||
uint32_t enable_block_ack;
|
||||
uint32_t channel_bonding_mode_24ghz;
|
||||
uint32_t channel_bonding_mode_5ghz;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -3565,4 +3565,47 @@ ucfg_mlme_set_obss_detection_offload_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_obss_color_collision_offload_enabled(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t value);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_channel_bonding_24ghz() - get channel bonding mode of 24ghz
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_channel_bonding_24ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *value);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_channel_bonding_24ghz() - set channel bonding mode for 24ghz
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: channel bonding mode
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_channel_bonding_24ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t value);
|
||||
/**
|
||||
* ucfg_mlme_get_channel_bonding_5ghz() - get channel bonding mode of 5ghz
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *value);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_channel_bonding_5ghz() - set channel bonding mode for 5ghz
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: channel bonding mode
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t value);
|
||||
#endif /* _WLAN_MLME_UCFG_API_H_ */
|
||||
|
@@ -1534,3 +1534,66 @@ ucfg_mlme_set_obss_color_collision_offload_enabled(
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_channel_bonding_24ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_CHANNEL_BONDING_MODE_24GHZ);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
*val = mlme_obj->cfg.feature_flags.channel_bonding_mode_24ghz;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_channel_bonding_24ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t value)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
mlme_obj->cfg.feature_flags.channel_bonding_mode_24ghz = value;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*value = cfg_default(CFG_CHANNEL_BONDING_MODE_5GHZ);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
*value = mlme_obj->cfg.feature_flags.channel_bonding_mode_5ghz;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t value)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
mlme_obj->cfg.feature_flags.channel_bonding_mode_5ghz = value;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user