From ae32cb9632e6712b487b035770e12245e5b0bf8d Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 18 Oct 2021 13:25:52 +0200 Subject: [PATCH] ubus: fix channel for active probing The IEEE802.11-2016 specification says: [...] a Channel Number field value of 255 indicates a request to make iterative measurements for all supported channels in the current operating class listed in the latest AP Channel Report received from the serving AP. The problem with this is, no AP Channel report is sent to the STA with the measurement request. To scan the whole Operating class, a channel number of 0 is desired: [...] Channel Number field value of 0 indicates a request to make iterative measurements for all supported channels in the operating class [...] Signed-off-by: David Bauer --- ubus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubus.c b/ubus.c index eca7284..1f57194 100644 --- a/ubus.c +++ b/ubus.c @@ -526,7 +526,7 @@ int usteer_ubus_trigger_client_scan(struct sta_info *si) blobmsg_printf(&b, "addr", MAC_ADDR_FMT, MAC_ADDR_DATA(si->sta->addr)); blobmsg_add_u32(&b, "mode", BEACON_MEASUREMENT_ACTIVE); blobmsg_add_u32(&b, "duration", 65535); - blobmsg_add_u32(&b, "channel", 255); + blobmsg_add_u32(&b, "channel", 0); blobmsg_add_u32(&b, "op_class", si->scan_band ? 1 : 12); return ubus_invoke(ubus_ctx, ln->obj_id, "rrm_beacon_req", b.head, NULL, 0, 100); } -- 2.30.2