Quellcode durchsuchen

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
Vignesh Viswanathan vor 7 Jahren
Ursprung
Commit
93b7f70f80

+ 1 - 0
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -4247,6 +4247,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

+ 2 - 1
core/mac/src/include/dot11f.h

@@ -35,7 +35,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Wed Dec 13 10:10:49 2017 from the following file(s):
+ * Tue Dec 19 17:48:07 2017 from the following file(s):
  *
  * dot11f.frms
  *
@@ -11002,6 +11002,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 (49)

+ 21 - 0
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -3562,6 +3562,8 @@ 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;
+	tLimWiderBWChannelSwitchInfo *wide_bw_ie;
 
 	if (session_entry == NULL) {
 		pe_err("Session entry is NULL!!!");
@@ -3580,6 +3582,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 = wlan_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);

+ 5 - 1
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -33,7 +33,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Wed Dec 13 10:10:49 2017 from the following file(s):
+ * Tue Dec 19 17:48:07 2017 from the following file(s):
  *
  * dot11f.frms
  *
@@ -10176,6 +10176,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,