From e6b159369ec79e4d601f03d51c8b25863269e784 Mon Sep 17 00:00:00 2001 From: Subrat Mishra Date: Thu, 6 Jul 2023 16:24:25 +0530 Subject: [PATCH] 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 --- .../lmac_if/inc/wlan_lmac_if_def.h | 6 ++++++ .../lmac_if/src/wlan_lmac_if.c | 15 +++++++++++++++ wmi/inc/wmi_unified_param.h | 3 +++ wmi/src/wmi_unified_tlv.c | 4 ++++ 4 files changed, 28 insertions(+) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index d4060af560..908a83a3b3 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/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 diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c index f14c2f668c..4eb9e2effa 100644 --- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c +++ b/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 diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index bf8ebc3b14..bfadf69366 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/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 diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index bc8077d15e..4178557015 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/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 } /**