Skip to content

Commit 1edecbd

Browse files
miquelraynalStefan-Schmidt
authored andcommitted
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: ed3557c ("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>
1 parent a0b6106 commit 1edecbd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/ieee802154/nl802154.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
14091409

14101410
if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR) {
14111411
NL_SET_ERR_MSG(info->extack, "Monitors are not allowed to perform scans");
1412-
return -EPERM;
1412+
return -EOPNOTSUPP;
14131413
}
14141414

14151415
if (!nla_get_u8(info->attrs[NL802154_ATTR_SCAN_TYPE])) {

0 commit comments

Comments
 (0)