提交 1edecbd0 编写于 作者: M Miquel Raynal 提交者: Stefan Schmidt

ieee802154: Change error code on monitor scan netlink request

Returning EPERM gives the impression that "right now" it is not
possible, but "later" it could be, while what we want to express is the
fact that this is not currently supported at all (might change in the
future). So let's return EOPNOTSUPP instead.

Fixes: ed3557c9 ("ieee802154: Add support for user scanning requests")
Suggested-by: NAlexander Aring <aahringo@redhat.com>
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230214135035.1202471-4-miquel.raynal@bootlin.comSigned-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
上级 a0b61066
...@@ -1409,7 +1409,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -1409,7 +1409,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) { if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
NL_SET_ERR_MSG(info->extack, "Monitors are not allowed to perform scans"); NL_SET_ERR_MSG(info->extack, "Monitors are not allowed to perform scans");
return -EPERM; return -EOPNOTSUPP;
} }
if (!nla_get_u8(info->attrs[NL802154_ATTR_SCAN_TYPE])) { if (!nla_get_u8(info->attrs[NL802154_ATTR_SCAN_TYPE])) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册