From 55435d303aeb180db3dca2a2d8e850d5748b2622 Mon Sep 17 00:00:00 2001 From: sandhu Date: Wed, 15 Mar 2023 12:23:54 -0700 Subject: [PATCH] qcacmn: Add WMI_SERVICE_11BE_TDLS_SUPPORT 1\ Add BE tdls fw support bit. 2\ Add link force reason per wmi changes Change-Id: I0c297b0ea337d4060ac339c89679ec6059afc89f CRs-Fixed: 3435979 --- target_if/init_deinit/src/init_cmd_api.c | 24 +++++++++++++++++++ .../mlo_mgr/inc/wlan_mlo_mgr_public_structs.h | 3 +++ wmi/inc/wmi_unified_param.h | 5 ++++ wmi/src/wmi_unified_11be_tlv.c | 5 +++- wmi/src/wmi_unified_tlv.c | 7 +++++- 5 files changed, 42 insertions(+), 2 deletions(-) diff --git a/target_if/init_deinit/src/init_cmd_api.c b/target_if/init_deinit/src/init_cmd_api.c index 870ca01891..997aeb8809 100644 --- a/target_if/init_deinit/src/init_cmd_api.c +++ b/target_if/init_deinit/src/init_cmd_api.c @@ -455,6 +455,28 @@ static inline void init_deinit_derive_afc_dev_type_param( } #endif +#ifdef WLAN_FEATURE_11BE_MLO +#ifdef FEATURE_WLAN_TDLS +static void +init_deinit_set_tdls_mlo_vdev(struct wmi_init_cmd_param *init_param, + struct wmi_unified *wmi_handle) +{ + if (wmi_service_enabled(wmi_handle, wmi_service_tdls_mlo_support)) + init_param->res_cfg->num_tdls_vdevs = WLAN_UMAC_MLO_MAX_VDEVS; +} +#else +static void +init_deinit_set_tdls_mlo_vdev(struct wmi_init_cmd_param *init_param, + struct wmi_unified *wmi_handle) +{} +#endif +#else +static void +init_deinit_set_tdls_mlo_vdev(struct wmi_init_cmd_param *init_param, + struct wmi_unified *wmi_handle) +{} +#endif + void init_deinit_prepare_send_init_cmd( struct wlan_objmgr_psoc *psoc, struct target_psoc_info *tgt_hdl) @@ -533,6 +555,8 @@ void init_deinit_prepare_send_init_cmd( if (wmi_service_enabled(wmi_handle, wmi_service_v1a_v1b_supported)) info->wlan_res_cfg.dp_peer_meta_data_ver = 1; + init_deinit_set_tdls_mlo_vdev(&init_param, wmi_handle); + target_if_ext_res_cfg_enable(psoc, tgt_hdl, NULL); target_if_set_reo_shared_qref_feature(psoc, info); diff --git a/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h b/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h index 15842e530e..ca3ec37cf1 100644 --- a/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h +++ b/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h @@ -818,11 +818,14 @@ enum mlo_link_force_mode { * Set force specific links because of new dis-connection * @MLO_LINK_FORCE_REASON_LINK_REMOVAL: * Set force specific links because of AP side link removal + * @MLO_LINK_FORCE_REASON_TDLS: + * Set force specific links because of TDLS operation */ enum mlo_link_force_reason { MLO_LINK_FORCE_REASON_CONNECT = 1, MLO_LINK_FORCE_REASON_DISCONNECT = 2, MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3, + MLO_LINK_FORCE_REASON_TDLS = 4, }; /** diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 5fc34d54a6..b78387e56c 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6234,6 +6234,11 @@ typedef enum { wmi_service_tdls_ax_support, #endif #endif +#ifdef WLAN_FEATURE_11BE_MLO +#ifdef FEATURE_WLAN_TDLS + wmi_service_tdls_mlo_support, +#endif +#endif #ifdef WLAN_FEATURE_BIG_DATA_STATS wmi_service_big_data_support, #endif diff --git a/wmi/src/wmi_unified_11be_tlv.c b/wmi/src/wmi_unified_11be_tlv.c index 33860ae200..548d9e9620 100644 --- a/wmi/src/wmi_unified_11be_tlv.c +++ b/wmi/src/wmi_unified_11be_tlv.c @@ -424,7 +424,10 @@ force_reason_host_to_fw(enum mlo_link_force_reason host_reason, *fw_reason = WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT; break; case MLO_LINK_FORCE_REASON_DISCONNECT: - *fw_reason = WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT; + *fw_reason = WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT; + break; + case MLO_LINK_FORCE_REASON_TDLS: + *fw_reason = WMI_MLO_LINK_FORCE_REASON_TDLS; break; case MLO_LINK_FORCE_REASON_LINK_REMOVAL: *fw_reason = WMI_MLO_LINK_FORCE_REASON_LINK_REMOVAL; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index cb868d8f7c..97a6ea1f2a 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -21894,7 +21894,12 @@ static void populate_tlv_service(uint32_t *wmi_service) wmi_service[wmi_service_tdls_concurrency_support] = WMI_SERVICE_TDLS_CONCURRENCY_SUPPORT; #endif - +#ifdef FEATURE_WLAN_TDLS +#ifdef WLAN_FEATURE_11BE + wmi_service[wmi_service_tdls_mlo_support] = + WMI_SERVICE_11BE_MLO_TDLS_SUPPORT; +#endif +#endif #ifdef WLAN_SUPPORT_TWT wmi_service[wmi_service_twt_bcast_req_support] = WMI_SERVICE_BROADCAST_TWT_REQUESTER;