ieee802154: Add support for user active scan requests
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 10 Mar 2023 14:53:43 +0000 (15:53 +0100)
committerStefan Schmidt <stefan@datenfreihafen.org>
Thu, 23 Mar 2023 20:50:49 +0000 (21:50 +0100)
In case a passive scan could not discover any PAN, a device may decide
to perform an active scan to force coordinators to send a BEACON
"immediately". Allow users to request to perform an active scan.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20230310145346.1397068-2-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/ieee802154/nl802154.c

index d8f4379..42e531a 100644 (file)
@@ -1426,6 +1426,7 @@ static int nl802154_trigger_scan(struct sk_buff *skb, struct genl_info *info)
 
        type = nla_get_u8(info->attrs[NL802154_ATTR_SCAN_TYPE]);
        switch (type) {
+       case NL802154_SCAN_ACTIVE:
        case NL802154_SCAN_PASSIVE:
                request->type = type;
                break;