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 <mail@david-bauer.net>
This commit is contained in:
David Bauer
2021-10-18 13:25:52 +02:00
parent 8dc07533a8
commit ae32cb9632

2
ubus.c
View File

@@ -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);
}