net: mac802154: Introduce a tx queue flushing mechanism
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 19 May 2022 15:05:13 +0000 (17:05 +0200)
committerStefan Schmidt <stefan@datenfreihafen.org>
Fri, 10 Jun 2022 07:48:40 +0000 (09:48 +0200)
commitf0feb34904735ffa21fe7b0c50f9f9527ec74b7a
tree27ef02d071d235a3a95005b4b17d439efa6329ce
parenta40612f399eabe23424acf5985643a35d4f2832e
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>
include/net/cfg802154.h
net/ieee802154/core.c
net/mac802154/cfg.c
net/mac802154/ieee802154_i.h
net/mac802154/tx.c
net/mac802154/util.c