net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL...
authorGal Pressman <gal@nvidia.com>
Fri, 2 Sep 2022 03:06:20 +0000 (20:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Sep 2022 02:59:08 +0000 (19:59 -0700)
commit8254393663f9b8cb8b84cdce1abb118833c22a54
treea825ece7983b8f9a436cdb0d4d6dea5a6da4e8d8
parentc3f760ef128789252e7c4f10d3c1721422dceba9
net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled

When CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled,
NL802154_CMD_DEL_SEC_LEVEL is undefined and results in a compilation
error:
net/ieee802154/nl802154.c:2503:19: error: 'NL802154_CMD_DEL_SEC_LEVEL' undeclared here (not in a function); did you mean 'NL802154_CMD_SET_CCA_ED_LEVEL'?
 2503 |  .resv_start_op = NL802154_CMD_DEL_SEC_LEVEL + 1,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                   NL802154_CMD_SET_CCA_ED_LEVEL

Unhide the experimental commands, having them defined in an enum
makes no difference.

Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20220902030620.2737091-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/nl802154.h