summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/pcie.h
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-01-04 09:21:32 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-01-08 00:18:30 +0400
commite7f767a7d9f809c494bfffffeda2bbdbfec110b4 (patch)
tree1f1e96d6d2c430b1cb841b5cefbd69133c28f7ce /drivers/net/wireless/mwifiex/pcie.h
parentfbd7e7ac6db3db8bccf3210d23b5a2a66471c538 (diff)
downloadlinux-e7f767a7d9f809c494bfffffeda2bbdbfec110b4.tar.xz
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)
return 0;
}
+static inline int
+mwifiex_pcie_txbd_not_full(struct pcie_service_card *card)
+{
+ if (((card->txbd_wrptr & MWIFIEX_TXBD_MASK) !=
+ (card->txbd_rdptr & MWIFIEX_TXBD_MASK)) ||
+ ((card->txbd_wrptr & MWIFIEX_BD_FLAG_ROLLOVER_IND) !=
+ (card->txbd_rdptr & MWIFIEX_BD_FLAG_ROLLOVER_IND)))
+ return 1;
+
+ return 0;
+}
#endif /* _MWIFIEX_PCIE_H */