From 499696eab59ba7217069091266339d3eb09f7294 Mon Sep 17 00:00:00 2001 From: Jinwei Chen Date: Tue, 28 Mar 2023 04:26:15 -0700 Subject: [PATCH] qcacmn: update TX ILP capability to DP and target After receiving WMI service ready ext2 event and htt msdu index to qtype map is derived, call CDP API to evaluate whether TX ILP can be supported or not, update the TX ILP capability to DP, also send WMI INIT CMD to FW to notify if host has enabled the TX ILP support or not. Change-Id: I472ebc5c7fa4b2996b790b58274fa3c048f6d7f9 CRs-Fixed: 3447519 --- .../init_deinit/src/init_event_handler.c | 26 +++++++++++++++++++ wmi/inc/wmi_unified_param.h | 4 +++ wmi/src/wmi_unified_tlv.c | 18 +++++++++++++ 3 files changed, 48 insertions(+) diff --git a/target_if/init_deinit/src/init_event_handler.c b/target_if/init_deinit/src/init_event_handler.c index 5d58903cfa..96cc5b3a56 100644 --- a/target_if/init_deinit/src/init_event_handler.c +++ b/target_if/init_deinit/src/init_event_handler.c @@ -33,6 +33,9 @@ #include #include #include +#ifdef DP_TX_PACKET_INSPECT_FOR_ILP +#include +#endif #include #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) #include @@ -136,6 +139,27 @@ init_deinit_update_roam_stats_cap(struct wmi_unified *wmi_handle, {} #endif +#ifdef DP_TX_PACKET_INSPECT_FOR_ILP +static void +init_deinit_update_tx_ilp_cap(struct wlan_objmgr_psoc *psoc, + struct tgt_info *info) +{ + ol_txrx_soc_handle soc; + + soc = wlan_psoc_get_dp_handle(psoc); + info->wlan_res_cfg.tx_ilp_enable = + cdp_evaluate_update_tx_ilp_cfg( + soc, info->service_ext2_param.num_msdu_idx_qtype_map, + info->msdu_idx_qtype_map); +} +#else +static void +init_deinit_update_tx_ilp_cap(struct wlan_objmgr_psoc *psoc, + struct tgt_info *info) +{ +} +#endif + #ifdef MULTI_CLIENT_LL_SUPPORT /** * init_deinit_update_multi_client_ll_caps() - Update multi client service @@ -536,6 +560,8 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle, goto exit; } + init_deinit_update_tx_ilp_cap(psoc, info); + err_code = init_deinit_populate_twt_cap_ext2(psoc, wmi_handle, event, info); diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 2465429eed..9b24187854 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6715,6 +6715,7 @@ struct target_feature_set { * support * @notify_frame_support: capability to mark notify frames from host * @dp_peer_meta_data_ver: datapath peer meta data version flag + * @tx_ilp_enable: capability to support TX ILP from host */ typedef struct { uint32_t num_vdevs; @@ -6843,6 +6844,9 @@ typedef struct { uint32_t num_max_active_vdevs; uint8_t notify_frame_support; uint8_t dp_peer_meta_data_ver; +#ifdef DP_TX_PACKET_INSPECT_FOR_ILP + uint8_t tx_ilp_enable; +#endif } target_resource_config; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index f279170bbf..bba08220a7 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -9093,6 +9093,23 @@ void wmi_copy_afc_deployment_config(wmi_resource_config *resource_cfg, } #endif +#ifdef DP_TX_PACKET_INSPECT_FOR_ILP +static inline +void wmi_copy_latency_flowq_support(wmi_resource_config *resource_cfg, + target_resource_config *tgt_res_cfg) +{ + if (tgt_res_cfg->tx_ilp_enable) + WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_SET( + resource_cfg->flags2, 1); +} +#else +static inline +void wmi_copy_latency_flowq_support(wmi_resource_config *resource_cfg, + target_resource_config *tgt_res_cfg) +{ +} +#endif + static void wmi_copy_resource_config(wmi_resource_config *resource_cfg, target_resource_config *tgt_res_cfg) @@ -9390,6 +9407,7 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_SET( resource_cfg->flags2, 1); + wmi_copy_latency_flowq_support(resource_cfg, tgt_res_cfg); } #ifdef FEATURE_SET