summaryrefslogtreecommitdiff
path: root/core/mac/src
diff options
context:
space:
mode:
authorChandrasekaran Manishekar <cmshekar@codeaurora.org>2016-03-07 19:09:20 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-04-17 17:54:53 -0700
commit4fcb7f5feb0415b395decc04ba0fc73c7e481860 (patch)
tree386b5b03ad7b4fb8a9ca4cab99984493350785b6 /core/mac/src
parent802827d23c17c86bd8c13f7e65f6c73926929b6f (diff)
qcacld-3.0: Fix enum mismatch while calculating regulatory class
Fix the enum value used while calculating the regulatory class from the operating channel. Currently, the channel width is of type 'enum ch_width' whereas the expected enum is of type 'offset_t'. Fixing the same by performing the enum conversion before calculating the regulatory class to avoid incorrect value of regulatory class. Change-Id: I6aabb8ae78836e3c640f41b27e10830adc91a57e CRs-Fixed: 986246
Diffstat (limited to 'core/mac/src')
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c2
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c17
2 files changed, 18 insertions, 1 deletions
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 1d2058b81c5e..1fb2a93fdf0f 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
@@ -5623,6 +5623,8 @@ static void lim_process_sme_dfs_csa_ie_request(tpAniSirGlobal mac_ctx,
session_entry->gLimChannelSwitch.switchCount = LIM_MAX_CSA_IE_UPDATES;
session_entry->gLimChannelSwitch.ch_width =
dfs_csa_ie_req->ch_params.ch_width;
+ session_entry->gLimChannelSwitch.sec_ch_offset =
+ dfs_csa_ie_req->ch_params.sec_ch_offset;
if (mac_ctx->sap.SapDfsInfo.disable_dfs_ch_switch == false)
session_entry->gLimChannelSwitch.switchMode = 1;
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index d25eec71fc2d..fbe40637a5f5 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -248,16 +248,31 @@ void populate_dot_11_f_ext_chann_switch_ann(tpAniSirGlobal mac_ptr,
tDot11fIEext_chan_switch_ann *dot_11_ptr,
tpPESession session_entry)
{
+ uint8_t ch_offset;
+
+ if (session_entry->gLimChannelSwitch.ch_width == CH_WIDTH_80MHZ)
+ ch_offset = BW80;
+ else
+ ch_offset = session_entry->gLimChannelSwitch.sec_ch_offset;
+
dot_11_ptr->switch_mode = session_entry->gLimChannelSwitch.switchMode;
dot_11_ptr->new_reg_class = cds_regdm_get_opclass_from_channel(
mac_ptr->scan.countryCodeCurrent,
session_entry->gLimChannelSwitch.primaryChannel,
- session_entry->gLimChannelSwitch.ch_width);
+ ch_offset);
dot_11_ptr->new_channel =
session_entry->gLimChannelSwitch.primaryChannel;
dot_11_ptr->switch_count =
session_entry->gLimChannelSwitch.switchCount;
dot_11_ptr->present = 1;
+
+ dot11f_log(mac_ptr, LOG1,
+ FL("country:%s chan:%d width:%d reg:%d off:%d"),
+ mac_ptr->scan.countryCodeCurrent,
+ session_entry->gLimChannelSwitch.primaryChannel,
+ session_entry->gLimChannelSwitch.ch_width,
+ dot_11_ptr->new_reg_class,
+ session_entry->gLimChannelSwitch.sec_ch_offset);
}
void