aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/htc.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2013-09-13 14:16:53 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2013-09-16 19:47:46 +0300
commit88e65fc33752f54dfbabc766de15f3be6989f1d1 (patch)
treec68b0d02b2a49200f2ab8e95613791a20e1a9058 /drivers/net/wireless/ath/ath10k/htc.c
parenteeed3765f327755b499c81eaf453e9d52a27c01c (diff)
ath10k: add HTC TX credits replenishing notification
This will allow higher layers to anticipate and act upon TX credits renewal. This will be important for some future rework of WMI command submission. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htc.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/htc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 1da0f828f458..49da4e509084 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -150,6 +150,9 @@ err:
ep->tx_credits += credits;
spin_unlock_bh(&htc->tx_lock);
+ if (ep->ep_ops.ep_tx_credits)
+ ep->ep_ops.ep_tx_credits(htc->ar);
+
/* this is the simplest way to handle out-of-resources for non-credit
* based endpoints. credit based endpoints can still get -ENOSR, but
* this is highly unlikely as credit reservation should prevent that */
@@ -302,6 +305,12 @@ ath10k_htc_process_credit_report(struct ath10k_htc *htc,
ep = &htc->endpoint[report->eid];
ep->tx_credits += report->credits;
+ if (ep->ep_ops.ep_tx_credits) {
+ spin_unlock_bh(&htc->tx_lock);
+ ep->ep_ops.ep_tx_credits(htc->ar);
+ spin_lock_bh(&htc->tx_lock);
+ }
+
if (ep->tx_credits && !skb_queue_empty(&ep->tx_queue))
queue_work(htc->ar->workqueue, &ep->send_work);
}