[PATCH wpan-tools] iwpan: Allow the phy shortcut for scanning commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow running:
iwpan phy <phy> scan trigger ...
iwpan phy <phy> scan abort ...

Aside with the existing:
iwpan dev <dev> scan trigger ...
iwpan dev <dev> scan abort ...

This change does not apply easily to the TOPLEVEL(scan) command, so we
keep this one more constrained for simplicity.

Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
 src/scan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/scan.c b/src/scan.c
index e92702d..8bc21ca 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -541,11 +541,15 @@ TOPLEVEL(scan, "type <type> [page <page>] [channels <bitfield>] [duration <durat
 	SCAN_TYPES);
 COMMAND(scan, abort, NULL, NL802154_CMD_ABORT_SCAN, 0, CIB_NETDEV, scan_abort_handler,
 	"Abort ongoing scanning on this virtual interface");
+COMMAND(scan, abort, NULL, NL802154_CMD_ABORT_SCAN, 0, CIB_PHY, scan_abort_handler, NULL);
 COMMAND(scan, trigger,
 	"type <type> [page <page>] [channels <bitfield>] [duration <duration-order>]",
 	NL802154_CMD_TRIGGER_SCAN, 0, CIB_NETDEV, scan_trigger_handler,
 	"Launch scanning on this virtual interface with the given configuration.\n"
 	SCAN_TYPES);
+COMMAND(scan, trigger,
+	"type <type> [page <page>] [channels <bitfield>] [duration <duration-order>]",
+	NL802154_CMD_TRIGGER_SCAN, 0, CIB_PHY, scan_trigger_handler, NULL);
 
 SECTION(beacons);
 
-- 
2.34.1




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux