diff options
author | Avinash Patil <patila@marvell.com> | 2013-01-04 00:21:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-07 15:18:30 -0500 |
commit | fc3314609047daf472b3ffc49f9a1c5608068713 (patch) | |
tree | 8e5c9a01fb61337e7f7a996ff78d31f749d47112 /drivers/net/wireless/mwifiex/sta_cmd.c | |
parent | c6d1d87a10d1e5317701676c39bbec20e4651b91 (diff) |
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/sta_cmd.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_cmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c index 5d87195390f8..c4607859d59d 100644 --- a/drivers/net/wireless/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/mwifiex/sta_cmd.c | |||
@@ -931,7 +931,6 @@ mwifiex_cmd_pcie_host_spec(struct mwifiex_private *priv, | |||
931 | struct host_cmd_ds_pcie_details *host_spec = | 931 | struct host_cmd_ds_pcie_details *host_spec = |
932 | &cmd->params.pcie_host_spec; | 932 | &cmd->params.pcie_host_spec; |
933 | struct pcie_service_card *card = priv->adapter->card; | 933 | struct pcie_service_card *card = priv->adapter->card; |
934 | phys_addr_t *buf_pa; | ||
935 | 934 | ||
936 | cmd->command = cpu_to_le16(HostCmd_CMD_PCIE_DESC_DETAILS); | 935 | cmd->command = cpu_to_le16(HostCmd_CMD_PCIE_DESC_DETAILS); |
937 | cmd->size = cpu_to_le16(sizeof(struct | 936 | cmd->size = cpu_to_le16(sizeof(struct |
@@ -953,10 +952,11 @@ mwifiex_cmd_pcie_host_spec(struct mwifiex_private *priv, | |||
953 | host_spec->evtbd_addr_lo = (u32)(card->evtbd_ring_pbase); | 952 | host_spec->evtbd_addr_lo = (u32)(card->evtbd_ring_pbase); |
954 | host_spec->evtbd_addr_hi = (u32)(((u64)card->evtbd_ring_pbase)>>32); | 953 | host_spec->evtbd_addr_hi = (u32)(((u64)card->evtbd_ring_pbase)>>32); |
955 | host_spec->evtbd_count = MWIFIEX_MAX_EVT_BD; | 954 | host_spec->evtbd_count = MWIFIEX_MAX_EVT_BD; |
956 | if (card->sleep_cookie) { | 955 | if (card->sleep_cookie_vbase) { |
957 | buf_pa = MWIFIEX_SKB_PACB(card->sleep_cookie); | 956 | host_spec->sleep_cookie_addr_lo = |
958 | host_spec->sleep_cookie_addr_lo = (u32) *buf_pa; | 957 | (u32)(card->sleep_cookie_pbase); |
959 | host_spec->sleep_cookie_addr_hi = (u32) (((u64)*buf_pa) >> 32); | 958 | host_spec->sleep_cookie_addr_hi = |
959 | (u32)(((u64)(card->sleep_cookie_pbase)) >> 32); | ||
960 | dev_dbg(priv->adapter->dev, "sleep_cook_lo phy addr: 0x%x\n", | 960 | dev_dbg(priv->adapter->dev, "sleep_cook_lo phy addr: 0x%x\n", |
961 | host_spec->sleep_cookie_addr_lo); | 961 | host_spec->sleep_cookie_addr_lo); |
962 | } | 962 | } |