Selaa lähdekoodia

qcacmn: Extract WMI ATF 512 Max client support from FW

Extract WMI Service bit for ATF 512 Max client support advertised by
Firmware as part of wmi service ready.

Add rxops functions as for upper modules to get it.

Change-Id: I51e8dcaad96bdd29eb6fd4c37b0917127696ede6
CRs-Fixed: 3551661
Subrat Mishra 2 vuotta sitten
vanhempi
sitoutus
e6b159369e

+ 6 - 0
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -2101,6 +2101,8 @@ struct wlan_lmac_if_p2p_rx_ops {
  * @atf_process_tx_ppdu_stats:         Process Tx PPDU stats to get ATF stats
  * @atf_process_rx_ppdu_stats:         Process Rx PPDU stats to get ATF stats
  * @atf_is_stats_enabled:              Check ATF stats enabled or not
+ * @atf_set_fw_max_client_512_support: Set Max Client Support based on WMI
+ *    service bit announcement from FW
  */
 struct wlan_lmac_if_atf_rx_ops {
 	uint32_t (*atf_get_fmcap)(struct wlan_objmgr_psoc *psoc);
@@ -2143,6 +2145,10 @@ struct wlan_lmac_if_atf_rx_ops {
 	void (*atf_process_rx_ppdu_stats)(struct wlan_objmgr_pdev *pdev,
 					  qdf_nbuf_t msg);
 	uint8_t (*atf_is_stats_enabled)(struct wlan_objmgr_pdev *pdev);
+#ifdef WLAN_ATF_INCREASED_STA
+	void (*atf_set_fw_max_client_512_support)(struct wlan_objmgr_psoc *psoc,
+						  uint8_t val);
+#endif
 };
 #endif
 

+ 15 - 0
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -180,6 +180,20 @@ wlan_target_if_dcs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
 #endif /* DCS_INTERFERENCE_DETECTION */
 
 #ifdef WLAN_ATF_ENABLE
+#ifdef WLAN_ATF_INCREASED_STA
+static void
+wlan_lmac_if_atf_rx_ops_max_clients(struct wlan_lmac_if_atf_rx_ops *atf_rx_ops)
+{
+	atf_rx_ops->atf_set_fw_max_client_512_support =
+				tgt_atf_set_fw_cap_max_client_512_support;
+}
+#else
+static void
+wlan_lmac_if_atf_rx_ops_max_clients(struct wlan_lmac_if_atf_rx_ops *atf_rx_ops)
+{
+}
+#endif /* WLAN_ATF_INCREASED_STA */
+
 /**
  * wlan_lmac_if_atf_rx_ops_register() - Function to register ATF RX ops.
  * @rx_ops: Pointer to wlan_lmac_if_rx_ops
@@ -220,6 +234,7 @@ wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
 	atf_rx_ops->atf_process_tx_ppdu_stats = tgt_atf_process_tx_ppdu_stats;
 	atf_rx_ops->atf_process_rx_ppdu_stats = tgt_atf_process_rx_ppdu_stats;
 	atf_rx_ops->atf_is_stats_enabled = tgt_atf_is_stats_enabled;
+	wlan_lmac_if_atf_rx_ops_max_clients(atf_rx_ops);
 }
 #else
 static void

+ 3 - 0
wmi/inc/wmi_unified_param.h

@@ -6389,6 +6389,9 @@ typedef enum {
 	wmi_service_per_link_stats_support,
 #endif
 	wmi_service_aux_mac_support,
+#ifdef WLAN_ATF_INCREASED_STA
+	wmi_service_atf_max_client_512_support,
+#endif
 	wmi_services_max,
 } wmi_conv_service_ids;
 #define WMI_SERVICE_UNAVAILABLE 0xFFFF

+ 4 - 0
wmi/src/wmi_unified_tlv.c

@@ -22377,6 +22377,10 @@ static void populate_tlv_service(uint32_t *wmi_service)
 					WMI_SERVICE_PER_LINK_STATS_SUPPORT;
 #endif
 	wmi_service[wmi_service_aux_mac_support] = WMI_SERVICE_AUX_MAC_SUPPORT;
+#ifdef WLAN_ATF_INCREASED_STA
+	wmi_service[wmi_service_atf_max_client_512_support] =
+					WMI_SERVICE_ATF_MAX_CLIENT_512_SUPPORT;
+#endif
 }
 
 /**