From: David Bauer Date: Mon, 18 Oct 2021 11:25:52 +0000 (+0200) Subject: ubus: fix channel for active probing X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ae32cb9632e6712b487b035770e12245e5b0bf8d;p=project%2Fusteer.git 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 --- 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); }