ath6kl: Moe virt_scat from hif_dev_scat_sup_info to hif_scatter_req
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
committed by
Kalle Valo
parent
cfeab10b11
commit
4a005c3ed0
@@ -171,6 +171,8 @@ struct hif_scatter_req {
|
|||||||
/* total length of entire transfer */
|
/* total length of entire transfer */
|
||||||
u32 len;
|
u32 len;
|
||||||
|
|
||||||
|
bool virt_scat;
|
||||||
|
|
||||||
void (*complete) (struct htc_target *, struct hif_scatter_req *);
|
void (*complete) (struct htc_target *, struct hif_scatter_req *);
|
||||||
int status;
|
int status;
|
||||||
int scat_entries;
|
int scat_entries;
|
||||||
@@ -187,7 +189,6 @@ struct hif_scatter_req {
|
|||||||
struct hif_dev_scat_sup_info {
|
struct hif_dev_scat_sup_info {
|
||||||
int max_scat_entries;
|
int max_scat_entries;
|
||||||
int max_xfer_szper_scatreq;
|
int max_xfer_szper_scatreq;
|
||||||
bool virt_scat;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ath6kl_hif_ops {
|
struct ath6kl_hif_ops {
|
||||||
|
@@ -273,7 +273,7 @@ int ath6kldev_submit_scat_req(struct ath6kl_device *dev,
|
|||||||
scat_req->addr, !read ? "async" : "sync",
|
scat_req->addr, !read ? "async" : "sync",
|
||||||
(read) ? "rd" : "wr");
|
(read) ? "rd" : "wr");
|
||||||
|
|
||||||
if (!read && dev->hif_scat_info.virt_scat)
|
if (!read && scat_req->virt_scat)
|
||||||
status = ath6kldev_cp_scat_dma_buf(scat_req, false);
|
status = ath6kldev_cp_scat_dma_buf(scat_req, false);
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
@@ -285,7 +285,7 @@ int ath6kldev_submit_scat_req(struct ath6kl_device *dev,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->hif_scat_info.virt_scat)
|
if (scat_req->virt_scat)
|
||||||
status = ath6kldev_rw_scatter(dev->ar, scat_req);
|
status = ath6kldev_rw_scatter(dev->ar, scat_req);
|
||||||
else
|
else
|
||||||
status = ath6kl_hif_scat_req_rw(dev->ar, scat_req);
|
status = ath6kl_hif_scat_req_rw(dev->ar, scat_req);
|
||||||
@@ -293,7 +293,7 @@ int ath6kldev_submit_scat_req(struct ath6kl_device *dev,
|
|||||||
if (read) {
|
if (read) {
|
||||||
/* in sync mode, we can touch the scatter request */
|
/* in sync mode, we can touch the scatter request */
|
||||||
scat_req->status = status;
|
scat_req->status = status;
|
||||||
if (!status && dev->hif_scat_info.virt_scat)
|
if (!status && scat_req->virt_scat)
|
||||||
scat_req->status =
|
scat_req->status =
|
||||||
ath6kldev_cp_scat_dma_buf(scat_req, true);
|
ath6kldev_cp_scat_dma_buf(scat_req, true);
|
||||||
}
|
}
|
||||||
|
@@ -325,6 +325,8 @@ static int ath6kl_sdio_alloc_prep_scat_req(struct ath6kl_sdio *ar_sdio,
|
|||||||
bus_req->scat_req = s_req;
|
bus_req->scat_req = s_req;
|
||||||
s_req->busrequest = bus_req;
|
s_req->busrequest = bus_req;
|
||||||
|
|
||||||
|
s_req->virt_scat = virt_scat;
|
||||||
|
|
||||||
/* add it to the scatter pool */
|
/* add it to the scatter pool */
|
||||||
hif_scatter_req_add(ar_sdio->ar, s_req);
|
hif_scatter_req_add(ar_sdio->ar, s_req);
|
||||||
}
|
}
|
||||||
@@ -694,8 +696,6 @@ static int ath6kl_sdio_enable_scatter(struct ath6kl *ar,
|
|||||||
ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER;
|
ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
pinfo->virt_scat = virt_scat;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user