summaryrefslogtreecommitdiffstats
path: root/net/mac802154/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/tx.c')
-rw-r--r--net/mac802154/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 4a46ce8d2ac8..33f64ecd96c7 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -44,6 +44,7 @@ void ieee802154_xmit_sync_worker(struct work_struct *work)
err_tx:
/* Restart the netif queue on each sub_if_data object. */
ieee802154_wake_queue(&local->hw);
+ atomic_dec(&local->phy->ongoing_txs);
kfree_skb(skb);
netdev_dbg(dev, "transmission failed\n");
}
@@ -75,6 +76,7 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
/* Stop the netif queue on each sub_if_data object. */
ieee802154_stop_queue(&local->hw);
+ atomic_inc(&local->phy->ongoing_txs);
/* Drivers should preferably implement the async callback. In some rare
* cases they only provide a sync callback which we will use as a
@@ -98,6 +100,7 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
err_wake_netif_queue:
ieee802154_wake_queue(&local->hw);
+ atomic_dec(&local->phy->ongoing_txs);
err_free_skb:
kfree_skb(skb);
return NETDEV_TX_OK;