This prevents overflows after 4GiB or 2GiB if the number is interpreted
as signed integer, for example in the blobmbsg json serialization.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
So that consumers don't have to fiddle around with mapping frequencies
to bands, which everyone seems to do a little differently.
Signed-off-by: Andre Heider <a.heider@gmail.com>
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>
Don't hardcode bit/name pairs, instead iterate over what's known to the
library and use that instead.
This automatically adds the missing ciphers CCMP256 and GCMP256 - and any
future ones.
The only difference in the output is the order of the 'hwmodes' array.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Fix compilation error with GCC 12.
In file included from /home/ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/libubus.h:23,
from iwinfo.c:21:
In function 'blobmsg_close_array',
inlined from 'rpc_iwinfo_assoclist' at iwinfo.c:643:3:
/home/ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/libubox/blobmsg.h:250:9: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
250 | blob_nest_end(buf, cookie);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
iwinfo.c: In function 'rpc_iwinfo_assoclist':
iwinfo.c:564:15: note: 'c' was declared here
564 | void *c, *d, *e;
| ^
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Drop the historically inherited "luci-rpc-" prefix and replace it with a
more appropriate "rpcd-plugin-" string.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Expose 802.11ax HE rate as well as HW / HT mode information. This is
required to add 802.11ax support to LuCI.
Signed-off-by: David Bauer <mail@david-bauer.net>
Iwinfo export the center channel sued by the wifi. Include this data in
the ubus info call to better know the channel utilizzation of the wifi.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Iwinfo exports ht and vht operation info useful to get channel info of
nearby stations. Add these new info to ubus output.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Making an ubus call iwinfo countrylist '{"device":"radio0"}' will result
in some entries having garbage uninitialized stack bytes in the "code"
fields.
With this patch we zero-initialize the buffer that libiwinfo writes to,
making it NUL-terminated so that behavior doesn't happen anymore.
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
Function rpc_plugin_register_library() is modifying the struct's contents in
list_add() call. That said, the rpc_plugin struct should not be defined as
const. This caused segmentation fault when built on up-to-date Arch Linux.
Signed-off-by: Luka Perkov <luka@openwrt.org>