[RPCD PATCH v4 3/4] iwinfo: add ht and vht operation info to wifi scan
Jo-Philipp Wich
jo at mein.io
Tue Jan 5 17:31:45 EST 2021
Hi,
comments below.
> [...]
> @@ -441,6 +441,20 @@ rpc_iwinfo_scan(struct ubus_context *ctx, struct ubus_object *obj,
> blobmsg_add_u32(&buf, "quality", e->quality);
> blobmsg_add_u32(&buf, "quality_max", e->quality_max);
>
Only add the "ht_operation" table if there actually is ht_operation. I guess
wrapping it into if (e->ht_chan_info.primary_chan) { ... } should do it.
> + t = blobmsg_open_table(&buf, "ht_operation");
> + blobmsg_add_u32(&buf, "primary_channel", e->ht_chan_info.primary_chan);
> + blobmsg_add_string(&buf, "secondary_channel_offset", ht_secondary_offset[e->ht_chan_info.secondary_chan_off]);
> + blobmsg_add_u32(&buf, "channel_width", ht_chan_width[e->ht_chan_info.chan_width]);
> + blobmsg_close_table(&buf, t);
> +
> + if (e->vht_chan_info.center_chan_1) {
> + t = blobmsg_open_table(&buf, "vht_operation");
> + blobmsg_add_u32(&buf, "channel_width", vht_chan_width[e->vht_chan_info.chan_width]);
> + blobmsg_add_u32(&buf, "center_freq_1", e->vht_chan_info.center_chan_1);
> + blobmsg_add_u32(&buf, "center_freq_2", e->vht_chan_info.center_chan_2);
> + blobmsg_close_table(&buf, t);
> + }
> +
> rpc_iwinfo_add_encryption("encryption", &e->crypto);
>
> blobmsg_close_table(&buf, d);
>
~ Jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210105/2f355f58/attachment-0001.sig>
More information about the openwrt-devel
mailing list