summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-02-14 14:50:32 +0100
committerStefan Schmidt <stefan@datenfreihafen.org>2023-02-18 16:41:23 +0100
commit1edecbd0bd45c9c899e0f82b123342f28423468c (patch)
treeb4e5d1fcc32bf75b28216074bd3c981bb5b872a3 /net
parentieee802154: Convert scan error messages to extack (diff)
downloadlinux-1edecbd0bd45c9c899e0f82b123342f28423468c.tar.xz
linux-1edecbd0bd45c9c899e0f82b123342f28423468c.zip
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: ed3557c947e1 ("ieee802154: Add support for user scanning requests") Suggested-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20230214135035.1202471-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'net')
-rw-r--r--net/ieee802154/nl802154.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 12ca84e1724d..f4a5070a9faf 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -1409,7 +1409,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
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])) {