diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2022-01-21 01:07:51 +0100 |
---|---|---|
committer | Christian 'Ansuel' Marangi <ansuelsmth@gmail.com> | 2023-01-21 01:18:08 +0100 |
commit | b32fd325354ea9509728b7592eaba05efb9c78d7 (patch) | |
tree | 9475a04f876de854f3ec2f8c7731cb573f07c8d8 | |
parent | 7de4820c87437033f6b7716018f3bfa60a3f7b12 (diff) | |
download | rpcd-b32fd325354ea9509728b7592eaba05efb9c78d7.tar.gz |
iwinfo: add flags to freqlist output
A channel can declare restriction where it should be used only indoors
or should not be used at all.
Expose these restriction in the channel data as additional info with the
restricted info.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r-- | iwinfo.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -635,6 +635,11 @@ rpc_iwinfo_freqlist(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_add_u32(&buf, "mhz", f->mhz); blobmsg_add_u8(&buf, "restricted", f->restricted); + rpc_iwinfo_add_bit_array("flags", f->flags, + IWINFO_FREQ_FLAG_NAMES, + IWINFO_FREQ_FLAG_COUNT, + true, 0); + if (ch > -1) blobmsg_add_u8(&buf, "active", f->channel == ch); |