ieee802154: Introduce a helper to validate a channel
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 3 Jan 2023 16:56:41 +0000 (17:56 +0100)
committerStefan Schmidt <stefan@datenfreihafen.org>
Tue, 3 Jan 2023 18:36:53 +0000 (19:36 +0100)
commitd2aaf2a01792ccf214f933d0b1ca2d41788c7b16
treef3b5c28acaa821dbb79595158a8c4a67131c2afc
parent44def58f5835bbfaf81902c88460fd86a551f4b7
ieee802154: Introduce a helper to validate a channel

This helper for now only checks if the page member and channel member
are valid (in the specification range) and supported (by checking the
device capabilities). Soon two new parameters will be introduced and
having this helper will let us only modify its content rather than
modifying the logic everywhere else in the subsystem.

There is not functional change.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20230103165644.432209-4-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
include/net/cfg802154.h
net/ieee802154/nl802154.c