Browse Source

qcacmn: Critical update signaling for beacon

Critical update is the explicit signaling for STA to notify
any change in BSS param.

There are two categories of critical update params.
Category 1 elements:  CSA, ECSA, Quiet, Quiet channel,
            Max Ch Switch Time, that are directly included in
            the per-STA profile of partner AP.
Category 2 elements: Except category 1 all operational IEs
           HT/VHT/HE/EHT and WMM/EDCA/MUEDCA params.

Defined below vdev flags to track change in Category 1 and
Category 2 CU params per ML VDEV
WLAN_VDEV_OP_CU_CAT1: Change in category 1 param
WLAN_VDEV_OP_CU_CAT2: Change in category 2 param

Host notify to FW by updating current link CU param in
wmi_bcn_tmpl_ml_info TLV of BCN TMPL CMD.
Set the corresponding cu_vdev_map category 1 / category 2
based on change in critical update params of ML VDEV.

Change-Id: I8fe71309ab92a459524bdc5739f8b4a4a545562e
CRs-Fixed: 3199331
Basamma Yakkanahalli 3 years ago
parent
commit
a684d24bfe

+ 18 - 0
umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h

@@ -207,6 +207,24 @@
 #define WLAN_VDEV_OP_BLOCK_TX_TRAFFIC       0x00020000
   /* for mbo functionality */
 #define WLAN_VDEV_OP_MBO                    0x00040000
+/* VDEV Critical update category-1
+ * Inclusion of Critical Update IES flag
+ * This includes: CSA, ECSA, Quiet
+ * Quiet channel, Max Ch Switch Time IEs.
+ */
+#define WLAN_VDEV_OP_CU_CAT1                0x00080000
+/* VDEV Critical update category-2
+ * Modification of Critical Update IES flag
+ * This includes: DSSS Param, HT Operation element
+ * VHT Operation element, HE Operation element
+ * EHT Operation element, MU EDCA Param, EDCA param
+ * UORA Param, BSS Color Change Announcement element
+ * Spatial Reuse Param Set element
+ * Operating Mode Notification element
+ * Wide Bandwidth Channel Switch element
+ * Broadcast TWT element
+ */
+#define WLAN_VDEV_OP_CU_CAT2                0x00100000
 
  /* CAPABILITY: IBSS available */
 #define WLAN_VDEV_C_IBSS                    0x00000001

+ 20 - 0
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_tx_defs.h

@@ -232,6 +232,24 @@ struct mlo_bcn_templ_partner_links {
 	uint8_t num_links;
 	struct ml_bcn_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS];
 };
