Commit 4b876cca authored by Anjan Chanda's avatar Anjan Chanda

show basic and supported rates in radio status

parent aad1a266
......@@ -525,11 +525,23 @@ static int wl_radio_status(struct ubus_context *ctx, struct ubus_object *obj,
blobmsg_add_u32(&bb, "channel", channel);
blobmsg_add_u32(&bb, "bandwidth", bw_int[bw]);
blobmsg_add_u32(&bb, "noise", noise);
blobmsg_add_u64(&bb, "maxrate", maxrate);
blobmsg_add_string(&bb, "channel_ext", radio.extch == ext_auto ? "none" :
radio.extch == ext_above ? "above" :
"below");
blobmsg_add_u32(&bb, "tx_streams", radio.tx_streams);
blobmsg_add_u32(&bb, "rx_streams", radio.rx_streams);
blobmsg_add_u32(&bb, "noise", noise);
blobmsg_add_u64(&bb, "maxrate", maxrate);
c = blobmsg_open_array(&bb, "supp_rates");
for (i = 0; i < 32 && radio.supp_rates[i] != 0; i++) {
blobmsg_add_u32(&bb, "", radio.supp_rates[i]);
}
blobmsg_close_array(&bb, c);
c = blobmsg_open_array(&bb, "basic_rates");
for (i = 0; i < 32 && radio.basic_rates[i] != 0; i++) {
blobmsg_add_u32(&bb, "", radio.basic_rates[i]);
}
blobmsg_close_array(&bb, c);
c = blobmsg_open_array(&bb, "supp_channels");
for (i = 0; i < 32 && radio.supp_channels[i] != 0; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment