Re: [PATCH net-next] net: ieee802154: Fix compilation error when CONFIG_IEEE802154_NL802154_EXPERIMENTAL is disabled
From: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>
Date: 2022-08-30 11:52:21
From: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>
Date: 2022-08-30 11:52:21
On Tue, Aug 30, 2022 at 01:12:37PM +0300, Gal Pressman wrote:
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
Use __NL802154_CMD_AFTER_LAST instead of
'NL802154_CMD_DEL_SEC_LEVEL + 1' to indicate the last command.
Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Gal Pressman <redacted>Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> -- Regards Sudip