+
+/**
+ * struct mlo_bcn_tmpl_ml_info - Impacted link critical update information
+ * @hw_link_id: Unique hw link id across SoCs
+ * CU vdev map for the Critical update category-1 (Inclusion of CU IES)
+ * @cu_vdev_map_cat1_lo: bits 31:0 to represent vdev ids 0 to 31
+ * @cu_vdev_map_cat1_hi: bits 63:32 to represent vdev ids 32 to 63
+ * CU vdev map for the Critical update category-2 (modification of CU IES)
+ * @cu_vdev_map_cat2_lo: bits 31:0 to represent vdev ids 0 to 31
+ * @cu_vdev_map_cat2_hi: bits 63:32 to represent vdev ids 32 to 63
+ */
+struct mlo_bcn_tmpl_ml_info {
+	uint32_t hw_link_id;
+	uint32_t cu_vdev_map_cat1_lo;
+	uint32_t cu_vdev_map_cat1_hi;
+	uint32_t cu_vdev_map_cat2_lo;
+	uint32_t cu_vdev_map_cat2_hi;
+};
 #endif
 
 /**
@@ -255,6 +273,7 @@ struct mlo_bcn_templ_partner_links {
  * @enable_bigtk: enable bigtk or not
  * @frm: beacon template parameter
  * @mlo_partner: Partner link information
+ * @cu_ml_info: Impacted link critical update information
  */
 struct beacon_tmpl_params {
 	uint8_t vdev_id;
@@ -272,6 +291,7 @@ struct beacon_tmpl_params {
 	uint8_t *frm;
 #ifdef WLAN_FEATURE_11BE_MLO
 	struct mlo_bcn_templ_partner_links mlo_partner;
+	struct mlo_bcn_tmpl_ml_info cu_ml_info;
 #endif
 };
 

+ 31 - 0
wmi/inc/wmi_unified_11be_tlv.h

@@ -77,6 +77,25 @@ size_t bcn_tmpl_mlo_param_size(struct beacon_tmpl_params *param);
  */
 uint8_t *bcn_tmpl_add_ml_partner_links(uint8_t *buf_ptr,
 				       struct beacon_tmpl_params *param);
+
+/**
+ * bcn_tmpl_ml_info_size() - Get ML info size in beacon template
+ * @param: Pointer to beacon template param
+ *
+ * Return: size of ML info in beacon template
+ */
+size_t bcn_tmpl_ml_info_size(struct beacon_tmpl_params *param);
+
+/**
+ * bcn_tmpl_add_ml_info - Add MLO info to update Critical Update info in
+ *                                 beacon template command
+ * @buf_ptr: pointer to beacon cmd buffer.
+ * @param: pointer to beacon template params
+ *
+ * Return: pointer to new offset of cmd buffer
+ */
+uint8_t *bcn_tmpl_add_ml_info(uint8_t *buf_ptr,
+			      struct beacon_tmpl_params *param);
 /**
  *  peer_create_add_mlo_params() - Add MLO params in peer create cmd
  *  @buf_ptr: pointer to peer create cmd buffer.
@@ -201,6 +220,18 @@ static uint8_t *bcn_tmpl_add_ml_partner_links(uint8_t *buf_ptr,
 	return buf_ptr + WMI_TLV_HDR_SIZE;
 }
 
+static size_t bcn_tmpl_ml_info_size(struct beacon_tmpl_params *param)
+{
+	return WMI_TLV_HDR_SIZE;
+}
+
+static uint8_t *bcn_tmpl_add_ml_info(uint8_t *buf_ptr,
+				     struct beacon_tmpl_params *param)
+{
+	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, 0);
+	return buf_ptr + WMI_TLV_HDR_SIZE;
+}
+
 static uint8_t *peer_create_add_mlo_params(uint8_t *buf_ptr,
 					  struct peer_create_params *req)
 {

+ 29 - 0
wmi/src/wmi_unified_11be_tlv.c

@@ -151,6 +151,35 @@ uint8_t *bcn_tmpl_add_ml_partner_links(uint8_t *buf_ptr,
 	return buf_ptr + WMI_TLV_HDR_SIZE;
 }
 
+size_t bcn_tmpl_ml_info_size(struct beacon_tmpl_params *param)
+{
+	return (WMI_TLV_HDR_SIZE + sizeof(wmi_bcn_tmpl_ml_info));
+}
+
+uint8_t *bcn_tmpl_add_ml_info(uint8_t *buf_ptr,
+			      struct beacon_tmpl_params *param)
+{
+	wmi_bcn_tmpl_ml_info *ml_info;
+
+	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
+		       sizeof(wmi_bcn_tmpl_ml_info));
+	buf_ptr += WMI_TLV_HDR_SIZE;
+
+	ml_info = (wmi_bcn_tmpl_ml_info *)buf_ptr;
+
+	WMITLV_SET_HDR(&ml_info->tlv_header,
+		       WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_info,
+		       WMITLV_GET_STRUCT_TLVLEN(wmi_bcn_tmpl_ml_info));
+
+	ml_info->hw_link_id = param->cu_ml_info.hw_link_id;
+	ml_info->cu_vdev_map_cat1_lo = param->cu_ml_info.cu_vdev_map_cat1_lo;
+	ml_info->cu_vdev_map_cat1_hi = param->cu_ml_info.cu_vdev_map_cat1_hi;
+	ml_info->cu_vdev_map_cat2_lo = param->cu_ml_info.cu_vdev_map_cat2_lo;
+	ml_info->cu_vdev_map_cat2_hi = param->cu_ml_info.cu_vdev_map_cat2_hi;
+
+	return buf_ptr + sizeof(wmi_bcn_tmpl_ml_info);
+}
+
 size_t peer_create_mlo_params_size(struct peer_create_params *req)
 {
 	return sizeof(wmi_peer_create_mlo_params) + WMI_TLV_HDR_SIZE;

+ 6 - 1
wmi/src/wmi_unified_tlv.c

@@ -2650,7 +2650,10 @@ static QDF_STATUS send_beacon_tmpl_send_cmd_tlv(wmi_unified_t wmi_handle,
 
 	wmi_buf_len = sizeof(wmi_bcn_tmpl_cmd_fixed_param) +
 		      sizeof(wmi_bcn_prb_info) + WMI_TLV_HDR_SIZE +
-		      param->tmpl_len_aligned + bcn_tmpl_mlo_param_size(param);
+		      param->tmpl_len_aligned +
+		      bcn_tmpl_mlo_param_size(param) +
+		      bcn_tmpl_ml_info_size(param);
+
 	wmi_buf = wmi_buf_alloc(wmi_handle, wmi_buf_len);
 	if (!wmi_buf)
 		return QDF_STATUS_E_NOMEM;
@@ -2697,6 +2700,8 @@ static QDF_STATUS send_beacon_tmpl_send_cmd_tlv(wmi_unified_t wmi_handle,
 	buf_ptr += roundup(param->tmpl_len, sizeof(uint32_t));
 	buf_ptr = bcn_tmpl_add_ml_partner_links(buf_ptr, param);
 
+	buf_ptr = bcn_tmpl_add_ml_info(buf_ptr, param);
+
 	wmi_mtrace(WMI_BCN_TMPL_CMDID, cmd->vdev_id, 0);
 	ret = wmi_unified_cmd_send(wmi_handle,
 				   wmi_buf, wmi_buf_len, WMI_BCN_TMPL_CMDID);