[rpcd PATCH 2/2] rpcd: iwinfo: export no_outdoor restriction

Ansuel Smith ansuelsmth at gmail.com
Thu Nov 18 08:40:04 PST 2021


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

Signed-off-by: Ansuel Smith <ansuelsmth at 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




More information about the openwrt-devel mailing list