summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/pcie.h
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-02-12 14:38:32 -0800
committerJohn W. Linville <linville@tuxdriver.com>2013-02-14 14:24:07 -0500
commit52301a815e81cdcbcf971ba28df0376dc7f3961c (patch)
tree7cde8248f4213febf0b16e2d637becbe84f1935f /drivers/net/wireless/mwifiex/pcie.h
parent06e7cda3ce30dadc3454539127b4cfc3888c349e (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.h3
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 {
u8 ring_flag_xs_eop;
u32 ring_tx_start_ptr;
u8 pfu_enabled;
+ u8 sleep_cookie;
};
static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
@@ -156,6 +157,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8766 = {
.ring_flag_xs_eop = 0,
.ring_tx_start_ptr = 0,
.pfu_enabled = 0,
+ .sleep_cookie = 1,
};
static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = {
@@ -186,6 +188,7 @@ static const struct mwifiex_pcie_card_reg mwifiex_reg_8897 = {
.ring_flag_xs_eop = MWIFIEX_BD_FLAG_XS_EOP,
.ring_tx_start_ptr = MWIFIEX_BD_FLAG_TX_START_PTR,
.pfu_enabled = 1,
+ .sleep_cookie = 0,
};
struct mwifiex_pcie_device {