aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154/tx.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-26 04:37:06 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-10-26 12:24:03 -0400
commit18d60a0d49ef3eb2d31f65cf5b652702d9c6e710 (patch)
tree6d45ca5720f60b54c5adc6f9fe2be8d85e41fe79 /net/mac802154/tx.c
parentc20851035126cc1d97c337083f98b797eed155a3 (diff)
mac802154: tx: use queue helpers in xmit worker
This patch uses the queue utility helpers inside the xmit worker of mac802154 subsystem. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/tx.c')
-rw-r--r--net/mac802154/tx.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index be8deae19386..8e2f429a4546 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -47,7 +47,6 @@ static void mac802154_xmit_worker(struct work_struct *work)
47{ 47{
48 struct wpan_xmit_cb *cb = container_of(work, struct wpan_xmit_cb, work); 48 struct wpan_xmit_cb *cb = container_of(work, struct wpan_xmit_cb, work);
49 struct ieee802154_local *local = cb->local; 49 struct ieee802154_local *local = cb->local;
50 struct ieee802154_sub_if_data *sdata;
51 struct sk_buff *skb = cb->skb; 50 struct sk_buff *skb = cb->skb;
52 int res; 51 int res;
53 52
@@ -56,18 +55,12 @@ static void mac802154_xmit_worker(struct work_struct *work)
56 pr_debug("transmission failed\n"); 55 pr_debug("transmission failed\n");
57 56
58 /* Restart the netif queue on each sub_if_data object. */ 57 /* Restart the netif queue on each sub_if_data object. */
59 rcu_read_lock(); 58 ieee802154_xmit_complete(&local->hw, skb);
60 list_for_each_entry_rcu(sdata, &local->interfaces, list)
61 netif_wake_queue(sdata->dev);
62 rcu_read_unlock();
63
64 dev_kfree_skb(skb);
65} 59}
66 60
67static netdev_tx_t 61static netdev_tx_t
68mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb) 62mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
69{ 63{
70 struct ieee802154_sub_if_data *sdata;
71 struct wpan_xmit_cb *cb = wpan_xmit_cb(skb); 64 struct wpan_xmit_cb *cb = wpan_xmit_cb(skb);
72 65
73 mac802154_monitors_rx(local, skb); 66 mac802154_monitors_rx(local, skb);
@@ -84,10 +77,7 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
84 goto err_tx; 77 goto err_tx;
85 78
86 /* Stop the netif queue on each sub_if_data object. */ 79 /* Stop the netif queue on each sub_if_data object. */
87 rcu_read_lock(); 80 ieee802154_stop_queue(&local->hw);
88 list_for_each_entry_rcu(sdata, &local->interfaces, list)
89 netif_stop_queue(sdata->dev);
90 rcu_read_unlock();
91 81
92 INIT_WORK(&cb->work, mac802154_xmit_worker); 82 INIT_WORK(&cb->work, mac802154_xmit_worker);
93 cb->skb = skb; 83 cb->skb = skb;