Commit graph

36 commits

Author SHA1 Message Date
Andre Heider
06ad60fbba
iwinfo: add "band" to the freqlist output
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>
2023-01-21 01:18:11 +01:00
Christian Marangi
b32fd32535
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>
2023-01-21 01:18:08 +01:00
Andre Heider
7de4820c87 iwinfo: add "hwmodes_text" to the info output
This is a preformatted string like "ac/ax/b/g/n" for presentation.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-16 00:26:00 +01:00
Andre Heider
b3f530bc6b iwinfo: clean up rpc_iwinfo_call_hw_ht_mode()
There's no need to call hwmodelist() again, just pass on the earlier
result.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-16 00:24:56 +01:00
Andre Heider
c46ad61d49 iwinfo: reuse infos provided by libiwinfo
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>
2022-12-16 00:22:03 +01:00
Andre Heider
6c5e900394 iwinfo: constify string map arg for rpc_iwinfo_call_int()
Fixes the build since the string maps have been constified.
2022-12-16 00:21:56 +01:00
Christian 'Ansuel' Marangi
1c4825739b iwinfo: fix compilation error with GCC 12
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>
2022-05-31 19:44:26 +02:00
Jo-Philipp Wich
9c6ba38287 treewide: adjust ubus object type names
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>
2021-12-08 20:09:24 +01:00
David Bauer
7a560a1a57 iwinfo: add 802.11ax HE support
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>
2021-05-05 01:30:36 +02:00
Ansuel Smith
ea7f4717f8 iwinfo: include ht_operation data only if available
Check if ht_operation data are present and add them accordingly.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-01-06 19:42:14 +00:00
Daniel Golle
5c15f5736d iwinfo: return hwmode 'ad' on 802.11ad-only hardware
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 22:32:45 +00:00
Daniel Golle
e28d4a58bf iwinfo: add support for 802.11ad and GCMP
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 19:09:17 +00:00
Ansuel Smith
4c66b31097 iwinfo: export center channel for info ubus call
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>
2021-01-05 19:09:17 +00:00
Ansuel Smith
fd017ba339 iwinfo: add ht and vht operation info to wifi scan
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>
2021-01-05 19:09:17 +00:00
Daniel Danzberger
efe51f41d6 iwinfo: add current hw and ht mode to info call
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-01-05 19:56:34 +01:00
Jo-Philipp Wich
e2a7bc4c2f iwinfo: add WPA3 support
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-09 12:46:20 +02:00
Jo-Philipp Wich
f65527a298 iwinfo: expose all rate info fields in assoclist reply
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-04 15:51:39 +02:00
Daniel Danzberger
d610800a0f iwinfo: add mesh infos in assoclist.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2019-03-05 19:51:54 +01:00
Daniel Danzberger
6939c493cc iwinfo: add survey.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2019-03-05 19:51:54 +01:00
Daniel Danzberger
ceeccb1e02 iwinfo: show more stats from assoclist.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2019-03-05 19:51:54 +01:00
Jo-Philipp Wich
23417e94d2 iwinfo: expose available HT rates
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-30 00:36:01 +02:00
Denis Osvald
f8174eacef iwinfo: zero out ccode buffer since library doesn't
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>
2016-06-05 16:05:23 +02:00
Jo-Philipp Wich
a75c310e7c iwinfo: add phyname procedure
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-11 14:07:31 +01:00
Felix Fietkau
1ceab6196f iwinfo: add support for requesting assoc info for a specific mac address
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-11-29 19:43:00 +01:00
Felix Fietkau
d99e8adc4f iwinfo: add 802.11ac hw mode
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-20 15:49:24 +02:00
Felix Fietkau
ed7d16a3e0 iwinfo: use UBUS_METHOD_NOARG
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-04 19:55:58 +02:00
Luka Perkov
4cc6a9deb8 fix segmentation fault when plugins are loaded
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>
2014-01-29 13:29:57 +00:00
Luka Perkov
ec21f653b9 fix whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>
2014-01-29 13:29:32 +00:00
Jo-Philipp Wich
0c4e97b4e7 Extend copyright 2014-01-12 12:48:58 +00:00
Jo-Philipp Wich
e0afdb10ae Move includes into subdirectory 2013-09-04 12:46:11 +02:00
Jo-Philipp Wich
11f37e2889 Fold plugin specific headers files into the plugins .c file 2013-09-02 17:29:06 +02:00
Jo-Philipp Wich
07c2f0a9b1 Rename from "luci-rpcd" to "rpcd" 2013-09-02 17:23:30 +02:00
Jo-Philipp Wich
bc100538d3 iwinfo: convert to plugin library 2013-09-02 15:23:09 +02:00
Jo-Philipp Wich
060f7cbf8b iwinfo: expose phyname attribute 2013-06-11 18:44:19 +02:00
Jo-Philipp Wich
cac8db77c9 iwinfo: finish api 2013-02-03 14:00:04 +01:00
Jo-Philipp Wich
9345600006 add ubus iwinfo api (lacks scanning, assoclist, countrylist and txpowerlist yet) 2013-02-02 20:48:51 +01:00