ieee802154: Use netlink policies when relevant on scan parameters
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 14 Feb 2023 13:50:30 +0000 (14:50 +0100)
committerStefan Schmidt <stefan@datenfreihafen.org>
Sat, 18 Feb 2023 15:35:10 +0000 (16:35 +0100)
commit648324c9b690bcda0ac6f6499370effc0336ee27
tree82785cd19f719b8ff87be712485d3a26bd8cd10f
parent6130543654e0e5a79485ed8538c0bf2259fe7431
ieee802154: Use netlink policies when relevant on scan parameters

Instead of open-coding scan parameters (page, channels, duration, etc),
let's use the existing NLA_POLICY* macros. This help greatly reducing
the error handling and clarifying the overall logic.

Fixes: ed3557c947e1 ("ieee802154: Add support for user scanning requests")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230214135035.1202471-2-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/ieee802154/nl802154.c