qcacld-3.0: Get country code using wlan_reg_read_current_country
In lim_handle_csa_offload_msg(), mac->scan.countryCodeCurrent is passed in regulatory API wlan_reg_dmn_get_chanwidth_from_opclass to get the opclass. mac_ctx->scan.countryCodeCurrent is no more updated after the regulatory componentization so get country using wlan_reg_read_current_country() instead of it. Change-Id: Ic56e4bf33784fa5f64aedd431ebe41275a7666b2 CRs-Fixed: 2742068
This commit is contained in:

committed by
snandini

parent
6619e25cb6
commit
b9e93fa1ed
@@ -1568,6 +1568,7 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||||||
uint16_t chan_space = 0;
|
uint16_t chan_space = 0;
|
||||||
struct ch_params ch_params = {0};
|
struct ch_params ch_params = {0};
|
||||||
uint32_t channel_bonding_mode;
|
uint32_t channel_bonding_mode;
|
||||||
|
uint8_t country_code[CDS_COUNTRY_CODE_LEN + 1];
|
||||||
|
|
||||||
tLimWiderBWChannelSwitchInfo *chnl_switch_info = NULL;
|
tLimWiderBWChannelSwitchInfo *chnl_switch_info = NULL;
|
||||||
tLimChannelSwitchInfo *lim_ch_switch = NULL;
|
tLimChannelSwitchInfo *lim_ch_switch = NULL;
|
||||||
@@ -1647,7 +1648,7 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||||||
channel_bonding_mode);
|
channel_bonding_mode);
|
||||||
|
|
||||||
session_entry->htSupportedChannelWidthSet = false;
|
session_entry->htSupportedChannelWidthSet = false;
|
||||||
|
wlan_reg_read_current_country(mac_ctx->psoc, country_code);
|
||||||
if (channel_bonding_mode &&
|
if (channel_bonding_mode &&
|
||||||
((session_entry->vhtCapability && session_entry->htCapability) ||
|
((session_entry->vhtCapability && session_entry->htCapability) ||
|
||||||
lim_is_session_he_capable(session_entry))) {
|
lim_is_session_he_capable(session_entry))) {
|
||||||
@@ -1680,7 +1681,7 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||||||
} else {
|
} else {
|
||||||
chan_space =
|
chan_space =
|
||||||
wlan_reg_dmn_get_chanwidth_from_opclass(
|
wlan_reg_dmn_get_chanwidth_from_opclass(
|
||||||
mac_ctx->scan.countryCodeCurrent,
|
country_code,
|
||||||
csa_params->channel,
|
csa_params->channel,
|
||||||
csa_params->new_op_class);
|
csa_params->new_op_class);
|
||||||
}
|
}
|
||||||
@@ -1753,7 +1754,7 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||||||
& lim_xcsa_ie_present) {
|
& lim_xcsa_ie_present) {
|
||||||
chan_space =
|
chan_space =
|
||||||
wlan_reg_dmn_get_chanwidth_from_opclass(
|
wlan_reg_dmn_get_chanwidth_from_opclass(
|
||||||
mac_ctx->scan.countryCodeCurrent,
|
country_code,
|
||||||
csa_params->channel,
|
csa_params->channel,
|
||||||
csa_params->new_op_class);
|
csa_params->new_op_class);
|
||||||
lim_ch_switch->state =
|
lim_ch_switch->state =
|
||||||
|
Reference in New Issue
Block a user