Преглед изворни кода

qcacld-3.0: Move RNR flag from MLO to private mlme component

Besides MLO, legacy mode 6G SAP + 5G(2G) SAP are going to support RNR
IE. Move RNR related flag from MLO to private mlme component.
Remove mlo_rnr_updated in struct mlo_link_ie_info.
Add notify_co_located_ap_upt_rnr and related API in mlme_legacy_priv.

Change-Id: Ife86d1ed2fe8b633f6167750053b2aff37911299
CRs-Fixed: 3092483
Bing Sun пре 3 година
родитељ
комит
aebc2eea6f

+ 2 - 0
components/mlme/core/inc/wlan_mlme_main.h

@@ -415,6 +415,7 @@ struct wait_for_key_timer {
  *			  requests from some IOT APs
  * @ba_2k_jump_iot_ap: This is set to true if connected to the ba 2k jump IOT AP
  * @is_usr_ps_enabled: Is Power save enabled
+ * @notify_co_located_ap_upt_rnr: Notify co located AP to update RNR or not
  */
 struct mlme_legacy_priv {
 	bool chan_switch_in_progress;
@@ -455,6 +456,7 @@ struct mlme_legacy_priv {
 	qdf_time_t last_delba_sent_time;
 	bool ba_2k_jump_iot_ap;
 	bool is_usr_ps_enabled;
+	bool notify_co_located_ap_upt_rnr;
 };
 
 /**

+ 20 - 0
components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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
@@ -413,6 +414,25 @@ QDF_STATUS mlme_get_vdev_stop_type(struct wlan_objmgr_vdev *vdev,
 QDF_STATUS mlme_set_vdev_stop_type(struct wlan_objmgr_vdev *vdev,
 				   uint32_t vdev_stop_type);
 
+/**
+ * mlme_is_notify_co_located_ap_update_rnr() - Need co-located ap update rnr
+ * @vdev: vdev pointer
+ *
+ * Return: True if vdev need notify co-located ap to update rnr.
+ */
+bool mlme_is_notify_co_located_ap_update_rnr(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlme_set_notify_co_located_ap_update_rnr() - notify co-located ap to update
+ *                                              rnr
+ * @vdev: vdev pointer
+ * @update_rnr: whether to notify co-located ap to update rnr
+ *
+ * Return: Void
+ */
+void mlme_set_notify_co_located_ap_update_rnr(struct wlan_objmgr_vdev *vdev,
+					      bool update_rnr);
+
 /**
  * mlme_get_assoc_type() - get associate type
  * @vdev: vdev pointer

+ 29 - 0
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -400,6 +400,8 @@ static QDF_STATUS ap_mlme_start_continue(struct vdev_mlme_obj *vdev_mlme,
 {
 	mlme_legacy_debug("vdev id = %d ",
 			  vdev_mlme->vdev->vdev_objmgr.vdev_id);
+	mlme_set_notify_co_located_ap_update_rnr(vdev_mlme->vdev, true);
+
 	return wma_ap_mlme_vdev_start_continue(vdev_mlme, data_len, data);
 }
 
@@ -996,6 +998,33 @@ QDF_STATUS mlme_set_vdev_stop_type(struct wlan_objmgr_vdev *vdev,
 	return QDF_STATUS_SUCCESS;
 }
 
+void mlme_set_notify_co_located_ap_update_rnr(struct wlan_objmgr_vdev *vdev,
+					      bool upt_rnr)
+{
+	struct mlme_legacy_priv *mlme_priv;
+
+	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
+	if (!mlme_priv) {
+		mlme_legacy_err("vdev legacy private object is NULL");
+		return;
+	}
+
+	mlme_priv->notify_co_located_ap_upt_rnr = upt_rnr;
+}
+
+bool mlme_is_notify_co_located_ap_update_rnr(struct wlan_objmgr_vdev *vdev)
+{
+	struct mlme_legacy_priv *mlme_priv;
+
+	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
+	if (!mlme_priv) {
+		mlme_legacy_err("vdev legacy private object is NULL");
+		return false;
+	}
+
+	return mlme_priv->notify_co_located_ap_upt_rnr;
+}
+
 enum vdev_assoc_type  mlme_get_assoc_type(struct wlan_objmgr_vdev *vdev)
 {
 	struct mlme_legacy_priv *mlme_priv;

+ 0 - 2
core/mac/src/pe/include/lim_session.h

@@ -179,14 +179,12 @@ struct mlo_link_ie {
 /**
  * struct mlo_link_ie_info - information per link to populate mlo ie
  * @upt_bcn_mlo_ie: notify partner links to update their mlo ie of bcn temp
- * @mlo_rnr_updated: link already notified partner link to update rnr
  * @bss_param_change: bss param changed
  * @bcn_tmpl_exist: bcn template is generated or not
  * @link_ie: IEs which will be used for generating partner mlo IE
  */
 struct mlo_link_ie_info {
 	bool upt_bcn_mlo_ie;
-	bool mlo_rnr_updated;
 	bool bss_param_change;
 	bool bcn_tmpl_exist;
 	struct mlo_link_ie link_ie;

+ 6 - 3
core/mac/src/pe/sch/sch_api.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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
@@ -64,10 +65,12 @@ static void lim_notify_link_info(struct pe_session *pe_session)
 	int link;
 
 	if (!pe_session->mlo_link_info.upt_bcn_mlo_ie &&
-	    pe_session->mlo_link_info.mlo_rnr_updated)
+	    !mlme_is_notify_co_located_ap_update_rnr(pe_session->vdev))
 		return;
-	pe_session->mlo_link_info.mlo_rnr_updated = true;
-	pe_debug("mlo notify beacon change info to partner link");
+	pe_session->mlo_link_info.upt_bcn_mlo_ie = false;
+	mlme_set_notify_co_located_ap_update_rnr(pe_session->vdev, false);
+	pe_debug("vdev id %d mlo notify beacon change info to partner link",
+		 wlan_vdev_get_id(pe_session->vdev));
 	lim_get_mlo_vdev_list(pe_session, &vdev_count,
 			      wlan_vdev_list);
 	for (link = 0; link < vdev_count; link++) {

+ 26 - 0
core/mac/src/pe/sch/sch_beacon_gen.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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
@@ -126,6 +127,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_ds, &bcn_1->DSParams,
 			     sizeof(bcn_1->DSParams));
 		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d DSParams changed, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	qdf_mem_copy(&link_ie->link_wmm_params, &bcn_2->WMMParams,
@@ -139,6 +142,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_edca, &bcn_2->EDCAParamSet,
 			     sizeof(bcn_2->EDCAParamSet));
 		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d EDCAParamSet changed, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_csa, &bcn_2->ChanSwitchAnn,
@@ -146,6 +151,9 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		session->mlo_link_info.upt_bcn_mlo_ie = true;
 		qdf_mem_copy(&link_ie->link_csa, &bcn_2->ChanSwitchAnn,
 			     sizeof(bcn_2->ChanSwitchAnn));
+		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d csa added, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_ecsa, &bcn_2->ext_chan_switch_ann,
@@ -153,6 +161,9 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		session->mlo_link_info.upt_bcn_mlo_ie = true;
 		qdf_mem_copy(&link_ie->link_ecsa, &bcn_2->ext_chan_switch_ann,
 			     sizeof(bcn_2->ext_chan_switch_ann));
+		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d ecsa added, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_swt_time, &bcn_2->max_chan_switch_time,
@@ -161,6 +172,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_swt_time,
 			     &bcn_2->max_chan_switch_time,
 			     sizeof(bcn_2->max_chan_switch_time));
+		pe_debug("vdev id %d max channel switch time added",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_quiet, &bcn_2->Quiet,
@@ -168,6 +181,9 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		session->mlo_link_info.upt_bcn_mlo_ie = true;
 		qdf_mem_copy(&link_ie->link_quiet, &bcn_2->Quiet,
 			     sizeof(bcn_2->Quiet));
+		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d quiet added, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_ht_info, &bcn_2->HTInfo,
@@ -175,6 +191,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_ht_info, &bcn_2->HTInfo,
 			     sizeof(bcn_2->HTInfo));
 		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d HTInfo changed, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_vht_op, &bcn_2->VHTOperation,
@@ -182,6 +200,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_vht_op, &bcn_2->VHTOperation,
 			     sizeof(bcn_2->VHTOperation));
 		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d VHTOperation changed, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_he_op, &bcn_2->he_op,
@@ -189,6 +209,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_he_op, &bcn_2->he_op,
 			     sizeof(bcn_2->he_op));
 		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d he_op changed, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	if (qdf_mem_cmp(&link_ie->link_eht_op, &bcn_2->eht_op,
@@ -196,6 +218,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 		qdf_mem_copy(&link_ie->link_eht_op, &bcn_2->eht_op,
 			     sizeof(bcn_2->eht_op));
 		session->mlo_link_info.bss_param_change = true;
+		pe_debug("vdev id %d eht_op changed, critical update",
+			 wlan_vdev_get_id(session->vdev));
 	}
 
 	/*
@@ -222,6 +246,8 @@ static void lim_update_link_info(struct mac_context *mac_ctx,
 					    SIR_MAX_BEACON_SIZE - offset,
 					    &n_bytes);
 			bcn_1->Capabilities.criticalUpdateFlag = 0;
+			mlme_set_notify_co_located_ap_update_rnr(session->vdev,
+								 true);
 		}
 	} else {
 		//save one time

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

@@ -7535,7 +7535,11 @@ void populate_dot11f_mlo_rnr(struct mac_context *mac_ctx,
 		if (!rnr_populated) {
 			populate_dot11f_rnr_tbtt_info_10(mac_ctx, session,
 							 link_session, dot11f);
-			pe_err("TD: we only populate one RNR IE for one link");
+			pe_debug("mlo vdev id %d populate vdev id %d link id %d op class %d chan num %d in RNR IE",
+				 wlan_vdev_get_id(session->vdev),
+				 wlan_vdev_get_id(wlan_vdev_list[link]),
+				 dot11f->tbtt_info.tbtt_info_10.link_id,
+				 dot11f->op_class, dot11f->channel_num);
 			rnr_populated = true;
 		}
 		lim_mlo_release_vdev_ref(wlan_vdev_list[link]);