|
@@ -89,6 +89,36 @@ static inline uint8_t dp_tx_get_rbm_id_li(struct dp_soc *soc,
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#if defined(CLEAR_SW2TCL_CONSUMED_DESC)
|
|
|
|
+/**
|
|
|
|
+ * dp_tx_clear_consumed_hw_descs - Reset all the consumed Tx ring descs to 0
|
|
|
|
+ *
|
|
|
|
+ * @soc: DP soc handle
|
|
|
|
+ * @hal_ring_hdl: Source ring pointer
|
|
|
|
+ *
|
|
|
|
+ * Return: void
|
|
|
|
+ */
|
|
|
|
+static inline
|
|
|
|
+void dp_tx_clear_consumed_hw_descs(struct dp_soc *soc,
|
|
|
|
+ hal_ring_handle_t hal_ring_hdl)
|
|
|
|
+{
|
|
|
|
+ void *desc = hal_srng_src_get_next_consumed(soc->hal_soc, hal_ring_hdl);
|
|
|
|
+
|
|
|
|
+ while (desc) {
|
|
|
|
+ hal_tx_desc_clear(desc);
|
|
|
|
+ desc = hal_srng_src_get_next_consumed(soc->hal_soc,
|
|
|
|
+ hal_ring_hdl);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#else
|
|
|
|
+static inline
|
|
|
|
+void dp_tx_clear_consumed_hw_descs(struct dp_soc *soc,
|
|
|
|
+ hal_ring_handle_t hal_ring_hdl)
|
|
|
|
+{
|
|
|
|
+}
|
|
|
|
+#endif /* CLEAR_SW2TCL_CONSUMED_DESC */
|
|
|
|
+
|
|
QDF_STATUS
|
|
QDF_STATUS
|
|
dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev,
|
|
dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev,
|
|
struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
|
|
struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
|
|
@@ -189,6 +219,8 @@ dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev,
|
|
return status;
|
|
return status;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ dp_tx_clear_consumed_hw_descs(soc, hal_ring_hdl);
|
|
|
|
+
|
|
/* Sync cached descriptor with HW */
|
|
/* Sync cached descriptor with HW */
|
|
|
|
|
|
hal_tx_desc = hal_srng_src_get_next(soc->hal_soc, hal_ring_hdl);
|
|
hal_tx_desc = hal_srng_src_get_next(soc->hal_soc, hal_ring_hdl);
|