summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/sdio.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2011-07-16 20:29:17 +0530
committerKalle Valo <kvalo@qca.qualcomm.com>2011-08-09 19:45:20 +0300
commit348a8fbce79e15b1918390120c0d63baa85343a0 (patch)
tree5bfbd3aaa86c93a076f6790a282ab7df2029ac93 /drivers/net/wireless/ath/ath6kl/sdio.c
parentda220695f03a81fc8f6fcf1921e2b6f1c2be6db6 (diff)
downloadblackbird-op-linux-348a8fbce79e15b1918390120c0d63baa85343a0.tar.gz
blackbird-op-linux-348a8fbce79e15b1918390120c0d63baa85343a0.zip
ath6kl: Merge scatter rw request functions into one
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/sdio.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 6c66613d6b45..44ac68e33b7c 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -244,10 +244,21 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio,
struct mmc_data data;
struct hif_scatter_req *scat_req;
u8 opcode, rw;
- int status;
+ int status, len;
scat_req = req->scat_req;
+ if (scat_req->virt_scat) {
+ len = scat_req->len;
+ if (scat_req->req & HIF_BLOCK_BASIS)
+ len = round_down(len, HIF_MBOX_BLOCK_SIZE);
+
+ status = ath6kl_sdio_io(ar_sdio->func, scat_req->req,
+ scat_req->addr, scat_req->virt_dma_buf,
+ len);
+ goto scat_complete;
+ }
+
memset(&mmc_req, 0, sizeof(struct mmc_request));
memset(&cmd, 0, sizeof(struct mmc_command));
memset(&data, 0, sizeof(struct mmc_data));
@@ -284,6 +295,8 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio,
mmc_wait_for_req(ar_sdio->func->card->host, &mmc_req);
status = cmd.error ? cmd.error : data.error;
+
+scat_complete:
scat_req->status = status;
if (scat_req->status)
OpenPOWER on IntegriCloud