diff options
author | Avinash Patil <patila@marvell.com> | 2013-01-04 00:21:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-07 15:18:30 -0500 |
commit | fbd7e7ac6db3db8bccf3210d23b5a2a66471c538 (patch) | |
tree | 3a138321b0a97fc6ece0874d217e824e5290c5ea /drivers/net/wireless/mwifiex/pcie.h | |
parent | fc3314609047daf472b3ffc49f9a1c5608068713 (diff) |
mwifiex: flush TX ring for PCIe after disconnect or bss stop
This patch adds handler to clean PCIe TX rings after disconnect
or bss stop is called for PCIe based mwifiex driver.
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.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h index 87201f554d2e..24a39b32a222 100644 --- a/drivers/net/wireless/mwifiex/pcie.h +++ b/drivers/net/wireless/mwifiex/pcie.h | |||
@@ -114,6 +114,7 @@ struct pcie_service_card { | |||
114 | struct pci_dev *dev; | 114 | struct pci_dev *dev; |
115 | struct mwifiex_adapter *adapter; | 115 | struct mwifiex_adapter *adapter; |
116 | 116 | ||
117 | u8 txbd_flush; | ||
117 | u32 txbd_wrptr; | 118 | u32 txbd_wrptr; |
118 | u32 txbd_rdptr; | 119 | u32 txbd_rdptr; |
119 | u32 txbd_ring_size; | 120 | u32 txbd_ring_size; |
@@ -146,4 +147,16 @@ struct pcie_service_card { | |||
146 | void __iomem *pci_mmap1; | 147 | void __iomem *pci_mmap1; |
147 | }; | 148 | }; |
148 | 149 | ||
150 | static inline int | ||
151 | mwifiex_pcie_txbd_empty(struct pcie_service_card *card, u32 rdptr) | ||
152 | { | ||
153 | if (((card->txbd_wrptr & MWIFIEX_TXBD_MASK) == | ||
154 | (rdptr & MWIFIEX_TXBD_MASK)) && | ||
155 | ((card->txbd_wrptr & MWIFIEX_BD_FLAG_ROLLOVER_IND) != | ||
156 | (rdptr & MWIFIEX_BD_FLAG_ROLLOVER_IND))) | ||
157 | return 1; | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | |||
149 | #endif /* _MWIFIEX_PCIE_H */ | 162 | #endif /* _MWIFIEX_PCIE_H */ |