The current implementation always call ath6kl_tx_complete
regardless if a tx_complete callback has been associated with the
endpoint or not.

This patch fixes this by calling the associated callback in case
it is present.

Signed-off-by: Erik Stromdahl <erik.stromd...@gmail.com>
---
 drivers/net/wireless/ath/ath6kl/htc_mbox.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c 
b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
index 65c31da..6e8c493 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
@@ -445,7 +445,10 @@ static void htc_tx_complete(struct htc_endpoint *endpoint,
                   "htc tx complete ep %d pkts %d\n",
                   endpoint->eid, get_queue_depth(txq));
 
-       ath6kl_tx_complete(endpoint->target, txq);
+       if (endpoint->ep_cb.tx_comp_multi)
+               endpoint->ep_cb.tx_comp_multi(endpoint->target, txq);
+       else
+               ath6kl_tx_complete(endpoint->target, txq);
 }
 
 static void htc_tx_comp_handler(struct htc_target *target,
-- 
2.1.4

Reply via email to