From dc351569d8df0c306a8b4885a1a57f5e60aa2e37 Mon Sep 17 00:00:00 2001 From: "Chandrasekaran, Manishekar" Date: Mon, 11 Jan 2016 19:28:52 +0530 Subject: [PATCH] qcacld-3.0: Fix invalid operating class calculation during channel switch Fix invalid operating class calculation while sending out channel switch frames. The operating class is getting wrongly calculated using the channel width instead of the channel offset. Fix this by calculating and passing the channel offset parameter instead of the channel width to the necessary function to ensure that the operating class gets calculated correctly. CRs-Fixed: 955414 Change-Id: I011db65e57c477e381fd471a4a930a02e2a7ee21 --- .../src/pe/lim/lim_process_sme_req_messages.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 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 9544e1aea5e1..fd9616a791b1 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 @@ -5496,6 +5496,7 @@ static void lim_process_sme_dfs_csa_ie_request(tpAniSirGlobal mac_ctx, tpPESession session_entry = NULL; uint8_t session_id; tLimWiderBWChannelSwitchInfo *wider_bw_ch_switch; + offset_t ch_offset; if (msg_buf == NULL) { lim_log(mac_ctx, LOGE, FL("Buffer is Pointing to NULL")); @@ -5604,13 +5605,23 @@ skip_vht: * the template update */ lim_send_beacon_ind(mac_ctx, session_entry); - lim_log(mac_ctx, LOG1, FL("Updated CSA IE, IE COUNT = %d"), - session_entry->gLimChannelSwitch.switchCount); + + if (dfs_csa_ie_req->ch_params.ch_width == CH_WIDTH_80MHZ) + ch_offset = BW80; + else + ch_offset = dfs_csa_ie_req->ch_params.sec_ch_offset; + + lim_log(mac_ctx, LOG1, FL("IE count:%d chan:%d width:%d wrapper:%d ch_offset:%d"), + session_entry->gLimChannelSwitch.switchCount, + session_entry->gLimChannelSwitch.primaryChannel, + session_entry->gLimChannelSwitch.ch_width, + session_entry->dfsIncludeChanWrapperIe, + ch_offset); + /* Send ECSA Action frame after updating the beacon */ send_extended_chan_switch_action_frame(mac_ctx, session_entry->gLimChannelSwitch.primaryChannel, - session_entry->gLimChannelSwitch.ch_width, - session_entry); + ch_offset, session_entry); session_entry->gLimChannelSwitch.switchCount--; }