Lines Matching refs:local

27 	struct ieee802154_local *local =
29 struct sk_buff *skb = local->tx_skb;
33 res = drv_xmit_sync(local, skb);
40 ieee802154_xmit_complete(&local->hw, skb, false);
46 ieee802154_release_queue(local);
47 if (atomic_dec_and_test(&local->phy->ongoing_txs))
48 wake_up(&local->phy->sync_txq);
54 ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
59 if (!(local->hw.flags & IEEE802154_HW_TX_OMIT_CKSUM)) {
79 ieee802154_hold_queue(local);
80 atomic_inc(&local->phy->ongoing_txs);
86 if (local->ops->xmit_async) {
89 ret = drv_xmit_async(local, skb);
96 local->tx_skb = skb;
97 queue_work(local->workqueue, &local->sync_tx_work);
103 ieee802154_release_queue(local);
104 if (atomic_dec_and_test(&local->phy->ongoing_txs))
105 wake_up(&local->phy->sync_txq);
111 static int ieee802154_sync_queue(struct ieee802154_local *local)
115 ieee802154_hold_queue(local);
116 ieee802154_disable_queue(local);
117 wait_event(local->phy->sync_txq, !atomic_read(&local->phy->ongoing_txs));
118 ret = local->tx_result;
119 ieee802154_release_queue(local);
124 int ieee802154_sync_and_hold_queue(struct ieee802154_local *local)
128 ieee802154_hold_queue(local);
129 ret = ieee802154_sync_queue(local);
130 set_bit(WPAN_PHY_FLAG_STATE_QUEUE_STOPPED, &local->phy->flags);
135 int ieee802154_mlme_op_pre(struct ieee802154_local *local)
137 return ieee802154_sync_and_hold_queue(local);
140 int ieee802154_mlme_tx_locked(struct ieee802154_local *local,
150 if (!local->open_count)
159 ieee802154_tx(local, skb);
160 return ieee802154_sync_queue(local);
163 int ieee802154_mlme_tx(struct ieee802154_local *local,
170 ret = ieee802154_mlme_tx_locked(local, sdata, skb);
176 void ieee802154_mlme_op_post(struct ieee802154_local *local)
178 ieee802154_release_queue(local);
181 int ieee802154_mlme_tx_one(struct ieee802154_local *local,
187 ieee802154_mlme_op_pre(local);
188 ret = ieee802154_mlme_tx(local, sdata, skb);
189 ieee802154_mlme_op_post(local);
194 int ieee802154_mlme_tx_one_locked(struct ieee802154_local *local,
200 ieee802154_mlme_op_pre(local);
201 ret = ieee802154_mlme_tx_locked(local, sdata, skb);
202 ieee802154_mlme_op_post(local);
207 static bool ieee802154_queue_is_stopped(struct ieee802154_local *local)
209 return test_bit(WPAN_PHY_FLAG_STATE_QUEUE_STOPPED, &local->phy->flags);
213 ieee802154_hot_tx(struct ieee802154_local *local, struct sk_buff *skb)
218 WARN_ON_ONCE(ieee802154_queue_is_stopped(local));
220 return ieee802154_tx(local, skb);
230 return ieee802154_hot_tx(sdata->local, skb);
252 return ieee802154_hot_tx(sdata->local, skb);