summaryrefslogtreecommitdiff
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-05-19 17:05:09 +0200
committerStefan Schmidt <stefan@datenfreihafen.org>2022-06-10 09:48:40 +0200
commitbde000ae459f2829ed88e967f7fa7665b4e3afaf (patch)
treea226648bb9b839989a52bdfe56f6f9c158ca159a /include/net/cfg802154.h
parentd08d951a9ae7e30fc0421a1af2b4193ce4aa6b3e (diff)
net: mac802154: Follow the count of ongoing transmissions
In order to create a synchronous API for MLME command purposes, we need to be able to track the end of the ongoing transmissions. Let's introduce an atomic variable which is incremented when a transmission starts and decremented when relevant so that we know at any moment whether there is an ongoing transmission. The counter gets decremented in the following situations: - The operation is asynchronous and there was a failure during the offloading process. - The operation is synchronous and the synchronous operation failed. - The operation finished, either successfully or not. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/r/20220519150516.443078-5-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index d8d8719315fd..678ff00c7d70 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -214,6 +214,9 @@ struct wpan_phy {
/* the network namespace this phy lives in currently */
possible_net_t _net;
+ /* Transmission monitoring */
+ atomic_t ongoing_txs;
+
char priv[] __aligned(NETDEV_ALIGN);
};