blob_buf_init(&b, 0);
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, "duration", config.roam_scan_interval / 100);
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);