Lines Matching +full:need +full:- +full:phy +full:- +full:for +full:- +full:wake
1 // SPDX-License-Identifier: GPL-2.0-only
11 #include "driver-ops.h"
13 /* privid for wpan_phys to determine whether they belong to us or not */
17 * ieee802154_wake_queue - wake ieee802154 queue
21 * for both transmitting and receiving. Hence, the core currently only handles
22 * one frame at a time for each phy, which means we had to stop the queue to
32 clear_bit(WPAN_PHY_FLAG_STATE_QUEUE_STOPPED, &local->phy->flags); in ieee802154_wake_queue()
33 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee802154_wake_queue()
34 if (!sdata->dev) in ieee802154_wake_queue()
37 netif_wake_queue(sdata->dev); in ieee802154_wake_queue()
43 * ieee802154_stop_queue - stop ieee802154 queue
47 * for both transmitting and receiving. Hence, the core currently only handles
48 * one frame at a time for each phy, which means we need to tell upper layers to
58 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee802154_stop_queue()
59 if (!sdata->dev) in ieee802154_stop_queue()
62 netif_stop_queue(sdata->dev); in ieee802154_stop_queue()
71 spin_lock_irqsave(&local->phy->queue_lock, flags); in ieee802154_hold_queue()
72 if (!atomic_fetch_inc(&local->phy->hold_txs)) in ieee802154_hold_queue()
73 ieee802154_stop_queue(&local->hw); in ieee802154_hold_queue()
74 spin_unlock_irqrestore(&local->phy->queue_lock, flags); in ieee802154_hold_queue()
81 spin_lock_irqsave(&local->phy->queue_lock, flags); in ieee802154_release_queue()
82 if (atomic_dec_and_test(&local->phy->hold_txs)) in ieee802154_release_queue()
83 ieee802154_wake_queue(&local->hw); in ieee802154_release_queue()
84 spin_unlock_irqrestore(&local->phy->queue_lock, flags); in ieee802154_release_queue()
92 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee802154_disable_queue()
93 if (!sdata->dev) in ieee802154_disable_queue()
96 netif_tx_disable(sdata->dev); in ieee802154_disable_queue()
116 local->tx_result = IEEE802154_SUCCESS; in ieee802154_xmit_complete()
121 /* If transceiver sets CRC on his own we need to use lifs in ieee802154_xmit_complete()
123 * part of skb->len. in ieee802154_xmit_complete()
125 if (hw->flags & IEEE802154_HW_TX_OMIT_CKSUM) in ieee802154_xmit_complete()
126 max_sifs_size = IEEE802154_MAX_SIFS_FRAME_SIZE - in ieee802154_xmit_complete()
131 if (skb->len > max_sifs_size) in ieee802154_xmit_complete()
132 hrtimer_start(&local->ifs_timer, in ieee802154_xmit_complete()
133 hw->phy->lifs_period * NSEC_PER_USEC, in ieee802154_xmit_complete()
136 hrtimer_start(&local->ifs_timer, in ieee802154_xmit_complete()
137 hw->phy->sifs_period * NSEC_PER_USEC, in ieee802154_xmit_complete()
144 if (atomic_dec_and_test(&hw->phy->ongoing_txs)) in ieee802154_xmit_complete()
145 wake_up(&hw->phy->sync_txq); in ieee802154_xmit_complete()
154 local->tx_result = reason; in ieee802154_xmit_error()
157 if (atomic_dec_and_test(&hw->phy->ongoing_txs)) in ieee802154_xmit_error()
158 wake_up(&hw->phy->sync_txq); in ieee802154_xmit_error()
170 flush_workqueue(local->workqueue); in ieee802154_stop_device()
171 hrtimer_cancel(&local->ifs_timer); in ieee802154_stop_device()