summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/util.h
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-01-04 06:21:30 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-01-07 21:18:30 +0100
commitfc3314609047daf472b3ffc49f9a1c5608068713 (patch)
tree8e5c9a01fb61337e7f7a996ff78d31f749d47112 /drivers/net/wireless/mwifiex/util.h
parentmwifiex: add init_fw_port handler for PCIe interface (diff)
downloadlinux-fc3314609047daf472b3ffc49f9a1c5608068713.tar.xz
linux-fc3314609047daf472b3ffc49f9a1c5608068713.zip
mwifiex: use pci_alloc/free_consistent APIs for PCIe
This patch uses pci_alloc_consistent and pci_free_consistent APIs for mwifiex_pcie driver. Consistent DMA memory is allocated for TX, RX and event rings. Command buffer and command response buffer also uses map/unmap memory APIs to download commands and get command responses. 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/util.h')
-rw-r--r--drivers/net/wireless/mwifiex/util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/util.h b/drivers/net/wireless/mwifiex/util.h
index f6d36b9654a0..cb2d0582bd36 100644
--- a/drivers/net/wireless/mwifiex/util.h
+++ b/drivers/net/wireless/mwifiex/util.h
@@ -22,16 +22,16 @@
static inline struct mwifiex_rxinfo *MWIFIEX_SKB_RXCB(struct sk_buff *skb)
{
- return (struct mwifiex_rxinfo *)(skb->cb + sizeof(phys_addr_t));
+ return (struct mwifiex_rxinfo *)(skb->cb + sizeof(dma_addr_t));
}
static inline struct mwifiex_txinfo *MWIFIEX_SKB_TXCB(struct sk_buff *skb)
{
- return (struct mwifiex_txinfo *)(skb->cb + sizeof(phys_addr_t));
+ return (struct mwifiex_txinfo *)(skb->cb + sizeof(dma_addr_t));
}
-static inline phys_addr_t *MWIFIEX_SKB_PACB(struct sk_buff *skb)
+static inline void MWIFIEX_SKB_PACB(struct sk_buff *skb, dma_addr_t *buf_pa)
{
- return (phys_addr_t *)skb->cb;
+ memcpy(buf_pa, skb->cb, sizeof(dma_addr_t));
}
#endif /* !_MWIFIEX_UTIL_H_ */