From 0860396f1ea4accffc1c44ec9a5309d0b901f31d Mon Sep 17 00:00:00 2001 From: Sai Rupesh Chevuru Date: Wed, 29 Sep 2021 21:33:38 +0530 Subject: [PATCH] qcacmn: ME6 changes with DMS enable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In ME6 we are currently using a workaround to send the native wifi packet through the exception path, as the older HKv1 hardware didn’t support single packet AMSDU. Since, the hardware is supporting this starting from HKv2, we are sending ME packets as normal packets to FW with DMS indication in Peer based meta for Beryllium. Change-Id: Ic154b438df2c811c845e7c2eaadf252985d419ad --- dp/inc/cdp_txrx_me.h | 6 ++++-- dp/inc/cdp_txrx_ops.h | 2 +- dp/wifi3.0/dp_internal.h | 2 +- wmi/inc/wmi_unified_param.h | 2 ++ wmi/src/wmi_unified_tlv.c | 17 ++++++++++++++++- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/dp/inc/cdp_txrx_me.h b/dp/inc/cdp_txrx_me.h index ec4b10f9be..743ccda395 100644 --- a/dp/inc/cdp_txrx_me.h +++ b/dp/inc/cdp_txrx_me.h @@ -64,7 +64,8 @@ cdp_tx_me_free_descriptor(ol_txrx_soc_handle soc, uint8_t pdev_id) static inline uint16_t cdp_tx_me_convert_ucast(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t wbuf, u_int8_t newmac[][6], - uint8_t newmaccnt, uint8_t tid, bool is_igmp) + uint8_t newmaccnt, uint8_t tid, bool is_igmp, + bool is_dms_pkt) { if (!soc || !soc->ops) { dp_cdp_debug("Invalid Instance"); @@ -77,7 +78,8 @@ cdp_tx_me_convert_ucast(ol_txrx_soc_handle soc, uint8_t vdev_id, return 0; return soc->ops->me_ops->tx_me_convert_ucast - (soc, vdev_id, wbuf, newmac, newmaccnt, tid, is_igmp); + (soc, vdev_id, wbuf, newmac, newmaccnt, tid, is_igmp, + is_dms_pkt); } #endif diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 0c4a8fb589..9ee5869847 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -869,7 +869,7 @@ struct cdp_me_ops { uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t wbuf, u_int8_t newmac[][6], uint8_t newmaccnt, uint8_t tid, - bool is_igmp); + bool is_igmp, bool is_dms_pkt); }; struct cdp_mon_ops { diff --git a/dp/wifi3.0/dp_internal.h b/dp/wifi3.0/dp_internal.h index 07311ab74c..13e74c8a5c 100644 --- a/dp/wifi3.0/dp_internal.h +++ b/dp/wifi3.0/dp_internal.h @@ -1770,7 +1770,7 @@ uint16_t dp_tx_me_send_convert_ucast(struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t nbuf, uint8_t newmac[][QDF_MAC_ADDR_SIZE], uint8_t new_mac_cnt, uint8_t tid, - bool is_igmp); + bool is_igmp, bool is_dms_pkt); void dp_tx_me_alloc_descriptor(struct cdp_soc_t *soc, uint8_t pdev_id); void dp_tx_me_free_descriptor(struct cdp_soc_t *soc, uint8_t pdev_id); diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index c24d64c044..95f2201733 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1133,6 +1133,8 @@ struct peer_assoc_params { struct peer_assoc_mlo_params mlo_params; struct peer_assoc_ml_partner_links ml_links; #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 ff3e96e687..75f355ae9e 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -2553,6 +2553,20 @@ static inline void copy_peer_flags_tlv_11be( } #endif +/* Need to remove below flag after fw change merging */ +#ifdef PEER_DMS_CAPABLE +static inline void set_peer_dms_capable( + wmi_peer_assoc_complete_cmd_fixed_param * cmd) +{ + cmd->peer_flags_ext |= WMI_PEER_EXT_DMS_CAPABLE; +} +#else +static inline void set_peer_dms_capable( + wmi_peer_assoc_complete_cmd_fixed_param * cmd) +{ +} +#endif + static inline void copy_peer_flags_tlv( wmi_peer_assoc_complete_cmd_fixed_param * cmd, struct peer_assoc_params *param) @@ -2562,7 +2576,8 @@ static inline void copy_peer_flags_tlv( * Just populate those flags and send it down */ cmd->peer_flags = 0; - + if (param->peer_dms_capable) + set_peer_dms_capable(cmd); /* * Do not enable HT/VHT if WMM/wme is disabled for vap. */