diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-05-19 17:05:13 +0200 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2022-06-10 09:48:40 +0200 |
commit | f0feb34904735ffa21fe7b0c50f9f9527ec74b7a (patch) | |
tree | 27ef02d071d235a3a95005b4b17d439efa6329ce /net/mac802154/cfg.c | |
parent | net: mac802154: Introduce a helper to disable the queue (diff) | |
download | linux-f0feb34904735ffa21fe7b0c50f9f9527ec74b7a.tar.xz linux-f0feb34904735ffa21fe7b0c50f9f9527ec74b7a.zip |
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 'net/mac802154/cfg.c')
-rw-r--r-- | net/mac802154/cfg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c index b51100fd9e3f..93df24f75572 100644 --- a/net/mac802154/cfg.c +++ b/net/mac802154/cfg.c @@ -46,7 +46,7 @@ static int ieee802154_suspend(struct wpan_phy *wpan_phy) if (!local->open_count) goto suspend; - ieee802154_hold_queue(local); + ieee802154_sync_and_hold_queue(local); synchronize_net(); /* stop hardware - this must stop RX */ |