diff options
author | Avinash Patil <patila@marvell.com> | 2013-02-12 17:38:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-14 14:24:07 -0500 |
commit | 52301a815e81cdcbcf971ba28df0376dc7f3961c (patch) | |
tree | 7cde8248f4213febf0b16e2d637becbe84f1935f /drivers/net/wireless/mwifiex/pcie.h | |
parent | 06e7cda3ce30dadc3454539127b4cfc3888c349e (diff) |
mwifiex: device specific sleep cookie handling for PCIe
This patch adds support for handling of PCIe sleep cookie depending
upon device properties. Some PCIe devices need sleep cookie probing
before accessing HW while some others don't. A new sleep_cookie
variable is defined as part of mwifiex_pcie_card_reg strcture and
set/reset as per device capability.
Sleep cookie is allocated/accessed/freed only when flag sleep_cookie
for this particular device is enabled.
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h index 608061578b37..d322ab8604ea 100644 --- a/drivers/net/wireless/mwifiex/pcie.h +++ b/drivers/net/wireless/mwifiex/pcie.h | |||
@@ -126,6 +126,7 @@ struct mwifiex_pcie_card_reg { | |||
126 | u8 ring_flag_xs_eop; | 126 | u8 ring_flag_xs_eop; |
127 | u32 ring_tx_start_ptr; | 127 | u32 ring_tx_start_ptr; |
128 | u8 pfu_enabled; | 128 | u8 pfu_enabled; |
129 | u8 sleep_cookie; | ||
129 | }; | 130 | }; |
130 | 131 | ||
131 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = { | 132 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = { |
@@ -156,6 +157,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = { | |||
156 | .ring_flag_xs_eop = 0, | 157 | .ring_flag_xs_eop = 0, |
157 | .ring_tx_start_ptr = 0, | 158 | .ring_tx_start_ptr = 0, |
158 | .pfu_enabled = 0, | 159 | .pfu_enabled = 0, |
160 | .sleep_cookie = 1, | ||
159 | }; | 161 | }; |
160 | 162 | ||
161 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = { | 163 | static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = { |
@@ -186,6 +188,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = { | |||
186 | .ring_flag_xs_eop = MWIFIEX_BD_FLAG_XS_EOP, | 188 | .ring_flag_xs_eop = MWIFIEX_BD_FLAG_XS_EOP, |
187 | .ring_tx_start_ptr = MWIFIEX_BD_FLAG_TX_START_PTR, | 189 | .ring_tx_start_ptr = MWIFIEX_BD_FLAG_TX_START_PTR, |
188 | .pfu_enabled = 1, | 190 | .pfu_enabled = 1, |
191 | .sleep_cookie = 0, | ||
189 | }; | 192 | }; |
190 | 193 | ||
191 | struct mwifiex_pcie_device { | 194 | struct mwifiex_pcie_device { |