Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265445
b: refs/heads/master
c: f74a736
h: refs/heads/master
i:
  265443: 9ad3a5a
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Aug 9, 2011
1 parent 843107c commit 24dac9a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 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: bdcd81707973cf8aa9305337166f8ee842a050d4
refs/heads/master: f74a7361b8affcd76ffe1e2baa5748af4d63bcea
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/hif-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ static inline int ath6kl_hif_enable_scatter(struct ath6kl *ar,
return ar->hif_ops->enable_scatter(ar, info);
}

static inline int ath6kl_hif_scat_req_rw(struct ath6kl *ar,
struct hif_scatter_req *scat_req)
{
return ar->hif_ops->scat_req_rw(ar, scat_req);
}

static inline void ath6kl_hif_cleanup_scatter(struct ath6kl *ar)
{
return ar->hif_ops->cleanup_scatter(ar);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/hif.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ struct hif_scatter_req {
};

struct hif_dev_scat_sup_info {
int (*rw_scat_func) (struct ath6kl *ar, struct hif_scatter_req *);
int max_scat_entries;
int max_xfer_szper_scatreq;
};
Expand All @@ -210,6 +209,8 @@ struct ath6kl_hif_ops {
struct hif_scatter_req *s_req);
int (*enable_scatter)(struct ath6kl *ar,
struct hif_dev_scat_sup_info *info);
int (*scat_req_rw) (struct ath6kl *ar,
struct hif_scatter_req *scat_req);
void (*cleanup_scatter)(struct ath6kl *ar);
};

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/htc_hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ int ath6kldev_submit_scat_req(struct ath6kl_device *dev,
return status;
}

status = dev->hif_scat_info.rw_scat_func(dev->ar, scat_req);
if (dev->virt_scat)
status = ath6kldev_rw_scatter(dev->ar, scat_req);
else
status = ath6kl_hif_scat_req_rw(dev->ar, scat_req);

if (read) {
/* in sync mode, we can touch the scatter request */
Expand Down Expand Up @@ -340,7 +343,6 @@ static int ath6kldev_setup_virt_scat_sup(struct ath6kl_device *dev)
if (status)
ath6kl_hif_cleanup_scatter(dev->ar);
else {
dev->hif_scat_info.rw_scat_func = ath6kldev_rw_scatter;
dev->hif_scat_info.max_scat_entries =
ATH6KL_SCATTER_ENTRIES_PER_REQ;
dev->hif_scat_info.max_xfer_szper_scatreq =
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/net/wireless/ath/ath6kl/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio,
}


/* callback to issue a read-write scatter request */
/* scatter gather read write request */
static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar,
struct hif_scatter_req *scat_req)
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;
Expand Down Expand Up @@ -379,8 +379,6 @@ static int ath6kl_sdio_setup_scat_resource(struct ath6kl_sdio *ar_sdio,
hif_scatter_req_add(ar_sdio->ar, s_req);
}

/* set scatter function pointers */
pinfo->rw_scat_func = ath6kl_sdio_async_rw_scatter;
pinfo->max_scat_entries = MAX_SCATTER_ENTRIES_PER_REQ;
pinfo->max_xfer_szper_scatreq = MAX_SCATTER_REQ_TRANSFER_SIZE;

Expand Down Expand Up @@ -671,6 +669,7 @@ static const struct ath6kl_hif_ops ath6kl_sdio_ops = {
.scatter_req_get = ath6kl_sdio_scatter_req_get,
.scatter_req_add = ath6kl_sdio_scatter_req_add,
.enable_scatter = ath6kl_sdio_enable_scatter,
.scat_req_rw = ath6kl_sdio_async_rw_scatter,
.cleanup_scatter = ath6kl_sdio_cleanup_scatter,
};

Expand Down

0 comments on commit 24dac9a

Please sign in to comment.