Commit graph

21 commits

Author SHA1 Message Date
Andre Heider
c0fda7cf24
utils: skip comment lines when parsing devices.txt
Just a small optimization, skip the line early if it starts with a #.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-01-20 16:08:00 +01:00
Jo-Philipp Wich
fac0787ab0
devices: add support for declaring compatible matched devices
Some device have embedded wifi card that are not connected with usb or
internall with pci. Such device have fake device_id and only the
vendor_id actually reflect something real but internally they don't have
any id and are just matched by the node compatible binding in DT.

We currently match this with a big if-else to match the single devices
but this can be improved and be matched directly in devices.txt

Rework this so that we can drop the big if-else and move the matching
to devices.txt

When a device is matched using compatible in iwinfo the hardware will be
flagged as embedded and won't print empty ids.

Update devices.txt by migrating all the compatible matching device from
fake id to compatible matching.

Tested-by: Christian Marangi <ansuelsmth@gmail.com> # ipq4019
Co-developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com> # ipq8074
Reviewed-by: Andre Heider <a.heider@gmail.com>
2023-01-10 00:26:50 +01:00
Andre Heider
9e14e643c5 utils: add iwinfo_band2ghz() and iwinfo_ghz2band() helpers
To classify bands, to be used as ubus values.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-16 00:09:07 +01:00
Andre Heider
e084781afc utils: add helper functions to get names by values
Some defines/enums use bits, while some functions only set a single one.
Make it less painful to get to a name for those.

This avoids hardcoding bit lists for consumers.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-16 00:09:07 +01:00
Andre Heider
d09a77a369 utils: add iwinfo_htmode_is_{ht|vht|he} helpers
Small and useful functions which allow to clear up some consumers.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-16 00:09:07 +01:00
Andre Heider
87529770f6 utils: add and use iwinfo_format_hwmodes()
Unify how hwmodes are displayed, e.g.:
"802.11ac/ax/b/g/n" instead of "802.11bgnacax".

Luci currently uses a natural sort order, but that probably doesn't work
as intended once "be" is added, so let's do this here.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-16 00:09:07 +01:00
Joerg Werner
00aab871c5 Correctly identify key management algorithms starting with "FT-"
Correctly categorize FT-EAP-SHA384 as WPA3

Signed-off-by: Joerg Werner <schreibubi@gmail.com>
2022-11-01 17:11:32 +01:00
Joerg Werner
0dad3e6660 Add support for CCMP-256 and GCMP-256 ciphers
Signed-off-by: Joerg Werner <schreibubi@gmail.com>
2022-08-20 17:59:11 +02:00
Daniel Golle
8bfd8d8800 iwinfo: add support for GCMP cipher
Extend support for WPA ciphers by GCMP which is required for 802.11ad.
Breaks ABI as ciphers now needs to be a field of 16 bits instead of 8.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-05 22:19:43 +00:00
David Bauer
06a03c9e3b Revert "iwinfo: add BSS load element to scan result"
This reverts commit a6914dc0dc.

iwinfo currently misses ABI version tracking in OpenWrt, potentially
breaking other packages unintentionally.

Revert this commit for now  until this is implemented.
Otherwise, we are not able to safely bump iwinfo at the moment.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-03-22 01:06:36 +01:00
David Bauer
a6914dc0dc iwinfo: add BSS load element to scan result
This adds support for the BSS load information element. With this patch,
the BSS load information is visible when using the CLI as well as when
accessing scan results using the LUA binding.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-02-04 14:44:14 +01:00
Jo-Philipp Wich
f096bfd317 utils: support parsing SAE and OWE key management suites from IEs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-22 17:35:33 +02:00
Daniel Golle
e9e14008fa iwinfo: more Ralink and MediaTek WiSoC and PCIe chips
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-03-01 12:10:58 +01:00
Jo-Philipp Wich
d991fe5481 utils: add simple ubus query support
Some wireless runtime parameters are not available via nl80211, e.g.
the effective Mesh ID so we need to fetch those from ubus state info.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-24 17:36:17 +02:00
Jo-Philipp Wich
89296a5f17 utils: fix possibly unterminated ifname string
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-29 10:53:48 +01:00
Jo-Philipp Wich
ade8b1b299 utils: fix segfault in iwinfo_hardware_id_from_mtd()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-01 06:23:14 +02:00
Jo-Philipp Wich
e8a1e7d224 Fix -Wall -Wpedantic warnings
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-05-19 18:54:58 +02:00
Jo-Philipp Wich
d5dc3d0605 utils: only enable extended lookup if section looks like it
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-10-27 17:33:02 +01:00
Jo-Philipp Wich
c92728fbac utils: support extended format for uci section lookup
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-10-27 17:27:52 +01:00
nbd
fe7133f7e5 iwinfo: fix handling of accessing nl80211 interfaces via radio*
look up device path via uci instead of assuming a direct phy index

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn+ssh://svn.openwrt.org/openwrt/trunk@42759 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-10-27 13:48:19 +01:00
Jo-Philipp Wich
8ae758db52 Initial commit
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-10-05 19:56:27 +02:00