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>
As it's the most reliable and straight forward way on modern platforms,
detect the hardware ID by checking the 'compatible'-string of non-PCI
(ie. built-in) devices.
As this is only relevant for WiSoCs, there won't be that many records,
so it's not worth making any larger structural changes. Hence just
match the compatible string and translate it into fake PCI IDs.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This adds the PCI-ID for the MT7915 series.
This PCI-ID was found on the Ubiquiti UniFi6 Lite Access Point.
Signed-off-by: David Bauer <mail@david-bauer.net>
Commit bf2c1069a7 ("nl80211: add htmode to iwinfo_ops") increased
IWINFO_HTMODE_COUNT but left the size of the IWINFO_HTMODE_NAMES array
untouched, leading to a segmentation fault when trying to get the HT
modelist from Lua.
Add a dummy NOHT modestring to make the array size fit the size
declaration.
Fixes: bf2c1069a7 ("nl80211: add htmode to iwinfo_ops")
Signed-off-by: David Bauer <mail@david-bauer.net>
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 fixes VAPs not being queried correctly when the netdev name starts
with "radio".
Fixes: FS#2629
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: David Bauer <mail@david-bauer.net>
The mac80211.sh implementation of the uci "path" option compares the
readlink() results of each /sys/class/ieee80211/*/device link to find
the proper phy directory while iwinfo so far tried to construct a full
path out of the uci value.
The iwinfo approach appears to fail under certain circumstances, e.g.
with Hyper-V systems utilizing PCI passthrough for the radio devices.
This commit mimicks the behaviour of mac80211.sh more closely to
achieve the same results.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
When wpa_supplicant responds with FAIL-BUSY in response to the SCAN
command, a scan process is already in process. Instead of failing in
this case, simply keep awaiting the result list.
This also significantly speeds up the scan operation in many cases.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Refactor the parsing of wpa_supplicant scan list results, the wpa_supplicant
status output and the hostapd configuration file format to properly detect
WPA3 key management protocols like SAE, OWE or EAP Suite B.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
With WPA3 the wpa_key_mgmt string can be longer than 16 bytes. The
sea-mixed setting for example is 27 bytes long:
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 SAE
Increase the buffer to better detect more complicated authentication methods.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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>
Do not require a temporary interface just to read the hardware ID numbers
from a given phy name, instead read the data from the ieee80211 sysfs
directory.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This device currently showed up as Generic Mac80211.
While at it, spell the vendor name correctly (large 'T')
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit includes all power offsets and subsystem device IDs
for Ubiquiti XM and XW devices. The device ID is wildcarded.
Consistency has been tested among all Ubiquiti platforms.
These values seem to be PA gains and likely do not include
antenna gains. I expect the antenna gains to be defined in ART-
partitions.
Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
This patch enables proper identification of ad hwmode in channel2frequency function.
Now iwinfo will properly calculate frequency for a channels 1-6 in 802.11ad.
Fixes a8e8275923
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>