Browse Source

qcacld-3.0: Add support to send MSCS Request frames

Add support to send MSCS add/change/remove types of Action frames
to the connected AP.

Change-Id: I12c28700007302fd1b1ff22edd23edb98c3bc144
CRs-Fixed: 2791794
Abhinav Kumar 4 years ago
parent
commit
f797891003

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

@@ -99,6 +99,7 @@ const EID_20_40_BSS_COEXISTENCE      =  72;
 const EID_20_40_BSS_INTOLERANT_REPORT=  73;
 const EID_OBSS_SCAN_PARAMETERS       =  74;
 const EID_FT_RIC_DESCRIPTOR          =  75;
+const EID_MSCS_STATUS                =  76;
 const EID_LINK_IDENTIFIER            = 101;
 const EID_PTI_CONTROL                = 105;
 const EID_PU_BUFFER_STATUS           = 106;
@@ -2910,6 +2911,57 @@ IE MeasurementRequest (EID_MEAS_REQUEST)  // 7.3.2.21
     };
 }
 
+IE tclas_mask (EID_EXTN_ID_ELEMENT) OUI (0x59)
+{
+    classifier_type, 1;
+    classifier_mask, 1;
+    UNION info (DISCRIMINATOR classifier_type)
+    {
+        IpParams (classifier_type IS 4)
+        {
+            version, 1;
+            UNION params (DISCRIMINATOR version)
+            {
+                IpV4Params (version IS 4)
+                {
+                    source[4];
+                    dest[4];
+                    src_port, 2;
+                    dest_port, 2;
+                    DSCP, 1;
+                    proto, 1;
+                    reserved, 1;
+                }
+                IpV6Params (version IS 6)
+                {
+                    source[16];
+                    dest[16];
+                    src_port, 2;
+                    dest_port, 2;
+                    DSCP, 1;
+                    next_header, 1;
+                    flow_label[3];
+                }
+            };
+        }
+    };
+}
+
+IE mscs_status (EID_MSCS_STATUS)
+{
+     status_code,        1;
+}
+
+IE decriptor_element (EID_EXTN_ID_ELEMENT) OUI (0x58)
+{
+     request_type,                1;
+     user_priority_control,       2;
+     stream_timeout,              4;
+     OPTIE IE tclas_mask;
+     OPTIE IE mscs_status;
+     //Optional Vendor specific IEs ... ignoring
+}
+
 IE he_cap (EID_EXTN_ID_ELEMENT) OUI (0x23)
 {
     {
@@ -4454,6 +4506,14 @@ FRAME vendor_action_frame
     FF    vendor_action_subtype;
 }
 
+FRAME mscs_request_action_frame
+{
+    FF     Category;
+    FF     Action;
+    FF     DialogToken;
+    MANDIE decriptor_element;
+}
+
 // Local Variables:
 // mode: c++
 // fill-column: 77

+ 177 - 3
core/mac/src/include/dot11f.h

@@ -26,7 +26,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Tue Sep 29 11:31:39 2020 from the following file(s):
+ * Thu Oct  1 12:01:17 2020 from the following file(s):
  *
  * dot11f.frms
  *
@@ -4459,6 +4459,45 @@ uint32_t dot11f_get_packed_ie_max_age(
 }; /* End extern "C". */
 #endif /* C++ */
 
+/* EID 76 (0x4c) */
+typedef struct sDot11fIEmscs_status {
+	uint8_t             present;
+	uint8_t             status_code;
+} tDot11fIEmscs_status;
+
+#define DOT11F_EID_MSCS_STATUS (76)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_MSCS_STATUS_MIN_LEN (1)
+
+#define DOT11F_IE_MSCS_STATUS_MAX_LEN (1)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+__must_check uint32_t dot11f_unpack_ie_mscs_status(
+	tpAniSirGlobal,
+	uint8_t *,
+	uint8_t,
+	tDot11fIEmscs_status*,
+	bool);
+
+uint32_t dot11f_pack_ie_mscs_status(
+	tpAniSirGlobal,
+	tDot11fIEmscs_status *,
+	uint8_t *,
+	uint32_t,
+	uint32_t*);
+
+uint32_t dot11f_get_packed_ie_mscs_status(
+	tpAniSirGlobal,
+	tDot11fIEmscs_status *,
+	uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
 /* EID 52 (0x34) */
 typedef struct sDot11fIEneighbor_rpt {
 	uint8_t                             present;
@@ -4557,6 +4596,71 @@ uint32_t dot11f_get_packed_ie_req_mac_addr(
 }; /* End extern "C". */
 #endif /* C++ */
 
+/* EID 255 (0xff) Extended EID 89 (0x59) */
+typedef struct sDot11fIEtclas_mask {
+	uint8_t             present;
+	uint8_t             classifier_type;
+	uint8_t             classifier_mask;
+	union {
+		struct {
+			uint8_t version;
+			union {
+				struct {
+					uint8_t source[4];
+					uint8_t dest[4];
+					uint16_t src_port;
+					uint16_t dest_port;
+					uint8_t DSCP;
+					uint8_t proto;
+					uint8_t reserved;
+				} IpV4Params; /* version = 4 */
+				struct {
+					uint8_t source[16];
+					uint8_t dest[16];
+					uint16_t src_port;
+					uint16_t dest_port;
+					uint8_t DSCP;
+					uint8_t next_header;
+					uint8_t flow_label[3];
+				} IpV6Params; /* version = 6 */
+			} params;
+		} IpParams; /* classifier_type = 4 */
+	} info;
+} tDot11fIEtclas_mask;
+
+#define DOT11F_EID_TCLAS_MASK (255)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_TCLAS_MASK_MIN_LEN (18)
+
+#define DOT11F_IE_TCLAS_MASK_MAX_LEN (44)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+__must_check uint32_t dot11f_unpack_ie_tclas_mask(
+	tpAniSirGlobal,
+	uint8_t *,
+	uint8_t,
+	tDot11fIEtclas_mask*,
+	bool);
+
+uint32_t dot11f_pack_ie_tclas_mask(
+	tpAniSirGlobal,
+	tDot11fIEtclas_mask *,
+	uint8_t *,
+	uint32_t,
+	uint32_t*);
+
+uint32_t dot11f_get_packed_ie_tclas_mask(
+	tpAniSirGlobal,
+	tDot11fIEtclas_mask *,
+	uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
 /* EID 3 (0x03) */
 typedef struct sDot11fIEtgt_mac_addr {
 	uint8_t             present;
@@ -8561,6 +8665,49 @@ uint32_t dot11f_get_packed_ie_bss_color_change(
 }; /* End extern "C". */
 #endif /* C++ */
 
+/* EID 255 (0xff) Extended EID 88 (0x58) */
+typedef struct sDot11fIEdecriptor_element {
+	uint8_t                     present;
+	uint8_t                     request_type;
+	uint16_t                    user_priority_control;
+	uint32_t                    stream_timeout;
+	tDot11fIEtclas_mask         tclas_mask;
+	tDot11fIEmscs_status        mscs_status;
+} tDot11fIEdecriptor_element;
+
+#define DOT11F_EID_DECRIPTOR_ELEMENT (255)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_DECRIPTOR_ELEMENT_MIN_LEN (7)
+
+#define DOT11F_IE_DECRIPTOR_ELEMENT_MAX_LEN (56)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+__must_check uint32_t dot11f_unpack_ie_decriptor_element(
+	tpAniSirGlobal,
+	uint8_t *,
+	uint8_t,
+	tDot11fIEdecriptor_element*,
+	bool);
+
+uint32_t dot11f_pack_ie_decriptor_element(
+	tpAniSirGlobal,
+	tDot11fIEdecriptor_element *,
+	uint8_t *,
+	uint32_t,
+	uint32_t*);
+
+uint32_t dot11f_get_packed_ie_decriptor_element(
+	tpAniSirGlobal,
+	tDot11fIEdecriptor_element *,
+	uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
 /* EID 255 (0xff) Extended EID 32 (0x20) */
 typedef struct sDot11fIEdh_parameter_element {
 	uint8_t             present;
@@ -11608,6 +11755,33 @@ uint32_t dot11f_get_packed_ht2040_bss_coexistence_mgmt_action_frameSize(tpAniSir
 } /* End extern "C". */
 #endif /* C++ */
 
+typedef struct sDot11fmscs_request_action_frame{
+	tDot11fFfCategory                 Category;
+	tDot11fFfAction                   Action;
+	tDot11fFfDialogToken              DialogToken;
+	tDot11fIEdecriptor_element        decriptor_element;
+} tDot11fmscs_request_action_frame;
+
+#define DOT11F_MSCS_REQUEST_ACTION_FRAME (51)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+
+uint32_t dot11f_unpack_mscs_request_action_frame(tpAniSirGlobal pCtx,
+	uint8_t *pBuf, uint32_t nBuf,
+	tDot11fmscs_request_action_frame * pFrm, bool append_ie);
+uint32_t dot11f_pack_mscs_request_action_frame(tpAniSirGlobal pCtx,
+	tDot11fmscs_request_action_frame *pFrm, uint8_t *pBuf,
+	uint32_t nBuf, uint32_t *pnConsumed);
+uint32_t dot11f_get_packed_mscs_request_action_frameSize(tpAniSirGlobal pCtx,
+	tDot11fmscs_request_action_frame *pFrm,
+	uint32_t *pnNeeded);
+
+#ifdef __cplusplus
+} /* End extern "C". */
+#endif /* C++ */
+
 typedef struct sDot11fp2p_oper_chan_change_confirm{
 	tDot11fFfCategory                  Category;
 	tDot11fFfp2p_action_oui            p2p_action_oui;
@@ -11618,7 +11792,7 @@ typedef struct sDot11fp2p_oper_chan_change_confirm{
 	tDot11fIEOperatingMode             OperatingMode;
 } tDot11fp2p_oper_chan_change_confirm;
 
-#define DOT11F_P2P_OPER_CHAN_CHANGE_CONFIRM (51)
+#define DOT11F_P2P_OPER_CHAN_CHANGE_CONFIRM (52)
 
 #ifdef __cplusplus
 extern "C" {
@@ -11644,7 +11818,7 @@ typedef struct sDot11fvendor_action_frame{
 	tDot11fFfvendor_action_subtype        vendor_action_subtype;
 } tDot11fvendor_action_frame;
 
-#define DOT11F_VENDOR_ACTION_FRAME (52)
+#define DOT11F_VENDOR_ACTION_FRAME (53)
 
 #ifdef __cplusplus
 extern "C" {

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


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