aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2011-07-16 10:59:09 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-08-09 12:45:19 -0400
commite041c7f9af5a3583ee2bd20af1b03ec56b6adcca (patch)
tree31b2ed552fc9787e38657292b48d95231a7c9675 /drivers/net
parent7c565b6f8c635fc22535c763e08184379b16920e (diff)
ath6kl: Remove endpoint reference from hif_scatter_req
Endpoint id ffrom htc_packet can be used instead. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath6kl/hif.h3
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc.c10
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc_hif.c6
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c2
4 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h
index f17ae57ee30..1458660a1c0 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.h
+++ b/drivers/net/wireless/ath/ath6kl/hif.h
@@ -171,9 +171,8 @@ struct hif_scatter_req {
171 /* total length of entire transfer */ 171 /* total length of entire transfer */
172 u32 len; 172 u32 len;
173 173
174 void (*complete) (struct hif_scatter_req *); 174 void (*complete) (struct htc_target *, struct hif_scatter_req *);
175 int status; 175 int status;
176 struct htc_endpoint *ep;
177 int scat_entries; 176 int scat_entries;
178 177
179 struct bus_request *busrequest; 178 struct bus_request *busrequest;
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index e65de498a82..e77e7684ee9 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -127,10 +127,10 @@ static void htc_tx_comp_handler(struct htc_target *target,
127 htc_tx_complete(endpoint, &container); 127 htc_tx_complete(endpoint, &container);
128} 128}
129 129
130static void htc_async_tx_scat_complete(struct hif_scatter_req *scat_req) 130static void htc_async_tx_scat_complete(struct htc_target *target,
131 struct hif_scatter_req *scat_req)
131{ 132{
132 struct htc_endpoint *endpoint = scat_req->ep; 133 struct htc_endpoint *endpoint;
133 struct htc_target *target = endpoint->target;
134 struct htc_packet *packet; 134 struct htc_packet *packet;
135 struct list_head tx_compq; 135 struct list_head tx_compq;
136 int i; 136 int i;
@@ -144,6 +144,9 @@ static void htc_async_tx_scat_complete(struct hif_scatter_req *scat_req)
144 if (scat_req->status) 144 if (scat_req->status)
145 ath6kl_err("send scatter req failed: %d\n", scat_req->status); 145 ath6kl_err("send scatter req failed: %d\n", scat_req->status);
146 146
147 packet = scat_req->scat_list[0].packet;
148 endpoint = &target->endpoint[packet->endpoint];
149
147 /* walk through the scatter list and process */ 150 /* walk through the scatter list and process */
148 for (i = 0; i < scat_req->scat_entries; i++) { 151 for (i = 0; i < scat_req->scat_entries; i++) {
149 packet = scat_req->scat_list[i].packet; 152 packet = scat_req->scat_list[i].packet;
@@ -465,7 +468,6 @@ static void htc_issue_send_bundle(struct htc_endpoint *endpoint,
465 468
466 /* send path is always asynchronous */ 469 /* send path is always asynchronous */
467 scat_req->complete = htc_async_tx_scat_complete; 470 scat_req->complete = htc_async_tx_scat_complete;
468 scat_req->ep = endpoint;
469 n_sent_bundle++; 471 n_sent_bundle++;
470 tot_pkts_bundle += scat_req->scat_entries; 472 tot_pkts_bundle += scat_req->scat_entries;
471 473
diff --git a/drivers/net/wireless/ath/ath6kl/htc_hif.c b/drivers/net/wireless/ath/ath6kl/htc_hif.c
index df904d8c48c..40853cbad36 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_hif.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_hif.c
@@ -201,7 +201,7 @@ static void ath6kldev_rw_async_handler(struct htc_target *target,
201 201
202 ath6kl_add_io_pkt(dev, packet); 202 ath6kl_add_io_pkt(dev, packet);
203 203
204 req->complete(req); 204 req->complete(target, req);
205} 205}
206 206
207static int ath6kldev_rw_scatter(struct ath6kl *ar, struct hif_scatter_req *req) 207static int ath6kldev_rw_scatter(struct ath6kl *ar, struct hif_scatter_req *req)
@@ -243,7 +243,7 @@ out:
243 if (packet != NULL) 243 if (packet != NULL)
244 ath6kl_add_io_pkt(dev, packet); 244 ath6kl_add_io_pkt(dev, packet);
245 req->status = status; 245 req->status = status;
246 req->complete(req); 246 req->complete(ar->htc_target, req);
247 status = 0; 247 status = 0;
248 } 248 }
249 249
@@ -279,7 +279,7 @@ int ath6kldev_submit_scat_req(struct ath6kl_device *dev,
279 if (status) { 279 if (status) {
280 if (!read) { 280 if (!read) {
281 scat_req->status = status; 281 scat_req->status = status;
282 scat_req->complete(scat_req); 282 scat_req->complete(dev->ar->htc_target, scat_req);
283 return 0; 283 return 0;
284 } 284 }
285 return status; 285 return status;
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index da60738324b..6fbc27ec2cf 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -264,7 +264,7 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio,
264 scat_req->status); 264 scat_req->status);
265 265
266 if (scat_req->req & HIF_ASYNCHRONOUS) 266 if (scat_req->req & HIF_ASYNCHRONOUS)
267 scat_req->complete(scat_req); 267 scat_req->complete(ar_sdio->ar->htc_target, scat_req);
268 268
269 return status; 269 return status;
270} 270}