A channel can declare restriction where it should be used only indoor.
Export this restriction in the channel data.

Signed-off-by: Ansuel Smith <ansuels...@gmail.com>
---
 iwinfo.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iwinfo.c b/iwinfo.c
index ba4fc1e..85860e6 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -723,6 +723,9 @@ 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);
 
+                       blobmsg_add_bool(&buf, "no_outdoor", 
f->restricted_flags &
+                                        IWINFO_FREQ_NO_OUTDOOR);
+
                        if (ch > -1)
                                blobmsg_add_u8(&buf, "active", f->channel == 
ch);
 
-- 
2.32.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to