Browse Source

qcacld-3.0: Add BW_IND_ELEM and WIDER BW IEs in chan load req/rsp

AP can sends channel width and related information via below OPIE:
1. Wide Bandwidth Channel Switch (Subelement ID 163)
2. Bandwidth Indication (Subelement ID 164)

Add driver support to parse above IEs coming in channel load
request and fills IEs with proper values in channel load
response.

Change-Id: I5768389612f05a882ef2a083e7c58c4aa4ac9b79
CRs-Fixed: 3605160
Abhinav Kumar 1 year ago
parent
commit
28a9c1783f

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

@@ -1688,6 +1688,31 @@ IE reporting_reason (EID_REPORTING_REASON)
    }
 }
 
+const SUB_EID_BANDWIDTH_INDICATION     = 164;
+IE bw_indication (SUB_EID_BANDWIDTH_INDICATION)
+{
+   {
+       reserved: 1;
+       disabled_sub_chan_bitmap_present: 1;
+       reserved_1: 6;
+   }
+   {
+       channel_width: 3;
+       reserved_2: 5;
+   }
+   ccfs0, 1;
+   ccfs1, 1;
+   disabled_sub_chan_bitmap[2][0..1] COUNTIS disabled_sub_chan_bitmap_present;
+}
+
+const SUB_EID_WIDE_BW_CHANNEL_SWITCH     = 163;
+IE wide_bw_chan_switch (SUB_EID_WIDE_BW_CHANNEL_SWITCH)
+{
+   new_chan_width,           1;
+   new_center_chan_freq0,    1;
+   new_center_chan_freq1,    1;
+}
+
 IE MeasurementReport (EID_MEAS_REPORT)    // 7.3.2.22
 {
     token, 1;
@@ -1744,6 +1769,8 @@ IE MeasurementReport (EID_MEAS_REPORT)    // 7.3.2.22
             meas_start_time,   8;
             meas_duration,     2;
             chan_load,         1;
+            OPTIE wide_bw_chan_switch;
+            OPTIE bw_indication;
         }
        Beacon (type IS 5)
        {
@@ -3129,6 +3156,8 @@ IE MeasurementRequest (EID_MEAS_REQUEST)  // 7.3.2.21
            randomization_intv,      2;
            meas_duration,           2;
            OPTIE rrm_reporting;
+           OPTIE wide_bw_chan_switch;
+           OPTIE bw_indication;
        }
        Beacon (measurement_type IS 5)
        {

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

@@ -27,7 +27,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Thu Sep  7 12:02:23 2023 from the following file(s):
+ * Fri Sep 22 02:08:42 2023 from the following file(s):
  *
  * dot11f.frms
  *
@@ -4508,6 +4508,52 @@ uint32_t dot11f_get_packed_ie_bw_ind_element(
 }; /* End extern "C". */
 #endif /* C++ */
 
+/* EID 164 (0xa4) */
+typedef struct sDot11fIEbw_indication {
+	uint8_t             present;
+	uint8_t             reserved:1;
+	uint8_t disabled_sub_chan_bitmap_present:1;
+	uint8_t           reserved_1:6;
+	uint8_t        channel_width:3;
+	uint8_t           reserved_2:5;
+	uint8_t             ccfs0;
+	uint8_t             ccfs1;
+	uint8_t             disabled_sub_chan_bitmap[1][2];
+} tDot11fIEbw_indication;
+
+#define DOT11F_EID_BW_INDICATION (164)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_BW_INDICATION_MIN_LEN (4)
+
+#define DOT11F_IE_BW_INDICATION_MAX_LEN (6)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+__must_check uint32_t dot11f_unpack_ie_bw_indication(
+	tpAniSirGlobal,
+	uint8_t *,
+	uint8_t,
+	tDot11fIEbw_indication*,
+	bool);
+
+uint32_t dot11f_pack_ie_bw_indication(
+	tpAniSirGlobal,
+	tDot11fIEbw_indication *,
+	uint8_t *,
+	uint32_t,
+	uint32_t*);
+
+uint32_t dot11f_get_packed_ie_bw_indication(
+	tpAniSirGlobal,
+	tDot11fIEbw_indication *,
+	uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
 /* EID 164 (0xa4) */
 typedef struct sDot11fIElast_beacon_report_indication {
 	uint8_t             present;
@@ -4936,6 +4982,47 @@ uint32_t dot11f_get_packed_ie_transmit_power_env(
 }; /* End extern "C". */
 #endif /* C++ */
 
+/* EID 163 (0xa3) */
+typedef struct sDot11fIEwide_bw_chan_switch {
+	uint8_t             present;
+	uint8_t             new_chan_width;
+	uint8_t             new_center_chan_freq0;
+	uint8_t             new_center_chan_freq1;
+} tDot11fIEwide_bw_chan_switch;
+
+#define DOT11F_EID_WIDE_BW_CHAN_SWITCH (163)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_WIDE_BW_CHAN_SWITCH_MIN_LEN (3)
+
+#define DOT11F_IE_WIDE_BW_CHAN_SWITCH_MAX_LEN (3)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+__must_check uint32_t dot11f_unpack_ie_wide_bw_chan_switch(
+	tpAniSirGlobal,
+	uint8_t *,
+	uint8_t,
+	tDot11fIEwide_bw_chan_switch*,
+	bool);
+
+uint32_t dot11f_pack_ie_wide_bw_chan_switch(
+	tpAniSirGlobal,
+	tDot11fIEwide_bw_chan_switch *,
+	uint8_t *,
+	uint32_t,
+	uint32_t*);
+
+uint32_t dot11f_get_packed_ie_wide_bw_chan_switch(
+	tpAniSirGlobal,
+	tDot11fIEwide_bw_chan_switch *,
+	uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
 /* EID 197 (0xc5) */
 typedef struct sDot11fIEAID {
 	uint8_t             present;
@@ -6108,6 +6195,8 @@ typedef struct sDot11fIEMeasurementReport {
 			tDOT11F_U64 meas_start_time;
 			uint16_t meas_duration;
 			uint8_t chan_load;
+	tDot11fIEwide_bw_chan_switch wide_bw_chan_switch;
+	tDot11fIEbw_indication bw_indication;
 		} channel_load_report; /* type = 3 */
 		struct {
 			uint8_t regClass;
@@ -6242,6 +6331,8 @@ typedef struct sDot11fIEMeasurementRequest {
 			uint16_t randomization_intv;
 			uint16_t meas_duration;
 	tDot11fIErrm_reporting rrm_reporting;
+	tDot11fIEwide_bw_chan_switch wide_bw_chan_switch;
+	tDot11fIEbw_indication bw_indication;
 		} channel_load; /* measurement_type = 3 */
 		struct {
 			uint8_t regClass;

File diff suppressed because it is too large
+ 319 - 193
core/mac/src/sys/legacy/src/utils/src/dot11f.c


Some files were not shown because too many files changed in this diff