Browse Source

qcacld-3.0: Update per link mlo stats capability

Update if mlo per link stats is supported by firmware
in hdd context.

Change-Id: I0fce7871752ada5be8debd0612f2326e34ceebfa
CRs-Fixed: 3531493
Aditya Kodukula 1 year ago
parent
commit
1dc1bbe414
4 changed files with 42 additions and 0 deletions
  1. 4 0
      core/hdd/inc/wlan_hdd_main.h
  2. 16 0
      core/hdd/src/wlan_hdd_main.c
  3. 4 0
      core/wma/inc/wma_tgt_cfg.h
  4. 18 0
      core/wma/src/wma_main.c

+ 4 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -1921,6 +1921,7 @@ enum wlan_state_ctrl_str_id {
  * @last_pagefault_ssr_time: Time when last recovery was triggered because of
  * @host wakeup from fw with reason as pagefault
  * @bridgeaddr: Bridge MAC address
+ * @is_mlo_per_link_stats_supported: Per link mlo stats is supported or not
  */
 struct hdd_context {
 	struct wlan_objmgr_psoc *psoc;
@@ -2197,6 +2198,9 @@ struct hdd_context {
 #endif
 	qdf_time_t last_pagefault_ssr_time;
 	uint8_t bridgeaddr[QDF_MAC_ADDR_SIZE];
+#ifdef WLAN_FEATURE_11BE_MLO
+	bool is_mlo_per_link_stats_supported;
+#endif
 };
 
 /**

+ 16 - 0
core/hdd/src/wlan_hdd_main.c

@@ -1767,6 +1767,21 @@ static bool hdd_dot11Mode_support_11be(enum hdd_dot11_mode dot11Mode)
 }
 #endif
 
+#ifdef WLAN_FEATURE_11BE_MLO
+static void
+hdd_update_mlo_per_link_stats_capability(struct hdd_context *hdd_ctx,
+					 struct wma_tgt_services *cfg)
+{
+	hdd_ctx->is_mlo_per_link_stats_supported =
+				cfg->is_mlo_per_link_stats_supported;
+}
+#else
+static void
+hdd_update_mlo_per_link_stats_capability(struct hdd_context *hdd_ctx,
+					 struct wma_tgt_services *cfg)
+{
+}
+#endif
 
 static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
 				    struct wma_tgt_services *cfg)
@@ -1867,6 +1882,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
 	hdd_update_fw_tdls_6g_capability(hdd_ctx, cfg);
 	hdd_update_fw_tdls_wideband_capability(hdd_ctx, cfg);
 	ucfg_psoc_mlme_set_11be_capab(hdd_ctx->psoc, cfg->en_11be);
+	hdd_update_mlo_per_link_stats_capability(hdd_ctx, cfg);
 }
 
 /**

+ 4 - 0
core/wma/inc/wma_tgt_cfg.h

@@ -57,6 +57,7 @@
  * @en_11be: enable 11be
  * @dynamic_vdev_macaddr_support: Dynamic update of vdev MAC addr is
  *                                supported or not
+ * @is_mlo_per_link_stats_supported: Per link mlo stats is supported or not
  */
 struct wma_tgt_services {
 	uint32_t sta_power_save;
@@ -110,6 +111,9 @@ struct wma_tgt_services {
 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
 	bool dynamic_vdev_macaddr_support;
 #endif
+#ifdef WLAN_FEATURE_11BE_MLO
+	bool is_mlo_per_link_stats_supported;
+#endif
 };
 
 /**

+ 18 - 0
core/wma/src/wma_main.c

@@ -3372,12 +3372,29 @@ wma_update_num_tdls_vdevs_if_11be_mlo(struct wlan_objmgr_psoc *psoc,
 	wlan_res_cfg->num_tdls_vdevs = WLAN_UMAC_MLO_MAX_VDEVS;
 	wma_debug("update tdls num vdevs %d", wlan_res_cfg->num_tdls_vdevs);
 }
+
+static void
+wma_get_service_cap_per_link_mlo_stats(struct wmi_unified *wmi_handle,
+				       struct wma_tgt_services *cfg)
+{
+	cfg->is_mlo_per_link_stats_supported =
+		wmi_service_enabled(wmi_handle,
+				    wmi_service_per_link_stats_support);
+	wma_debug("mlo_per_link stats is %s supported by FW",
+		  cfg->is_mlo_per_link_stats_supported ? "" : "NOT");
+}
 #else
 static void
 wma_update_num_tdls_vdevs_if_11be_mlo(struct wlan_objmgr_psoc *psoc,
 				      target_resource_config *wlan_res_cfg)
 {
 }
+
+static void
+wma_get_service_cap_per_link_mlo_stats(struct wmi_unified *wmi_handle,
+				       struct wma_tgt_services *cfg)
+{
+}
 #endif
 
 /**
@@ -5363,6 +5380,7 @@ static inline void wma_update_target_services(struct wmi_unified *wmi_handle,
 	wma_get_tdls_6g_support(wmi_handle, cfg);
 	wma_get_tdls_wideband_support(wmi_handle, cfg);
 	wma_get_dynamic_vdev_macaddr_support(wmi_handle, cfg);
+	wma_get_service_cap_per_link_mlo_stats(wmi_handle, cfg);
 }
 
 /**