mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
qcacld-3.0: Fix cb mode calculation for 2.4 GHz
If user configure to not use 40 MHz in 2.4 GHz, then avoid setting 40 MHz capability and use cb mode as WNI_CFG_CHANNEL_BONDING_MODE_DISABLE for 2.4 GHz. Change-Id: I4e9153e211e02f6b959e16dad4573c2b490cb215 CRs-Fixed: 3584510
This commit is contained in:
parent
9c63678288
commit
825f5aa55d
4 changed files with 51 additions and 15 deletions
|
|
@ -3765,10 +3765,41 @@ static void lim_ht_switch_chnl_req(struct pe_session *session)
|
|||
}
|
||||
}
|
||||
|
||||
uint8_t lim_get_cb_mode_for_freq(struct mac_context *mac,
|
||||
struct pe_session *session,
|
||||
qdf_freq_t chan_freq)
|
||||
{
|
||||
uint8_t cb_mode = mac->roam.configParam.channelBondingMode5GHz;
|
||||
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(chan_freq)) {
|
||||
if (session->force_24ghz_in_ht20) {
|
||||
cb_mode = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
|
||||
pe_debug_rl("vdev %d force 20 Mhz in 2.4 GHz",
|
||||
session->vdev_id);
|
||||
} else {
|
||||
cb_mode = mac->roam.configParam.channelBondingMode24GHz;
|
||||
}
|
||||
}
|
||||
|
||||
return cb_mode;
|
||||
}
|
||||
|
||||
void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac,
|
||||
tDot11fIEHTInfo *pHTInfo,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
uint8_t cb_mode;
|
||||
|
||||
cb_mode = lim_get_cb_mode_for_freq(mac, pe_session,
|
||||
pe_session->curr_op_freq);
|
||||
|
||||
/* If self capability is set to '20Mhz only', then do not change the CB mode. */
|
||||
if (cb_mode == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) {
|
||||
pe_debug_rl("self_cb_mode 0 for freq %d",
|
||||
pe_session->curr_op_freq);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If self capability is set to '20Mhz only', then do not change the CB mode. */
|
||||
if (!lim_get_ht_capability
|
||||
(mac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, pe_session))
|
||||
|
|
@ -9325,10 +9356,8 @@ bool lim_update_channel_width(struct mac_context *mac_ctx,
|
|||
uint8_t cb_mode, oper_mode;
|
||||
uint32_t fw_vht_ch_wd;
|
||||
|
||||
if (wlan_reg_is_24ghz_ch_freq(session->curr_op_freq))
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode24GHz;
|
||||
else
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
|
||||
cb_mode = lim_get_cb_mode_for_freq(mac_ctx, session,
|
||||
session->curr_op_freq);
|
||||
/*
|
||||
* Do not update the channel bonding mode if channel bonding
|
||||
* mode is disabled in INI.
|
||||
|
|
|
|||
|
|
@ -327,6 +327,18 @@ void lim_decide_sta_protection_on_assoc(struct mac_context *mac,
|
|||
tpSchBeaconStruct pBeaconStruct,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
/**
|
||||
* lim_get_cb_mode_for_freq() - Get cb mode depending on the freq
|
||||
* @mac: pointer to Global MAC structure
|
||||
* @pe_session: pe session
|
||||
* @chan_freq: Freq to get cb mode for
|
||||
*
|
||||
* Return: cb mode allowed for the freq
|
||||
*/
|
||||
uint8_t lim_get_cb_mode_for_freq(struct mac_context *mac,
|
||||
struct pe_session *session,
|
||||
qdf_freq_t chan_freq);
|
||||
|
||||
/**
|
||||
* lim_update_sta_run_time_ht_switch_chnl_params() - Process change in HT
|
||||
* bandwidth
|
||||
|
|
|
|||
|
|
@ -537,14 +537,8 @@ sch_bcn_process_sta_opmode(struct mac_context *mac_ctx,
|
|||
uint16_t aid;
|
||||
uint8_t cb_mode;
|
||||
|
||||
if (wlan_reg_is_24ghz_ch_freq(session->curr_op_freq)) {
|
||||
if (session->force_24ghz_in_ht20)
|
||||
cb_mode = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
|
||||
else
|
||||
cb_mode =
|
||||
mac_ctx->roam.configParam.channelBondingMode24GHz;
|
||||
} else
|
||||
cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
|
||||
cb_mode = lim_get_cb_mode_for_freq(mac_ctx, session,
|
||||
session->curr_op_freq);
|
||||
/* check for VHT capability */
|
||||
sta = dph_lookup_hash_entry(mac_ctx, pMh->sa, &aid,
|
||||
&session->dph.dphHashTable);
|
||||
|
|
|
|||
|
|
@ -915,7 +915,7 @@ populate_dot11f_ht_caps(struct mac_context *mac,
|
|||
{
|
||||
qdf_size_t ncfglen;
|
||||
QDF_STATUS nSirStatus;
|
||||
uint8_t disable_high_ht_mcs_2x2 = 0;
|
||||
uint8_t disable_high_ht_mcs_2x2 = 0, cb_mode;
|
||||
struct ch_params ch_params = {0};
|
||||
|
||||
tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
|
||||
|
|
@ -945,10 +945,11 @@ populate_dot11f_ht_caps(struct mac_context *mac,
|
|||
pDot11f->shortGI20MHz = ht_cap_info->short_gi_20_mhz;
|
||||
pDot11f->shortGI40MHz = ht_cap_info->short_gi_40_mhz;
|
||||
} else {
|
||||
cb_mode = lim_get_cb_mode_for_freq(mac, pe_session,
|
||||
pe_session->curr_op_freq);
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq) &&
|
||||
LIM_IS_STA_ROLE(pe_session) &&
|
||||
WNI_CFG_CHANNEL_BONDING_MODE_DISABLE !=
|
||||
mac->roam.configParam.channelBondingMode24GHz) {
|
||||
cb_mode != WNI_CFG_CHANNEL_BONDING_MODE_DISABLE) {
|
||||
pDot11f->supportedChannelWidthSet = 1;
|
||||
ch_params.ch_width = CH_WIDTH_40MHZ;
|
||||
wlan_reg_set_channel_params_for_freq(
|
||||
|
|
|
|||
Loading…
Reference in a new issue