Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265446
b: refs/heads/master
c: c630d18
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Aug 9, 2011
1 parent 24dac9a commit a61d7ec
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f74a7361b8affcd76ffe1e2baa5748af4d63bcea
refs/heads/master: c630d18a5ea0213f6ad8e34b62f9c78038f371d8
63 changes: 31 additions & 32 deletions trunk/drivers/net/wireless/ath/ath6kl/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,38 +270,6 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio,
return status;
}


/* scatter gather read write request */
static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar,
struct hif_scatter_req *scat_req)
{
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
struct hif_scatter_req_priv *req_priv = scat_req->req_priv;
u32 request = scat_req->req;
int status = 0;
unsigned long flags;

if (!scat_req->len)
return -EINVAL;

ath6kl_dbg(ATH6KL_DBG_SCATTER,
"hif-scatter: total len: %d scatter entries: %d\n",
scat_req->len, scat_req->scat_entries);

if (request & HIF_SYNCHRONOUS) {
sdio_claim_host(ar_sdio->func);
status = ath6kl_sdio_scat_rw(ar_sdio, req_priv->busrequest);
sdio_release_host(ar_sdio->func);
} else {
spin_lock_irqsave(&ar_sdio->wr_async_lock, flags);
list_add_tail(&req_priv->busrequest->list, &ar_sdio->wr_asyncq);
spin_unlock_irqrestore(&ar_sdio->wr_async_lock, flags);
queue_work(ar->ath6kl_wq, &ar_sdio->wr_async_work);
}

return status;
}

/* clean up scatter support */
static void ath6kl_sdio_cleanup_scat_resource(struct ath6kl_sdio *ar_sdio)
{
Expand Down Expand Up @@ -654,6 +622,37 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar,
return ret;
}

/* scatter gather read write request */
static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar,
struct hif_scatter_req *scat_req)
{
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
struct hif_scatter_req_priv *req_priv = scat_req->req_priv;
u32 request = scat_req->req;
int status = 0;
unsigned long flags;

if (!scat_req->len)
return -EINVAL;

ath6kl_dbg(ATH6KL_DBG_SCATTER,
"hif-scatter: total len: %d scatter entries: %d\n",
scat_req->len, scat_req->scat_entries);

if (request & HIF_SYNCHRONOUS) {
sdio_claim_host(ar_sdio->func);
status = ath6kl_sdio_scat_rw(ar_sdio, req_priv->busrequest);
sdio_release_host(ar_sdio->func);
} else {
spin_lock_irqsave(&ar_sdio->wr_async_lock, flags);
list_add_tail(&req_priv->busrequest->list, &ar_sdio->wr_asyncq);
spin_unlock_irqrestore(&ar_sdio->wr_async_lock, flags);
queue_work(ar->ath6kl_wq, &ar_sdio->wr_async_work);
}

return status;
}

static void ath6kl_sdio_cleanup_scatter(struct ath6kl *ar)
{
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
Expand Down

0 comments on commit a61d7ec

Please sign in to comment.