aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/pcie.h
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-01-04 00:21:32 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-07 15:18:30 -0500
commite7f767a7d9f809c494bfffffeda2bbdbfec110b4 (patch)
tree1f1e96d6d2c430b1cb841b5cefbd69133c28f7ce /drivers/net/wireless/mwifiex/pcie.h
parentfbd7e7ac6db3db8bccf3210d23b5a2a66471c538 (diff)
mwifiex: use map/unmap APIs in TX and RX to reduce memcpy
This patch is an enhacement to mwifiex_pcie driver to use map/unmap PCI memory APIs. This reduces one memcpy each in TX path and RX path, and enhances throughput. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/pcie.h')
-rw-r--r--drivers/net/wireless/mwifiex/pcie.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h
index 24a39b32a222..37eeb2ca6b29 100644
--- a/drivers/net/wireless/mwifiex/pcie.h
+++ b/drivers/net/wireless/mwifiex/pcie.h
@@ -159,4 +159,15 @@ mwifiex_pcie_txbd_empty(struct pcie_service_card *card, u32 rdptr)
159 return 0; 159 return 0;
160} 160}
161 161
162static inline int
163mwifiex_pcie_txbd_not_full(struct pcie_service_card *card)
164{
165 if (((card->txbd_wrptr & MWIFIEX_TXBD_MASK) !=
166 (card->txbd_rdptr & MWIFIEX_TXBD_MASK)) ||
167 ((card->txbd_wrptr & MWIFIEX_BD_FLAG_ROLLOVER_IND) !=
168 (card->txbd_rdptr & MWIFIEX_BD_FLAG_ROLLOVER_IND)))
169 return 1;
170
171 return 0;
172}
162#endif /* _MWIFIEX_PCIE_H */ 173#endif /* _MWIFIEX_PCIE_H */