Skip to content

Commit 8254393

Browse files
gal-pressmankuba-moo
authored andcommitted
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: 9c5d03d ("genetlink: start to validate reserved header bytes") Signed-off-by: Gal Pressman <[email protected]> Acked-by: Stefan Schmidt <[email protected]> Tested-by: Sudip Mukherjee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c3f760e commit 8254393

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/net/nl802154.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ enum nl802154_commands {
5858

5959
NL802154_CMD_SET_WPAN_PHY_NETNS,
6060

61-
/* add new commands above here */
62-
63-
#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
6461
NL802154_CMD_SET_SEC_PARAMS,
6562
NL802154_CMD_GET_SEC_KEY, /* can dump */
6663
NL802154_CMD_NEW_SEC_KEY,
@@ -74,7 +71,8 @@ enum nl802154_commands {
7471
NL802154_CMD_GET_SEC_LEVEL, /* can dump */
7572
NL802154_CMD_NEW_SEC_LEVEL,
7673
NL802154_CMD_DEL_SEC_LEVEL,
77-
#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
74+
75+
/* add new commands above here */
7876

7977
/* used to define NL802154_CMD_MAX below */
8078
__NL802154_CMD_AFTER_LAST,

0 commit comments

Comments
 (0)