Browse Source

qcacmn: Fix Scatter-Gather and TSO

Fix SG and TSO for ftp data transfer

Change-Id: Ide7eec987436beea08711f31362c1fa61f5bf8c3
CRs-fixed: 2159610
Akshay Kosigi 7 years ago
parent
commit
9e7f12f7da
2 changed files with 17 additions and 1 deletions
  1. 15 1
      qdf/inc/qdf_nbuf.h
  2. 2 0
      qdf/linux/src/i_qdf_nbuf.h

+ 15 - 1
qdf/inc/qdf_nbuf.h

@@ -718,7 +718,8 @@ qdf_nbuf_get_frag_vaddr_always(qdf_nbuf_t buf)
 }
 
 /**
- * qdf_nbuf_get_frag_paddr() - get fragment physical address
+ * qdf_nbuf_get_frag_paddr() - get physical address for skb linear buffer
+ *                              or skb fragment, based on frag_num passed
  * @buf: Network buffer
  * @frag_num: Fragment number
  *
@@ -731,6 +732,19 @@ static inline qdf_dma_addr_t qdf_nbuf_get_frag_paddr(qdf_nbuf_t buf,
 	return __qdf_nbuf_get_frag_paddr(buf, frag_num);
 }
 
+/**
+ * qdf_nbuf_get_tx_frag_paddr() - get physical address for skb fragments only
+ * @buf: Network buffer
+ *
+ * Return: Fragment physical address
+ * Usage guideline: Use “qdf_nbuf_frag_map()” to dma map the specific
+ *                  skb fragment , followed by “qdf_nbuf_get_tx_frag_paddr”
+ */
+static inline qdf_dma_addr_t qdf_nbuf_get_tx_frag_paddr(qdf_nbuf_t buf)
+{
+	return __qdf_nbuf_get_tx_frag_paddr(buf);
+}
+
 /**
  * qdf_nbuf_get_frag_is_wordstream() - is fragment wordstream
  * @buf: Network buffer

+ 2 - 0
qdf/linux/src/i_qdf_nbuf.h

@@ -464,6 +464,8 @@ typedef void (*qdf_nbuf_free_t)(__qdf_nbuf_t);
 	 /* assume that the OS only provides a single fragment */	\
 	 QDF_NBUF_CB_PADDR(skb))
 
+#define __qdf_nbuf_get_tx_frag_paddr(skb) QDF_NBUF_CB_TX_EXTRA_FRAG_PADDR(skb)
+
 #define __qdf_nbuf_get_frag_len(skb, frag_num)			\
 	((frag_num < QDF_NBUF_CB_TX_NUM_EXTRA_FRAGS(skb)) ?		\
 	 QDF_NBUF_CB_TX_EXTRA_FRAG_LEN(skb) : (skb)->len)