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>
The "chan_width" var contains an index, not a value.
While at it, make the 40 and 2040 description shorter and clearer.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Match by frequency and not by channel as the radio might have the same
channel on multiple bands:
$ iwinfo radio0 freqlist
[snip]
* 2.432 GHz (Channel 5)
[snip]
* 5.975 GHz (Channel 5)
[snip]
Signed-off-by: Andre Heider <a.heider@gmail.com>
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>
Increase buffer sizes to get rid of e.g.:
iwinfo_nl80211.c:797:41: note: 'snprintf' output between 24 and 279 bytes into a destination of size 64
Signed-off-by: Andre Heider <a.heider@gmail.com>
This adds 802.11ax HE specific rate information to iwinfo.
Add fields for HE status of a STA as well as DCM and guard interval
fields specific to HE operation.
Signed-off-by: David Bauer <mail@david-bauer.net>
This adds basic support for IEEE 802.11ax when requesting HW or HT
Modelist for a PHY from iwinfo. This way, applications using iwinfo can
detect HE phys.
Signed-off-by: David Bauer <mail@david-bauer.net>
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>
When using 802.11ad, the frequency string will no longer fit in the
preallocated buffer of 10 bytes. In the best case this leads to the
'z' character being truncated in the CLI output:
Mode: Client Channel: 1 (58.320 GH)
Fix that by allocating a large enough buffer.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Iwinfo already export the htmode but there is no way to know where the
channel expan in case a 40Mhz+ channel width is used. Export the center
channels used by the driver to better know the channel utilizzation of
the wifi.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Export ht and vht operation data in scan results. These additional data
can be usefull to check wifi channel utilizzation by neraby stations.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
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>
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>
This patch adds support for WPA3, meaning SAE and OWE are now properly identified.
This fixes iwinfo and LuCi showing WPA2 NONE for WPA3 SAE and OWE.
Signed-off-by: Robert Marko <robimarko@gmail.com>
This patch adds support for identifying, calculating channels from
frequency and vice versa as well as Lua hwmode for 802.11ad.
Support has been added for channels 1-6.
Signed-off-by: Robert Marko <robimarko@gmail.com>
[Increase buffer size for hwmodes]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
cfg80211 allows drivers to announce the to-be-expected layer-2 datarate
using the NL80211_STA_INFO_EXPECTED_THROUGHPUT field.
This information is useful as a metric for user-space routing daemons,
so grab it via nl80211 and make it available in both C and Lua APIs,
and show expected throughput on CLI interface assoclist.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>