mac802154: Introduce filtering levels
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 7 Oct 2022 08:53:03 +0000 (10:53 +0200)
committerStefan Schmidt <stefan@datenfreihafen.org>
Wed, 12 Oct 2022 10:56:28 +0000 (12:56 +0200)
commita6a6163b9a934df5965792d60af1f53aa51fdd39
tree92bc58f1c75cf6c6257dde37977603d2aefdf0b6
parentdfc3082da9c97112007b6d585e28c1aeb8618acb
mac802154: Introduce filtering levels

The 802154 specification details several filtering levels in which the
PHY and the MAC could be. The amount of filtering will vary if they are
in promiscuous mode or in scanning mode. Otherwise they are expected to
do some very basic checks, such as enforcing the frame validity. Either
the PHY is able to do so, and the MAC has nothing to do, or the PHY has
a lower filtering level than expected and the MAC should take over.

For now we just define these levels in an enumeration.

In a second time, we will add a per-PHY parameter showing the expected
filtering level as well as a per device current filtering level, and
will initialize all these fields.

In a third time, we will use them to apply more filtering by software
when the PHY is limited.

Indeed, if the drivers know they cannot reach the requested level of
filtering, they will overwrite the "current filtering" parameter so that
it reflects what they do. Then, in the core, the expected filtering
level will be used to decide whether some additional software processing
is needed or not.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20221007085310.503366-2-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
include/linux/ieee802154.h