diff mbox series

[rpcd,v2,2/2] rpcd: iwinfo: export no_outdoor restriction

Message ID 20220121000751.8905-2-ansuelsmth@gmail.com
State Accepted
Delegated to: Ansuel Smith
Headers show
Series [iwinfo,v2,1/2] iwinfo: add support for indoor only chan restriction | expand

Commit Message

Christian Marangi Jan. 21, 2022, 12:07 a.m. UTC
A channel can declare restriction where it should be used only indoors.
Export this restriction in the channel data.

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


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 &
 			if (ch > -1)
 				blobmsg_add_u8(&buf, "active", f->channel == ch);