qcacld-3.0: Refactor one INI about obss ht40
Based on new cfg component, refactor INI CFG_OVERRIDE_HT40_20_24GHZ_NAME and remove legacy codes. Change-Id: I5b4ed96a4930a9358bd93ee809bf5cddb2787fb4 CRs-Fixed: 2354476
This commit is contained in:
@@ -1127,7 +1127,10 @@ static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
cfg_default(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
|
cfg_default(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
|
||||||
obss_ht40->scan_activity_threshold = (uint32_t)
|
obss_ht40->scan_activity_threshold = (uint32_t)
|
||||||
cfg_default(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
|
cfg_default(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
|
||||||
|
obss_ht40->is_override_ht20_40_24g =
|
||||||
|
cfg_get(psoc, CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mlme_init_threshold_cfg(struct wlan_objmgr_psoc *psoc,
|
static void mlme_init_threshold_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wlan_mlme_threshold *threshold)
|
struct wlan_mlme_threshold *threshold)
|
||||||
{
|
{
|
||||||
|
@@ -196,6 +196,29 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"obss ht40 width transition delay")
|
"obss ht40 width transition delay")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* override_ht20_40_24g - Use channel bonding in 2.4GHz from supplicant
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini used to set whether use channel Bonding in 2.4GHz from supplicant
|
||||||
|
* if gChannelBondingMode24GHz is set
|
||||||
|
*
|
||||||
|
* Related: gChannelBondingMode24GHz
|
||||||
|
*
|
||||||
|
* Supported Feature: STA
|
||||||
|
*
|
||||||
|
* Usage: Internal/External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ CFG_INI_BOOL( \
|
||||||
|
"override_ht20_40_24g", \
|
||||||
|
0, \
|
||||||
|
"Use channel bonding in 24 GHz")
|
||||||
|
|
||||||
#define CFG_OBSS_HT40_ALL \
|
#define CFG_OBSS_HT40_ALL \
|
||||||
CFG(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME) \
|
CFG(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME) \
|
||||||
CFG(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME) \
|
CFG(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME) \
|
||||||
@@ -203,6 +226,7 @@
|
|||||||
CFG(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL) \
|
CFG(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL) \
|
||||||
CFG(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL) \
|
CFG(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL) \
|
||||||
CFG(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD) \
|
CFG(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD) \
|
||||||
CFG(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY)
|
CFG(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY) \
|
||||||
|
CFG(CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ)
|
||||||
|
|
||||||
#endif /* CFG_MLME_OBSS_HT40_H__ */
|
#endif /* CFG_MLME_OBSS_HT40_H__ */
|
||||||
|
@@ -946,6 +946,7 @@ struct wlan_mlme_acs {
|
|||||||
* @active_per_channel: obss scan active total duration per channel
|
* @active_per_channel: obss scan active total duration per channel
|
||||||
* @width_trans_delay: obss width transition delay
|
* @width_trans_delay: obss width transition delay
|
||||||
* @scan_activity_threshold: obss scan activity threshold
|
* @scan_activity_threshold: obss scan activity threshold
|
||||||
|
* @is_override_ht20_40_24g: use channel bonding in 2.4 GHz
|
||||||
*/
|
*/
|
||||||
struct wlan_mlme_obss_ht40 {
|
struct wlan_mlme_obss_ht40 {
|
||||||
uint32_t active_dwelltime;
|
uint32_t active_dwelltime;
|
||||||
@@ -955,6 +956,7 @@ struct wlan_mlme_obss_ht40 {
|
|||||||
uint32_t active_per_channel;
|
uint32_t active_per_channel;
|
||||||
uint32_t width_trans_delay;
|
uint32_t width_trans_delay;
|
||||||
uint32_t scan_activity_threshold;
|
uint32_t scan_activity_threshold;
|
||||||
|
bool is_override_ht20_40_24g;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -740,6 +740,16 @@ QDF_STATUS
|
|||||||
ucfg_mlme_get_tgt_gtx_usr_cfg(struct wlan_objmgr_psoc *psoc,
|
ucfg_mlme_get_tgt_gtx_usr_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t *val);
|
uint32_t *val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_mlme_is_override_ht20_40_24g() - use channel bonding in 2.4 GHz or not
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
* @val: Pointer to the value which will be filled for the caller
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_is_override_ht20_40_24g(struct wlan_objmgr_psoc *psoc, bool *val);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_mlme_get_roaming_offload() - Get roaming offload setting
|
* ucfg_mlme_get_roaming_offload() - Get roaming offload setting
|
||||||
* @psoc: pointer to psoc object
|
* @psoc: pointer to psoc object
|
||||||
|
@@ -331,6 +331,22 @@ ucfg_mlme_get_tgt_gtx_usr_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_mlme_is_override_ht20_40_24g(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||||
|
{
|
||||||
|
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||||
|
|
||||||
|
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||||
|
if (!mlme_obj) {
|
||||||
|
*val = cfg_default(CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ);
|
||||||
|
mlme_err("mlme obj null");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
*val = mlme_obj->cfg.obss_ht40.is_override_ht20_40_24g;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
ucfg_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
|
ucfg_mlme_get_roaming_offload(struct wlan_objmgr_psoc *psoc,
|
||||||
bool *val)
|
bool *val)
|
||||||
|
@@ -218,30 +218,6 @@ enum hdd_dot11_mode {
|
|||||||
#define CFG_CHANNEL_BONDING_MODE_MAX WNI_CFG_CHANNEL_BONDING_MODE_STAMAX
|
#define CFG_CHANNEL_BONDING_MODE_MAX WNI_CFG_CHANNEL_BONDING_MODE_STAMAX
|
||||||
#define CFG_CHANNEL_BONDING_MODE_DEFAULT WNI_CFG_CHANNEL_BONDING_MODE_STADEF
|
#define CFG_CHANNEL_BONDING_MODE_DEFAULT WNI_CFG_CHANNEL_BONDING_MODE_STADEF
|
||||||
|
|
||||||
/*
|
|
||||||
* <ini>
|
|
||||||
* override_ht20_40_24g - use channel Bonding in 24 GHz from supplicant
|
|
||||||
* @Min: 0
|
|
||||||
* @Max: 1
|
|
||||||
* @Default: 0
|
|
||||||
*
|
|
||||||
* This ini is used to use channel Bonding in 24 GHz from supplicant if
|
|
||||||
* gChannelBondingMode24GHz is set
|
|
||||||
*
|
|
||||||
* Related: gChannelBondingMode24GHz
|
|
||||||
*
|
|
||||||
* Supported Feature: STA
|
|
||||||
*
|
|
||||||
* Usage: Internal/External
|
|
||||||
*
|
|
||||||
* </ini>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CFG_OVERRIDE_HT40_20_24GHZ_NAME "override_ht20_40_24g"
|
|
||||||
#define CFG_OVERRIDE_HT40_20_24GHZ_MIN 0
|
|
||||||
#define CFG_OVERRIDE_HT40_20_24GHZ_MAX 1
|
|
||||||
#define CFG_OVERRIDE_HT40_20_24GHZ_DEFAULT 0
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* gChannelBondingMode5GHz - Configures Channel Bonding in 5 GHz
|
* gChannelBondingMode5GHz - Configures Channel Bonding in 5 GHz
|
||||||
@@ -6041,7 +6017,6 @@ struct hdd_config {
|
|||||||
uint32_t nBmpsMinListenInterval;
|
uint32_t nBmpsMinListenInterval;
|
||||||
enum hdd_dot11_mode dot11Mode;
|
enum hdd_dot11_mode dot11Mode;
|
||||||
uint32_t nChannelBondingMode24GHz;
|
uint32_t nChannelBondingMode24GHz;
|
||||||
bool override_ht20_40_24g;
|
|
||||||
uint32_t nChannelBondingMode5GHz;
|
uint32_t nChannelBondingMode5GHz;
|
||||||
uint32_t ScanResultAgeCount;
|
uint32_t ScanResultAgeCount;
|
||||||
uint8_t nRssiCatGap;
|
uint8_t nRssiCatGap;
|
||||||
|
@@ -430,13 +430,6 @@ struct reg_table_entry g_registry_table[] = {
|
|||||||
CFG_CHANNEL_BONDING_MODE_MIN,
|
CFG_CHANNEL_BONDING_MODE_MIN,
|
||||||
CFG_CHANNEL_BONDING_MODE_MAX),
|
CFG_CHANNEL_BONDING_MODE_MAX),
|
||||||
|
|
||||||
REG_VARIABLE(CFG_OVERRIDE_HT40_20_24GHZ_NAME, WLAN_PARAM_Integer,
|
|
||||||
struct hdd_config, override_ht20_40_24g,
|
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
|
||||||
CFG_OVERRIDE_HT40_20_24GHZ_DEFAULT,
|
|
||||||
CFG_OVERRIDE_HT40_20_24GHZ_MIN,
|
|
||||||
CFG_OVERRIDE_HT40_20_24GHZ_MAX),
|
|
||||||
|
|
||||||
REG_VARIABLE(CFG_CHANNEL_BONDING_MODE_5GHZ_NAME, WLAN_PARAM_Integer,
|
REG_VARIABLE(CFG_CHANNEL_BONDING_MODE_5GHZ_NAME, WLAN_PARAM_Integer,
|
||||||
struct hdd_config, nChannelBondingMode5GHz,
|
struct hdd_config, nChannelBondingMode5GHz,
|
||||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
|
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
|
||||||
|
@@ -16765,18 +16765,21 @@ wlan_hdd_check_ht20_ht40_ind(struct hdd_context *hdd_ctx,
|
|||||||
struct cfg80211_connect_params *req)
|
struct cfg80211_connect_params *req)
|
||||||
{
|
{
|
||||||
struct csr_roam_profile *roam_profile;
|
struct csr_roam_profile *roam_profile;
|
||||||
|
bool is_override_ht20_40_24g;
|
||||||
|
|
||||||
roam_profile = hdd_roam_profile(adapter);
|
roam_profile = hdd_roam_profile(adapter);
|
||||||
|
|
||||||
roam_profile->force_24ghz_in_ht20 = false;
|
roam_profile->force_24ghz_in_ht20 = false;
|
||||||
|
|
||||||
if (hdd_ctx->config->override_ht20_40_24g &&
|
ucfg_mlme_is_override_ht20_40_24g(hdd_ctx->psoc,
|
||||||
|
&is_override_ht20_40_24g);
|
||||||
|
if (is_override_ht20_40_24g &&
|
||||||
!(req->ht_capa.cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40))
|
!(req->ht_capa.cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40))
|
||||||
roam_profile->force_24ghz_in_ht20 = true;
|
roam_profile->force_24ghz_in_ht20 = true;
|
||||||
|
|
||||||
hdd_debug("req->ht_capa.cap_info %x override_ht20_40_24g %d",
|
hdd_debug("req->ht_capa.cap_info %x override_ht20_40_24g %d",
|
||||||
req->ht_capa.cap_info,
|
req->ht_capa.cap_info,
|
||||||
hdd_ctx->config->override_ht20_40_24g);
|
is_override_ht20_40_24g);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void
|
static inline void
|
||||||
|
Reference in New Issue
Block a user