Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e041c7f9 authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by Kalle Valo
Browse files

ath6kl: Remove endpoint reference from hif_scatter_req



Endpoint id ffrom htc_packet can be used instead.

Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7c565b6f
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -171,9 +171,8 @@ struct hif_scatter_req {
	/* total length of entire transfer */
	/* total length of entire transfer */
	u32 len;
	u32 len;


	void (*complete) (struct hif_scatter_req *);
	void (*complete) (struct htc_target *, struct hif_scatter_req *);
	int status;
	int status;
	struct htc_endpoint *ep;
	int scat_entries;
	int scat_entries;


	struct bus_request *busrequest;
	struct bus_request *busrequest;
+6 −4
Original line number Original line Diff line number Diff line
@@ -127,10 +127,10 @@ static void htc_tx_comp_handler(struct htc_target *target,
	htc_tx_complete(endpoint, &container);
	htc_tx_complete(endpoint, &container);
}
}


static void htc_async_tx_scat_complete(struct hif_scatter_req *scat_req)
static void htc_async_tx_scat_complete(struct htc_target *target,
				       struct hif_scatter_req *scat_req)
{
{
	struct htc_endpoint *endpoint = scat_req->ep;
	struct htc_endpoint *endpoint;
	struct htc_target *target = endpoint->target;
	struct htc_packet *packet;
	struct htc_packet *packet;
	struct list_head tx_compq;
	struct list_head tx_compq;
	int i;
	int i;
@@ -144,6 +144,9 @@ static void htc_async_tx_scat_complete(struct hif_scatter_req *scat_req)
	if (scat_req->status)
	if (scat_req->status)
		ath6kl_err("send scatter req failed: %d\n", scat_req->status);
		ath6kl_err("send scatter req failed: %d\n", scat_req->status);


	packet = scat_req->scat_list[0].packet;
	endpoint = &target->endpoint[packet->endpoint];

	/* walk through the scatter list and process */
	/* walk through the scatter list and process */
	for (i = 0; i < scat_req->scat_entries; i++) {
	for (i = 0; i < scat_req->scat_entries; i++) {
		packet = scat_req->scat_list[i].packet;
		packet = scat_req->scat_list[i].packet;
@@ -465,7 +468,6 @@ static void htc_issue_send_bundle(struct htc_endpoint *endpoint,


		/* send path is always asynchronous */
		/* send path is always asynchronous */
		scat_req->complete = htc_async_tx_scat_complete;
		scat_req->complete = htc_async_tx_scat_complete;
		scat_req->ep = endpoint;
		n_sent_bundle++;
		n_sent_bundle++;
		tot_pkts_bundle += scat_req->scat_entries;
		tot_pkts_bundle += scat_req->scat_entries;


+3 −3
Original line number Original line Diff line number Diff line
@@ -201,7 +201,7 @@ static void ath6kldev_rw_async_handler(struct htc_target *target,


	ath6kl_add_io_pkt(dev, packet);
	ath6kl_add_io_pkt(dev, packet);


	req->complete(req);
	req->complete(target, req);
}
}


static int ath6kldev_rw_scatter(struct ath6kl *ar, struct hif_scatter_req *req)
static int ath6kldev_rw_scatter(struct ath6kl *ar, struct hif_scatter_req *req)
@@ -243,7 +243,7 @@ static int ath6kldev_rw_scatter(struct ath6kl *ar, struct hif_scatter_req *req)
			if (packet != NULL)
			if (packet != NULL)
				ath6kl_add_io_pkt(dev, packet);
				ath6kl_add_io_pkt(dev, packet);
			req->status = status;
			req->status = status;
			req->complete(req);
			req->complete(ar->htc_target, req);
			status = 0;
			status = 0;
		}
		}


@@ -279,7 +279,7 @@ int ath6kldev_submit_scat_req(struct ath6kl_device *dev,
	if (status) {
	if (status) {
		if (!read) {
		if (!read) {
			scat_req->status = status;
			scat_req->status = status;
			scat_req->complete(scat_req);
			scat_req->complete(dev->ar->htc_target, scat_req);
			return 0;
			return 0;
		}
		}
		return status;
		return status;
+1 −1
Original line number Original line Diff line number Diff line
@@ -264,7 +264,7 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio,
			   scat_req->status);
			   scat_req->status);


	if (scat_req->req & HIF_ASYNCHRONOUS)
	if (scat_req->req & HIF_ASYNCHRONOUS)
		scat_req->complete(scat_req);
		scat_req->complete(ar_sdio->ar->htc_target, scat_req);


	return status;
	return status;
}
}