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

Commit 0e5b2950 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by Kalle Valo
Browse files

ath10k: register per copy engine send completion callbacks



Register send completion callbacks for every copy engines (CE) separately
instead of having common completion handler. Since some of the copy
engines delivers different type of messages, per-CE callbacks help to
service them differently.

Reviewed-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent aed1dc82
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1077,7 +1077,6 @@ void ath10k_ce_deinit_pipe(struct ath10k *ar, unsigned int ce_id)

int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
			 const struct ce_attr *attr,
			 void (*send_cb)(struct ath10k_ce_pipe *),
			 void (*recv_cb)(struct ath10k_ce_pipe *))
{
	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
@@ -1104,7 +1103,7 @@ int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
	ce_state->src_sz_max = attr->src_sz_max;

	if (attr->src_nentries)
		ce_state->send_cb = send_cb;
		ce_state->send_cb = attr->send_cb;

	if (attr->dest_nentries)
		ce_state->recv_cb = recv_cb;
+2 −1
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ int ath10k_ce_init_pipe(struct ath10k *ar, unsigned int ce_id,
void ath10k_ce_deinit_pipe(struct ath10k *ar, unsigned int ce_id);
int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
			 const struct ce_attr *attr,
			 void (*send_cb)(struct ath10k_ce_pipe *),
			 void (*recv_cb)(struct ath10k_ce_pipe *));
void ath10k_ce_free_pipe(struct ath10k *ar, int ce_id);

@@ -277,6 +276,8 @@ struct ce_attr {

	/* #entries in destination ring - Must be a power of 2 */
	unsigned int dest_nentries;

	void (*send_cb)(struct ath10k_ce_pipe *);
};

#define SR_BA_ADDRESS		0x0000
+0 −2
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@ struct ath10k_hif_sg_item {
};

struct ath10k_hif_cb {
	int (*tx_completion)(struct ath10k *ar,
			     struct sk_buff *wbuf);
	int (*rx_completion)(struct ath10k *ar,
			     struct sk_buff *wbuf);
};
+2 −5
Original line number Diff line number Diff line
@@ -181,22 +181,20 @@ int ath10k_htc_send(struct ath10k_htc *htc,
	return ret;
}

int ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
void ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb)
{
	struct ath10k_htc *htc = &ar->htc;
	struct ath10k_skb_cb *skb_cb;
	struct ath10k_htc_ep *ep;

	if (WARN_ON_ONCE(!skb))
		return 0;
		return;

	skb_cb = ATH10K_SKB_CB(skb);
	ep = &htc->endpoint[skb_cb->eid];

	ath10k_htc_notify_tx_completion(ep, skb);
	/* the skb now belongs to the completion handler */

	return 0;
}
EXPORT_SYMBOL(ath10k_htc_tx_completion_handler);

@@ -851,7 +849,6 @@ int ath10k_htc_init(struct ath10k *ar)

	/* setup HIF layer callbacks */
	htc_callbacks.rx_completion = ath10k_htc_rx_completion_handler;
	htc_callbacks.tx_completion = ath10k_htc_tx_completion_handler;
	htc->ar = ar;

	/* Get HIF default pipe for HTC message exchange */
+1 −1
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc,
int ath10k_htc_send(struct ath10k_htc *htc, enum ath10k_htc_ep_id eid,
		    struct sk_buff *packet);
struct sk_buff *ath10k_htc_alloc_skb(struct ath10k *ar, int size);
int ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb);
void ath10k_htc_tx_completion_handler(struct ath10k *ar, struct sk_buff *skb);
int ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb);

#endif
Loading