From c7a178e42f616a86947816b572a85a9ebe0e47a8 Mon Sep 17 00:00:00 2001 From: Aman Mehta Date: Fri, 5 May 2023 01:39:39 +0530 Subject: [PATCH] qcacmn: Add mesh and QCN flags in peer assoc Set flags in WMI peer assoc to inform FW if node is 1. QCN Supported 2. Operating in Multi-AP mode If node is 3rd party and operating in Multi-AP mode, FW and uCode will change crypto register for each Rx/Tx from/to such nodes Change-Id: If4cf9ec39fa11a90733df45fffa473a672643f8e CRs-Fixed: 3488865 --- .../obj_mgr/inc/wlan_objmgr_peer_obj.h | 6 +++++ wmi/inc/wmi_unified_param.h | 4 ++++ wmi/src/wmi_unified_tlv.c | 22 +++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h index d8ade5b7e9..42a3a313a0 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h @@ -98,6 +98,10 @@ /* MLO enabled peer */ #define WLAN_PEER_FEXT_MLO 0x00000001 +/* Peer is QCN Node */ +#define WLAN_PEER_QCN_NODE 0x00000010 +/* Peer is 4 Address node */ +#define WLAN_PEER_MESH_NODE 0x00000020 /** * enum wlan_peer_state - peer state @@ -186,6 +190,7 @@ struct wlan_objmgr_peer_objmgr { * @peer_lock: Lock for access/update peer contents * @mlo_peer_ctx: Reference to MLO Peer context * @mldaddr: Peer MLD MAC address + * @peer_flags: QCN flag and 4 address mode flag */ struct wlan_objmgr_peer { qdf_list_node_t psoc_peer; @@ -204,6 +209,7 @@ struct wlan_objmgr_peer { #ifdef WLAN_FEATURE_11BE_MLO struct wlan_mlo_peer_context *mlo_peer_ctx; uint8_t mldaddr[QDF_MAC_ADDR_SIZE]; + u_int32_t peer_flags; #endif }; diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 8770ed5208..b9e9544ec3 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1370,6 +1370,8 @@ struct peer_assoc_ml_partner_links { * @akm: AKM info * @mlo_params: MLO assoc params * @ml_links: MLO partner links + * @qcn_node_flag: if node is QCN node + * @mesh_node_flag: if node is 4 addr node * @peer_dms_capable: is peer DMS capable * @reserved: spare bits * @t2lm_params: TID-to-link mapping params @@ -1456,6 +1458,8 @@ struct peer_assoc_params { #ifdef WLAN_FEATURE_11BE_MLO struct peer_assoc_mlo_params mlo_params; struct peer_assoc_ml_partner_links ml_links; + bool qcn_node_flag; + bool mesh_node_flag; #endif uint8_t peer_dms_capable:1, reserved:7; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 04186a3126..d1c0fd653a 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3349,6 +3349,27 @@ static inline void copy_peer_flags_tlv_11be( { } #endif +#ifdef WLAN_FEATURE_11BE_MLO +static inline void copy_peer_flags_tlv_vendor( + wmi_peer_assoc_complete_cmd_fixed_param * cmd, + struct peer_assoc_params *param) +{ + if (!(param->mlo_params.mlo_enabled)) + return; + if (param->qcn_node_flag) + cmd->peer_flags_ext |= WMI_PEER_EXT_IS_QUALCOMM_NODE; + if (param->mesh_node_flag) + cmd->peer_flags_ext |= WMI_PEER_EXT_IS_MESH_NODE; + + wmi_debug("peer_flags_ext 0x%x", cmd->peer_flags_ext); +} +#else +static inline void copy_peer_flags_tlv_vendor( + wmi_peer_assoc_complete_cmd_fixed_param * cmd, + struct peer_assoc_params *param) +{ +} +#endif static inline void copy_peer_flags_tlv( wmi_peer_assoc_complete_cmd_fixed_param * cmd, @@ -3380,6 +3401,7 @@ static inline void copy_peer_flags_tlv( cmd->peer_flags |= WMI_PEER_160MHZ; copy_peer_flags_tlv_11be(cmd, param); + copy_peer_flags_tlv_vendor(cmd, param); /* Typically if STBC is enabled for VHT it should be enabled * for HT as well