summaryrefslogtreecommitdiff
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-05-19 17:05:13 +0200
committerStefan Schmidt <stefan@datenfreihafen.org>2022-06-10 09:48:40 +0200
commitf0feb34904735ffa21fe7b0c50f9f9527ec74b7a (patch)
tree27ef02d071d235a3a95005b4b17d439efa6329ce /include/net/cfg802154.h
parenta40612f399eabe23424acf5985643a35d4f2832e (diff)
net: mac802154: Introduce a tx queue flushing mechanism
Right now we are able to stop a queue but we have no indication if a transmission is ongoing or not. Thanks to recent additions, we can track the number of ongoing transmissions so we know if the last transmission is over. Adding on top of it an internal wait queue also allows to be woken up asynchronously when this happens. If, beforehands, we marked the queue to be held and stopped it, we end up flushing and stopping the tx queue. Thanks to this feature, we will soon be able to introduce a synchronous transmit API. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/r/20220519150516.443078-9-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index e87f1b07f20f..0804d79669a4 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -218,6 +218,7 @@ struct wpan_phy {
spinlock_t queue_lock;
atomic_t ongoing_txs;
atomic_t hold_txs;
+ wait_queue_head_t sync_txq;
char priv[] __aligned(NETDEV_ALIGN);
};