Browse Source

qcacld-3.0: Add dot11f support to handle t2lm action frames

Add dot11f support to handle t2lm negotiation action frames
such as negotiation request, negotiation response, and
teardown action frames.

Change-Id: I4ddb40267da09a27cfe6cb686a0037867943602e
CRs-Fixed: 3367423
Gururaj Pandurangi 2 years ago
parent
commit
2d198ceb4e

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

@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2007, 2014-2018, 2020-2021 The Linux Foundation.
  * All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -4875,6 +4875,28 @@ FRAME delba_req
     FF    Reason;
 }
 
+FRAME t2lm_neg_req
+{
+    FF    Category;
+    FF    Action;
+    FF    DialogToken;
+    OPTIE t2lm_ie[0..2];
+}
+
+FRAME t2lm_neg_rsp
+{
+    FF    Category;
+    FF    Action;
+    FF    DialogToken;
+    FF    Status;
+}
+
+FRAME t2lm_teardown
+{
+    FF    Category;
+    FF    Action;
+}
+
 FRAME vendor_action_frame
 {
     FF    Category;

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

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -27,7 +27,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Mon Nov 14 15:58:33 2022 from the following file(s):
+ * Tue Dec 13 17:55:43 2022 from the following file(s):
  *
  * dot11f.frms
  *
@@ -12501,13 +12501,93 @@ uint32_t dot11f_get_packed_p2p_oper_chan_change_confirmSize(tpAniSirGlobal pCtx,
 } /* End extern "C". */
 #endif /* C++ */
 
+typedef struct sDot11ft2lm_neg_req{
+	tDot11fFfCategory           Category;
+	tDot11fFfAction             Action;
+	tDot11fFfDialogToken        DialogToken;
+	uint16_t                    num_t2lm_ie;
+	tDot11fIEt2lm_ie            t2lm_ie[2];
+} tDot11ft2lm_neg_req;
+
+#define DOT11F_T2LM_NEG_REQ (53)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+
+uint32_t dot11f_unpack_t2lm_neg_req(tpAniSirGlobal pCtx,
+	uint8_t *pBuf, uint32_t nBuf,
+	tDot11ft2lm_neg_req * pFrm, bool append_ie);
+uint32_t dot11f_pack_t2lm_neg_req(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_req *pFrm, uint8_t *pBuf,
+	uint32_t nBuf, uint32_t *pnConsumed);
+uint32_t dot11f_get_packed_t2lm_neg_reqSize(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_req *pFrm,
+	uint32_t *pnNeeded);
+
+#ifdef __cplusplus
+} /* End extern "C". */
+#endif /* C++ */
+
+typedef struct sDot11ft2lm_neg_rsp{
+	tDot11fFfCategory           Category;
+	tDot11fFfAction             Action;
+	tDot11fFfDialogToken        DialogToken;
+	tDot11fFfStatus             Status;
+} tDot11ft2lm_neg_rsp;
+
+#define DOT11F_T2LM_NEG_RSP (54)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+
+uint32_t dot11f_unpack_t2lm_neg_rsp(tpAniSirGlobal pCtx,
+	uint8_t *pBuf, uint32_t nBuf,
+	tDot11ft2lm_neg_rsp * pFrm, bool append_ie);
+uint32_t dot11f_pack_t2lm_neg_rsp(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_rsp *pFrm, uint8_t *pBuf,
+	uint32_t nBuf, uint32_t *pnConsumed);
+uint32_t dot11f_get_packed_t2lm_neg_rspSize(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_rsp *pFrm,
+	uint32_t *pnNeeded);
+
+#ifdef __cplusplus
+} /* End extern "C". */
+#endif /* C++ */
+
+typedef struct sDot11ft2lm_teardown{
+	tDot11fFfCategory        Category;
+	tDot11fFfAction          Action;
+} tDot11ft2lm_teardown;
+
+#define DOT11F_T2LM_TEARDOWN (55)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+
+uint32_t dot11f_unpack_t2lm_teardown(tpAniSirGlobal pCtx,
+	uint8_t *pBuf, uint32_t nBuf,
+	tDot11ft2lm_teardown * pFrm, bool append_ie);
+uint32_t dot11f_pack_t2lm_teardown(tpAniSirGlobal pCtx,
+	tDot11ft2lm_teardown *pFrm, uint8_t *pBuf,
+	uint32_t nBuf, uint32_t *pnConsumed);
+uint32_t dot11f_get_packed_t2lm_teardownSize(tpAniSirGlobal pCtx,
+	tDot11ft2lm_teardown *pFrm,
+	uint32_t *pnNeeded);
+
+#ifdef __cplusplus
+} /* End extern "C". */
+#endif /* C++ */
+
 typedef struct sDot11fvendor_action_frame{
 	tDot11fFfCategory                     Category;
 	tDot11fFfvendor_oui                   vendor_oui;
 	tDot11fFfvendor_action_subtype        vendor_action_subtype;
 } tDot11fvendor_action_frame;
 
