mac802154: Allow the creation of coordinator interfaces
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 Oct 2022 09:35:02 +0000 (11:35 +0200)
committerStefan Schmidt <stefan@datenfreihafen.org>
Tue, 1 Nov 2022 10:23:38 +0000 (11:23 +0100)
commit2622e785f7579e8c92d0fcf55e9d6b3955e4f1a6
tree5bb5542424ea6bbea14cec7f2e7b46f1f38223ca
parenteb30a7a5c88f65d06c35c2268af0075c0d6d803e
mac802154: Allow the creation of coordinator interfaces

As a first strep in introducing proper PAN management and association,
we need to be able to create coordinator interfaces which might act as
coordinator or PAN coordinator.

Hence, let's add the minimum support to allow the creation of these
interfaces.

Even though the necessary logic to handle several interfaces on the same
device is added to make this future move easier, in practice only
several interfaces of type MONITOR are allowed at the same time. The
other combinations are not allowed (interface creation is possible but
only one can be opened at a time) because, with a single PHY featuring a
single set of address filters, we cannot afford handling two distinct
interfaces (with different address filters or filtering requirements):
* Having 2 NODEs, 2 COORDs or 1 NODE + 1 COORD
  -> cannot work because the address filters would be different
* Having 1 MONITOR + either 1 NODE or 1 COORD
  -> cannot work because the filtering levels are incompatible

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20221026093502.602734-4-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/mac802154/iface.c
net/mac802154/main.c
net/mac802154/rx.c