Эх сурвалжийг харах

qcacmn: Add support for marking to_fw for all tx pkts of a vdev

Add support for marking to_fw bit for all tx packets
for a given vdev.

Change-Id: I7306e22e81303720830cfce4ce19b15d2080d93c
CRs-Fixed: 3369897
Yeshwanth Sriram Guntuka 2 жил өмнө
parent
commit
b480a61386

+ 7 - 1
dp/inc/cdp_txrx_cmn_struct.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -1422,6 +1422,7 @@ enum cdp_pdev_param_type {
  * @cdp_vdev_param_traffic_end_ind: Traffic end indication enable/disable
  * @cdp_skel_enable : Enable/Disable skeleton code for Umac reset debug
  * @cdp_drop_tx_mcast: Enable/Disable tx mcast drop
+ * @cdp_vdev_tx_to_fw: Set to_fw bit for all tx packets for the vdev
  */
 typedef union cdp_config_param_t {
 	/* peer params */
@@ -1512,6 +1513,7 @@ typedef union cdp_config_param_t {
 	bool cdp_vdev_param_traffic_end_ind;
 	bool cdp_umac_rst_skel;
 	bool cdp_drop_tx_mcast;
+	bool cdp_vdev_tx_to_fw;
 } cdp_config_param_type;
 
 /**
@@ -1601,6 +1603,7 @@ enum cdp_pdev_bpr_param {
  * @CDP_DROP_3ADDR_MCAST: enable/disable drop 3addr multicast flag
  * @CDP_ENABLE_WRAP: qwrap ap
  * @CDP_ENABLE_TRAFFIC_END_INDICATION: enable/disable traffic end indication
+ * @CDP_VDEV_TX_TO_FW: Set to_fw bit for tx packets for the vdev
  */
 enum cdp_vdev_param_type {
 	CDP_ENABLE_NAWDS,
@@ -1648,6 +1651,9 @@ enum cdp_vdev_param_type {
 #ifdef DP_TRAFFIC_END_INDICATION
 	CDP_ENABLE_TRAFFIC_END_INDICATION,
 #endif
+#ifdef FEATURE_DIRECT_LINK
+	CDP_VDEV_TX_TO_FW,
+#endif
 };
 
 /**

+ 6 - 0
dp/wifi3.0/dp_main.c

@@ -11189,6 +11189,12 @@ dp_set_vdev_param(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
 	case CDP_ENABLE_TRAFFIC_END_INDICATION:
 		vdev->traffic_end_ind_en = val.cdp_vdev_param_traffic_end_ind;
 		break;
+#endif
+#ifdef FEATURE_DIRECT_LINK
+	case CDP_VDEV_TX_TO_FW:
+		dp_info("vdev_id %d to_fw :%d", vdev_id, val.cdp_vdev_tx_to_fw);
+		vdev->to_fw = val.cdp_vdev_tx_to_fw;
+		break;
 #endif
 	default:
 		break;

+ 22 - 1
dp/wifi3.0/dp_tx.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -3648,6 +3648,25 @@ qdf_nbuf_t dp_tx_exc_drop(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
 }
 #endif
 
+#ifdef FEATURE_DIRECT_LINK
+/*
+ * dp_vdev_tx_mark_to_fw() - Mark to_fw bit for the tx packet
+ * @nbuf: skb
+ * @vdev: DP vdev handle
+ *
+ * Return: None
+ */
+static inline void dp_vdev_tx_mark_to_fw(qdf_nbuf_t nbuf, struct dp_vdev *vdev)
+{
+	if (qdf_unlikely(vdev->to_fw))
+		QDF_NBUF_CB_TX_PACKET_TO_FW(nbuf) = 1;
+}
+#else
+static inline void dp_vdev_tx_mark_to_fw(qdf_nbuf_t nbuf, struct dp_vdev *vdev)
+{
+}
+#endif
+
 /*
  * dp_tx_send() - Transmit a frame on a given VAP
  * @soc: DP soc handle
@@ -3688,6 +3707,8 @@ qdf_nbuf_t dp_tx_send(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
 	if (qdf_unlikely(!vdev))
 		return nbuf;
 
+	dp_vdev_tx_mark_to_fw(nbuf, vdev);
+
 	/*
 	 * Set Default Host TID value to invalid TID
 	 * (TID override disabled)

+ 4 - 0
dp/wifi3.0/dp_types.h

@@ -3574,6 +3574,10 @@ struct dp_vdev {
 	/* per vdev nbuf queue for traffic end indication packets */
 	qdf_nbuf_queue_t end_ind_pkt_q;
 #endif
+#ifdef FEATURE_DIRECT_LINK
+	/* Flag to indicate if to_fw should be set for tx pkts on this vdev */
+	bool to_fw;
+#endif
 };
 
 enum {