-#define DOT11F_VENDOR_ACTION_FRAME (53)
+#define DOT11F_VENDOR_ACTION_FRAME (56)
 
 #ifdef __cplusplus
 extern "C" {

+ 165 - 2
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -25,7 +25,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Mon Nov 14 15:58:33 2022 from the following file(s):
+ * Tue Dec 13 17:55:43 2022 from the following file(s):
  *
  * dot11f.frms
  *
@@ -14235,6 +14235,94 @@ uint32_t dot11f_unpack_p2p_oper_chan_change_confirm(tpAniSirGlobal pCtx,
 
 } /* End dot11f_unpack_p2p_oper_chan_change_confirm. */
 
+static const tFFDefn FFS_t2lm_neg_req[] = {
+	{ "Category", offsetof(tDot11ft2lm_neg_req, Category), SigFfCategory,
+	DOT11F_FF_CATEGORY_LEN, },
+	{ "Action", offsetof(tDot11ft2lm_neg_req, Action), SigFfAction,
+	DOT11F_FF_ACTION_LEN, },
+	{ "DialogToken", offsetof(tDot11ft2lm_neg_req, DialogToken),
+	SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, },
+	{ NULL, 0, 0, 0,},
+};
+
+static const tIEDefn IES_t2lm_neg_req[] = {
+	{ offsetof(tDot11ft2lm_neg_req, t2lm_ie), offsetof(tDot11fIEt2lm_ie,
+	present), offsetof(tDot11ft2lm_neg_req, num_t2lm_ie), "t2lm_ie",
+	2, 5, 257, SigIet2lm_ie, {0, 0, 0, 0, 0},
+	0, DOT11F_EID_T2LM_IE, 109, 0, },
+	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
+
+uint32_t dot11f_unpack_t2lm_neg_req(tpAniSirGlobal pCtx,
+		uint8_t *pBuf, uint32_t nBuf,
+		tDot11ft2lm_neg_req *pFrm, bool append_ie)
+{
+	uint32_t i = 0;
+	uint32_t status = 0;
+	status = unpack_core(pCtx, pBuf, nBuf,
+		      FFS_t2lm_neg_req, IES_t2lm_neg_req,
+		      (uint8_t *)pFrm, sizeof(*pFrm), append_ie);
+
+	(void)i;
+	return status;
+
+} /* End dot11f_unpack_t2lm_neg_req. */
+
+static const tFFDefn FFS_t2lm_neg_rsp[] = {
+	{ "Category", offsetof(tDot11ft2lm_neg_rsp, Category), SigFfCategory,
+	DOT11F_FF_CATEGORY_LEN, },
+	{ "Action", offsetof(tDot11ft2lm_neg_rsp, Action), SigFfAction,
+	DOT11F_FF_ACTION_LEN, },
+	{ "DialogToken", offsetof(tDot11ft2lm_neg_rsp, DialogToken),
+	SigFfDialogToken, DOT11F_FF_DIALOGTOKEN_LEN, },
+	{ "Status", offsetof(tDot11ft2lm_neg_rsp, Status), SigFfStatus,
+	DOT11F_FF_STATUS_LEN, },
+	{ NULL, 0, 0, 0,},
+};
+
+static const tIEDefn IES_t2lm_neg_rsp[] = {
+	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
+
+uint32_t dot11f_unpack_t2lm_neg_rsp(tpAniSirGlobal pCtx,
+		uint8_t *pBuf, uint32_t nBuf,
+		tDot11ft2lm_neg_rsp *pFrm, bool append_ie)
+{
+	uint32_t i = 0;
+	uint32_t status = 0;
+	status = unpack_core(pCtx, pBuf, nBuf,
+		      FFS_t2lm_neg_rsp, IES_t2lm_neg_rsp,
+		      (uint8_t *)pFrm, sizeof(*pFrm), append_ie);
+
+	(void)i;
+	return status;
+
+} /* End dot11f_unpack_t2lm_neg_rsp. */
+
+static const tFFDefn FFS_t2lm_teardown[] = {
+	{ "Category", offsetof(tDot11ft2lm_teardown, Category), SigFfCategory,
+	DOT11F_FF_CATEGORY_LEN, },
+	{ "Action", offsetof(tDot11ft2lm_teardown, Action), SigFfAction,
+	DOT11F_FF_ACTION_LEN, },
+	{ NULL, 0, 0, 0,},
+};
+
+static const tIEDefn IES_t2lm_teardown[] = {
+	{0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },};
+
+uint32_t dot11f_unpack_t2lm_teardown(tpAniSirGlobal pCtx,
+		uint8_t *pBuf, uint32_t nBuf,
+		tDot11ft2lm_teardown *pFrm, bool append_ie)
+{
+	uint32_t i = 0;
+	uint32_t status = 0;
+	status = unpack_core(pCtx, pBuf, nBuf,
+		      FFS_t2lm_teardown, IES_t2lm_teardown,
+		      (uint8_t *)pFrm, sizeof(*pFrm), append_ie);
+
+	(void)i;
+	return status;
+
+} /* End dot11f_unpack_t2lm_teardown. */
+
 static const tFFDefn FFS_vendor_action_frame[] = {
 	{ "Category", offsetof(tDot11fvendor_action_frame, Category),
 	SigFfCategory, DOT11F_FF_CATEGORY_LEN, },
@@ -18403,6 +18491,36 @@ uint32_t dot11f_get_packed_p2p_oper_chan_change_confirmSize(tpAniSirGlobal pCtx,
 	return status;
 } /* End dot11f_get_packed_p2p_oper_chan_change_confirmSize. */
 
+uint32_t dot11f_get_packed_t2lm_neg_reqSize(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_req *pFrm, uint32_t *pnNeeded)
+{
+	uint32_t status = 0;
+	*pnNeeded = 3;
+	status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded,
+				      IES_t2lm_neg_req);
+	return status;
+} /* End dot11f_get_packed_t2lm_neg_reqSize. */
+
+uint32_t dot11f_get_packed_t2lm_neg_rspSize(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_rsp *pFrm, uint32_t *pnNeeded)
+{
+	uint32_t status = 0;
+	*pnNeeded = 5;
+	status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded,
+				      IES_t2lm_neg_rsp);
+	return status;
+} /* End dot11f_get_packed_t2lm_neg_rspSize. */
+
+uint32_t dot11f_get_packed_t2lm_teardownSize(tpAniSirGlobal pCtx,
+	tDot11ft2lm_teardown *pFrm, uint32_t *pnNeeded)
+{
+	uint32_t status = 0;
+	*pnNeeded = 2;
+	status = get_packed_size_core(pCtx, (uint8_t *)pFrm, pnNeeded,
+				      IES_t2lm_teardown);
+	return status;
+} /* End dot11f_get_packed_t2lm_teardownSize. */
+
 uint32_t dot11f_get_packed_vendor_action_frameSize(tpAniSirGlobal pCtx,
 	tDot11fvendor_action_frame *pFrm, uint32_t *pnNeeded)
 {
@@ -31080,6 +31198,51 @@ uint32_t dot11f_pack_p2p_oper_chan_change_confirm(tpAniSirGlobal pCtx,
 
 } /* End dot11f_unpack_p2p_oper_chan_change_confirm. */
 
+uint32_t dot11f_pack_t2lm_neg_req(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_req *pFrm,
+	uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed)
+{
+	uint32_t i = 0;
+	uint32_t status = 0;
+	(void)i;
+	*pnConsumed = 0U;
+	status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed,
+			   FFS_t2lm_neg_req, IES_t2lm_neg_req);
+
+	return status;
+
+} /* End dot11f_unpack_t2lm_neg_req. */
+
+uint32_t dot11f_pack_t2lm_neg_rsp(tpAniSirGlobal pCtx,
+	tDot11ft2lm_neg_rsp *pFrm,
+	uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed)
+{
+	uint32_t i = 0;
+	uint32_t status = 0;
+	(void)i;
+	*pnConsumed = 0U;
+	status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed,
+			   FFS_t2lm_neg_rsp, IES_t2lm_neg_rsp);
+
+	return status;
+
+} /* End dot11f_unpack_t2lm_neg_rsp. */
+
+uint32_t dot11f_pack_t2lm_teardown(tpAniSirGlobal pCtx,
+	tDot11ft2lm_teardown *pFrm,
+	uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed)
+{
+	uint32_t i = 0;
+	uint32_t status = 0;
+	(void)i;
+	*pnConsumed = 0U;
+	status = pack_core(pCtx, (uint8_t *)pFrm, pBuf, nBuf, pnConsumed,
+			   FFS_t2lm_teardown, IES_t2lm_teardown);
+
+	return status;
+
+} /* End dot11f_unpack_t2lm_teardown. */
+
 uint32_t dot11f_pack_vendor_action_frame(tpAniSirGlobal pCtx,
 	tDot11fvendor_action_frame *pFrm,
 	uint8_t *pBuf, uint32_t nBuf, uint32_t *pnConsumed)