diff options
| author | Vignesh Viswanathan <viswanat@codeaurora.org> | 2017-12-13 21:12:20 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-12-19 08:31:21 -0800 |
| commit | ea64a8edfa111798d3036d8600c6e9ecf6657eba (patch) | |
| tree | 6fcfd8d8f217d338c8b1d075f0aff201a5ca6545 | |
| parent | f85e1a60442eba75064caec9b783b8fb3c3b2a14 (diff) | |
qcacld-3.0: Add WiderBWChanSwitchAnn IE to ext_chan_switch_ann action frame
Add the WiderBWChanSwitchAnn to ext_chan_switch_ann action frame
as optional IE. Currently WiderBWChanSwitchAnn is added only in
beacon frames.
Change-Id: I4f76479bdb2befa93fcb83238590007a555af210
CRs-Fixed: 2141529
| -rw-r--r-- | core/mac/src/cfg/cfgUtil/dot11f.frms | 1 | ||||
| -rw-r--r-- | core/mac/src/include/dot11f.h | 3 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_send_management_frames.c | 21 | ||||
| -rw-r--r-- | core/mac/src/sys/legacy/src/utils/src/dot11f.c | 6 |
4 files changed, 29 insertions, 2 deletions
diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index e01f2285928d..7e14a8285133 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -3981,6 +3981,7 @@ FRAME ext_channel_switch_action_frame FF Category; FF Action; FF ext_chan_switch_ann_action; + OPTIE WiderBWChanSwitchAnn; } FRAME p2p_oper_chan_change_confirm diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index 54c8e3380b6b..ba3818f57efc 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -35,7 +35,7 @@ * * * This file was automatically generated by 'framesc' - * Sun Dec 10 08:50:53 2017 from the following file(s): + * Wed Dec 13 20:23:59 2017 from the following file(s): * * dot11f.frms * @@ -10435,6 +10435,7 @@ typedef struct sDot11fext_channel_switch_action_frame{ tDot11fFfCategory Category; tDot11fFfAction Action; tDot11fFfext_chan_switch_ann_action ext_chan_switch_ann_action; + tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn; } tDot11fext_channel_switch_action_frame; #define DOT11F_EXT_CHANNEL_SWITCH_ACTION_FRAME (46) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 0dd2670b48b7..d51458a03284 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -3471,6 +3471,7 @@ lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx, uint8_t new_channel, uint8_t count, tpPESession session_entry) { tDot11fext_channel_switch_action_frame frm; + tLimWiderBWChannelSwitchInfo *wide_bw_ie; uint8_t *frame; tpSirMacMgmtHdr mac_hdr; uint32_t num_bytes, n_payload, status; @@ -3478,6 +3479,7 @@ lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx, QDF_STATUS qdf_status; uint8_t txFlag = 0; uint8_t sme_session_id = 0; + uint8_t ch_spacing; if (session_entry == NULL) { pe_err("Session entry is NULL!!!"); @@ -3496,6 +3498,25 @@ lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx, frm.ext_chan_switch_ann_action.new_channel = new_channel; frm.ext_chan_switch_ann_action.switch_count = count; + ch_spacing = cds_reg_dmn_get_chanwidth_from_opclass( + mac_ctx->scan.countryCodeCurrent, new_channel, + new_op_class); + pe_debug("wrapper: ch_spacing %hu", ch_spacing); + + if ((ch_spacing == 80) || (ch_spacing == 160)) { + wide_bw_ie = &session_entry->gLimWiderBWChannelSwitch; + frm.WiderBWChanSwitchAnn.newChanWidth = + wide_bw_ie->newChanWidth; + frm.WiderBWChanSwitchAnn.newCenterChanFreq0 = + wide_bw_ie->newCenterChanFreq0; + frm.WiderBWChanSwitchAnn.newCenterChanFreq1 = + wide_bw_ie->newCenterChanFreq1; + frm.WiderBWChanSwitchAnn.present = 1; + pe_debug("wrapper: width:%d f0:%d f1:%d", + frm.WiderBWChanSwitchAnn.newChanWidth, + frm.WiderBWChanSwitchAnn.newCenterChanFreq0, + frm.WiderBWChanSwitchAnn.newCenterChanFreq1); + } status = dot11f_get_packed_ext_channel_switch_action_frame_size(mac_ctx, &frm, &n_payload); diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index b6a36dd6748e..f3a460fa7045 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -33,7 +33,7 @@ * * * This file was automatically generated by 'framesc' - * Sun Dec 10 08:50:53 2017 from the following file(s): + * Wed Dec 13 20:23:59 2017 from the following file(s): * * dot11f.frms * @@ -9525,6 +9525,10 @@ static const tFFDefn FFS_ext_channel_switch_action_frame[] = { }; static const tIEDefn IES_ext_channel_switch_action_frame[] = { + { offsetof(tDot11fext_channel_switch_action_frame, + WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), + 0, "WiderBWChanSwitchAnn", 0, 5, 5, SigIeWiderBWChanSwitchAnn, + {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; uint32_t dot11f_unpack_ext_channel_switch_action_frame(tpAniSirGlobal pCtx, |
