diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-07-16 10:59:06 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-08-09 12:45:19 -0400 |
commit | c630d18a5ea0213f6ad8e34b62f9c78038f371d8 (patch) | |
tree | c675847a91f3fd1bbc8800dc676f4fb474bf5488 /drivers/net/wireless/ath/ath6kl/sdio.c | |
parent | f74a7361b8affcd76ffe1e2baa5748af4d63bcea (diff) |
ath6kl: Move ath6kl_sdio_async_rw_scatter() down to other hif_ops functions
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.c | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index d217f1c642b..559c3a75540 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c | |||
@@ -270,38 +270,6 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio, | |||
270 | return status; | 270 | return status; |
271 | } | 271 | } |
272 | 272 | ||
273 | |||
274 | /* scatter gather read write request */ | ||
275 | static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar, | ||
276 | struct hif_scatter_req *scat_req) | ||
277 | { | ||
278 | struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); | ||
279 | struct hif_scatter_req_priv *req_priv = scat_req->req_priv; | ||
280 | u32 request = scat_req->req; | ||
281 | int status = 0; | ||
282 | unsigned long flags; | ||
283 | |||
284 | if (!scat_req->len) | ||
285 | return -EINVAL; | ||
286 | |||
287 | ath6kl_dbg(ATH6KL_DBG_SCATTER, | ||
288 | "hif-scatter: total len: %d scatter entries: %d\n", | ||
289 | scat_req->len, scat_req->scat_entries); | ||
290 | |||
291 | if (request & HIF_SYNCHRONOUS) { | ||
292 | sdio_claim_host(ar_sdio->func); | ||
293 | status = ath6kl_sdio_scat_rw(ar_sdio, req_priv->busrequest); | ||
294 | sdio_release_host(ar_sdio->func); | ||
295 | } else { | ||
296 | spin_lock_irqsave(&ar_sdio->wr_async_lock, flags); | ||
297 | list_add_tail(&req_priv->busrequest->list, &ar_sdio->wr_asyncq); | ||
298 | spin_unlock_irqrestore(&ar_sdio->wr_async_lock, flags); | ||
299 | queue_work(ar->ath6kl_wq, &ar_sdio->wr_async_work); | ||
300 | } | ||
301 | |||
302 | return status; | ||
303 | } | ||
304 | |||
305 | /* clean up scatter support */ | 273 | /* clean up scatter support */ |
306 | static void ath6kl_sdio_cleanup_scat_resource(struct ath6kl_sdio *ar_sdio) | 274 | static void ath6kl_sdio_cleanup_scat_resource(struct ath6kl_sdio *ar_sdio) |
307 | { | 275 | { |
@@ -654,6 +622,37 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar, | |||
654 | return ret; | 622 | return ret; |
655 | } | 623 | } |
656 | 624 | ||
625 | /* scatter gather read write request */ | ||
626 | static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar, | ||
627 | struct hif_scatter_req *scat_req) | ||
628 | { | ||
629 | struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); | ||
630 | struct hif_scatter_req_priv *req_priv = scat_req->req_priv; | ||
631 | u32 request = scat_req->req; | ||
632 | int status = 0; | ||
633 | unsigned long flags; | ||
634 | |||
635 | if (!scat_req->len) | ||
636 | return -EINVAL; | ||
637 | |||
638 | ath6kl_dbg(ATH6KL_DBG_SCATTER, | ||
639 | "hif-scatter: total len: %d scatter entries: %d\n", | ||
640 | scat_req->len, scat_req->scat_entries); | ||
641 | |||
642 | if (request & HIF_SYNCHRONOUS) { | ||
643 | sdio_claim_host(ar_sdio->func); | ||
644 | status = ath6kl_sdio_scat_rw(ar_sdio, req_priv->busrequest); | ||
645 | sdio_release_host(ar_sdio->func); | ||
646 | } else { | ||
647 | spin_lock_irqsave(&ar_sdio->wr_async_lock, flags); | ||
648 | list_add_tail(&req_priv->busrequest->list, &ar_sdio->wr_asyncq); | ||
649 | spin_unlock_irqrestore(&ar_sdio->wr_async_lock, flags); | ||
650 | queue_work(ar->ath6kl_wq, &ar_sdio->wr_async_work); | ||
651 | } | ||
652 | |||
653 | return status; | ||
654 | } | ||
655 | |||
657 | static void ath6kl_sdio_cleanup_scatter(struct ath6kl *ar) | 656 | static void ath6kl_sdio_cleanup_scatter(struct ath6kl *ar) |
658 | { | 657 | { |
659 | struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); | 658 | struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); |