net: mac802154: Introduce a helper to disable the queue
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 19 May 2022 15:05:12 +0000 (17:05 +0200)
committerStefan Schmidt <stefan@datenfreihafen.org>
Fri, 10 Jun 2022 07:48:40 +0000 (09:48 +0200)
commita40612f399eabe23424acf5985643a35d4f2832e
tree87a0a6f4f6c9800150fed0739fca9f96c16c1f21
parent226730e1aa2844b6e5499a6fe6bea4db17a894a8
net: mac802154: Introduce a helper to disable the queue

Sometimes calling the stop queue helper is not enough because it does
not hold any lock. In order to be safe and avoid racy situations when
trying to (soon) sync the Tx queue, for instance before sending an MLME
frame, let's now introduce an helper which actually hold the necessary
locks when doing so.

Suggested-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220519150516.443078-8-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/mac802154/ieee802154_i.h
net/mac802154/util.c