ソースを参照

qcacmn: Make rx desc debug API's independent of RX_DESC_DEBUG_CHECK feature

Currently rx descriptor debug info API's are under RX_DESC_DEBUG_CHECK
feature, making those API's independent will be enabled with new feature
flag RX_DESC_LOGGING.

Change-Id: Iadb087f1b3104311b06e161bdeae975a8772e0ee
CRs-Fixed: 2869335
Karthik Kantamneni 4 年 前
コミット
8f493fd183
1 ファイル変更22 行追加23 行削除
  1. 22 23
      dp/wifi3.0/dp_rx.h

+ 22 - 23
dp/wifi3.0/dp_rx.h

@@ -756,21 +756,7 @@ void dp_rx_desc_pool_free(struct dp_soc *soc,
 void dp_rx_deliver_raw(struct dp_vdev *vdev, qdf_nbuf_t nbuf_list,
 				struct dp_peer *peer);
 
-#ifdef RX_DESC_DEBUG_CHECK
-/**
- * dp_rx_desc_paddr_sanity_check() - paddr sanity for ring desc vs rx_desc
- * @rx_desc: rx descriptor
- * @ring_paddr: paddr obatined from the ring
- *
- * Returns: QDF_STATUS
- */
-static inline
-bool dp_rx_desc_paddr_sanity_check(struct dp_rx_desc *rx_desc,
-				   uint64_t ring_paddr)
-{
-	return (ring_paddr == qdf_nbuf_get_frag_paddr(rx_desc->nbuf, 0));
-}
-
+#ifdef RX_DESC_LOGGING
 /*
  * dp_rx_desc_alloc_dbg_info() - Alloc memory for rx descriptor debug
  *  structure
@@ -828,13 +814,6 @@ void dp_rx_desc_update_dbg_info(struct dp_rx_desc *rx_desc,
 }
 #else
 
-static inline
-bool dp_rx_desc_paddr_sanity_check(struct dp_rx_desc *rx_desc,
-				   uint64_t ring_paddr)
-{
-	return true;
-}
-
 static inline
 void dp_rx_desc_alloc_dbg_info(struct dp_rx_desc *rx_desc)
 {
@@ -850,7 +829,7 @@ void dp_rx_desc_update_dbg_info(struct dp_rx_desc *rx_desc,
 				const char *func_name, uint8_t flag)
 {
 }
-#endif /* RX_DESC_DEBUG_CHECK */
+#endif /* RX_DESC_LOGGING */
 
 /**
  * dp_rx_add_to_free_desc_list() - Adds to a local free descriptor list
@@ -1459,6 +1438,20 @@ void dp_rx_desc_frag_prep(struct dp_rx_desc *rx_desc,
 {
 }
 #endif /* DP_RX_MON_MEM_FRAG */
+
+/**
+ * dp_rx_desc_paddr_sanity_check() - paddr sanity for ring desc vs rx_desc
+ * @rx_desc: rx descriptor
+ * @ring_paddr: paddr obatined from the ring
+ *
+ * Returns: QDF_STATUS
+ */
+static inline
+bool dp_rx_desc_paddr_sanity_check(struct dp_rx_desc *rx_desc,
+				   uint64_t ring_paddr)
+{
+	return (ring_paddr == qdf_nbuf_get_frag_paddr(rx_desc->nbuf, 0));
+}
 #else
 
 static inline bool dp_rx_desc_check_magic(struct dp_rx_desc *rx_desc)
@@ -1492,6 +1485,12 @@ void dp_rx_desc_frag_prep(struct dp_rx_desc *rx_desc,
 }
 #endif /* DP_RX_MON_MEM_FRAG */
 
+static inline
+bool dp_rx_desc_paddr_sanity_check(struct dp_rx_desc *rx_desc,
+				   uint64_t ring_paddr)
+{
+	return true;
+}
 #endif /* RX_DESC_DEBUG_CHECK */
 
 void dp_rx_enable_mon_dest_frag(struct rx_desc_pool *rx_desc_pool,