Commit graph

217 commits

Author SHA1 Message Date
Daniel Golle
618c1e86f0 iwinfo: add hardware description for QCA MIPS WiSoCs
Add description strings and detection logic for all 6
types of WiFi NICs integrated in QCA MIPS WiSoCs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-06 17:19:19 +00: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
Daniel Golle
74d13fb987 cli: account for additional digit for frequencies above 10GHz
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>
2021-01-05 22:19:43 +00:00
Ansuel Smith
4e22953eb1 iwinfo: export center_chan info for local wifi
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>
2021-01-05 22:19:43 +00:00
Ansuel Smith
ea28dfb5f9 iwinfo: export ht and vht operation in scan results
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>
2021-01-05 22:19:42 +00:00
Daniel Golle
a17f5613c3 iwinfo: detect QCA IPQ4019 WiSoC from FDT
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>
2021-01-05 22:19:42 +00:00
David Bauer
85bdda510e hardware: add PCI ID for MediaTek MT7915
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>
2020-12-17 19:38:49 +01:00
Johann Neuhauser
2faa20e5e9 iwinfo: add device id for Mikrotik R11e-5HacD miniPCIe card
Lets add device id for Mikrotik R11e-5HacD miniPCIe card.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-03 14:54:01 +02:00
Pali Rohár
d577a9d38a iwinfo: add device id for Marvell 88W8997 SDIO wifi card
Lets add device id for Marvell 88W8997 SDIO wifi card.

Signed-off-by: Pali Rohár <pali@kernel.org>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-03 14:53:49 +02:00
Pali Rohár
f6b7d16d2f iwinfo: add device id for Atheros AR9287 PCIe wifi card
This card is identified by lspci as:

  01:00.0 Network controller [0280]: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) [168c:002e] (rev 01)
          Subsystem: Qualcomm Atheros Device [168c:30a4]

Signed-off-by: Pali Rohár <pali@kernel.org>
2020-06-03 14:52:00 +02:00
David Bauer
9f5a7c4f9b iwinfo: add missing HT modename for HT-None
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>
2020-03-22 01:13:45 +01: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
Robert Marko
9a4bae898f iwinfo: add device id for Qualcomm Atheros QCA9990
Lets add the PCI ID for QCA9990

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-03-01 14:50:40 +01:00
David Bauer
eba5a204f7 iwinfo: add device id for BCM43602
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-02-04 14:49:20 +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
Pawel Dembicki
bb21698295 iwinfo: add device id for Atheros AR9287
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2020-01-29 08:14:10 +02:00
Pawel Dembicki
7483398929 iwinfo: add device id for MediaTek MT7615E
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2020-01-29 08:14:09 +02:00
Daniel Danzberger
bf2c1069a7 nl80211: add htmode to iwinfo_ops
This callback shows the currently active HTMODE of the device.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-01-05 17:17:40 +01:00
Jo-Philipp Wich
a6f6c05348 nl80211: properly handle netdev names starting with "radio"
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>
2019-12-27 13:32:03 +01:00
Tomislav Požega
31dcef3169 iwinfo: add several QC/A device ids
Add device ids for AR9462, QCA9862, QCA9880 v1 mPCIe cards and
Ubiquiti branded QCA9880 v2 PCI wifi found in LiteBeam 5ac.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
2019-11-02 19:26:55 +01:00
Jo-Philipp Wich
07315b6fdb nl80211: handle hidden SSIDs in wpa_supplicant scan results
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-16 16:41:55 +02:00
Jo-Philipp Wich
3ac846e7dc lua: fix string description of mixed WPA3 modes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-16 16:41:55 +02:00
Jo-Philipp Wich
a29b7d4e26 nl80211: align path to phy mapping logic with mac80211.sh
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>
2019-10-15 14:50:56 +02:00
Jo-Philipp Wich
2a95086db2 nl80211: recognize SAE encrypted mesh
Also report open Ad-Hoc and Mesh network encryption as "none" and
not as "unknown".

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-30 12:41:26 +02:00
Jo-Philipp Wich
313e82709b nl80211: keep awaiting wpa_supplicant scan results on busy response
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>
2019-09-22 18:49:26 +02:00
Jo-Philipp Wich
a766751369 nl80211: fix parsing of mixed wpa encryption in wpa_supp scan results
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-22 18:12:47 +02: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
Jo-Philipp Wich
02112f9b10 cli: fix reporting of mixed WPA2/WPA3 versions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 13:12:56 +02:00
Jo-Philipp Wich
7faeaeafe1 nl80211: properly detect WEP encryption in wpa_supp scan results
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 13:12:56 +02:00
Jo-Philipp Wich
629b5ffdd9 nl80211: do not confuse open connections with WEP ones
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-20 13:12:56 +02:00
Jo-Philipp Wich
3d47ddda0c nl80211: rework hostapd and wpa_supplicant wpa suite parsing
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>
2019-09-20 13:12:53 +02:00
David Bauer
a88fb421f1 iwinfo: add device id for Qualcomm Atheros QCA9886
Signed-off-by: David Bauer <mail@david-bauer.net>
2019-09-06 02:06:58 +02:00
David Bauer
1b69d86d17 iwinfo: add device id for Qualcomm Atheros QCA9887
Signed-off-by: David Bauer <mail@david-bauer.net>
2019-09-06 01:58:37 +02:00
Hauke Mehrtens
f599a8dc01 iwinfo: Fix rate buffer size
This string could be truncated for higher rates.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-09-01 19:43:40 +02:00
Hauke Mehrtens
71ec9be506 iwinfo: Fix buffer size
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>
2019-09-01 19:38:03 +02:00
Robert Marko
f8ef450652 iwinfo: Add support for WPA3
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>
2019-09-01 12:38:57 +02:00
Jo-Philipp Wich
a9f9557034 nl80211: support reading hardware id from phy directly
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>
2019-08-28 11:31:32 +02:00
Pawel Dembicki
c586cd3c3a iwinfo: add device id for MediaTek MT7612E
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2019-06-14 02:00:09 +02:00
Pawel Dembicki
d4382dd89c iwinfo: add device id for Atheros AR9390
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2019-06-14 02:00:08 +02:00
Koen Vandeputte
1372f47eff iwinfo: Add Mikrotik R11e-5HnDr2
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>
2019-06-12 14:21:23 +02:00
Vincent Wiemann
073a838891 iwinfo: Complete device IDs for Ubiquiti airOS XM/XW devices
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>
2019-05-20 22:20:54 +02:00
Koen Vandeputte
04f5a7d3a4 iwinfo: Add Mikrotik R11e-5HnD
This device currently showed up as Generic Mac80211.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-05-20 14:08:49 +02:00
Robert Marko
c2cfe9d96c iwinfo: Fix 802.11ad channel to frequency
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>
2019-03-28 15:02:58 +01:00
Robert Marko
a8e8275923 iwinfo: Add support for 802.11ad
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>
2019-03-21 16:28:39 +01:00
Robert Marko
ce1814baec iwinfo: Add device ID for Wilocity Wil6210
This patch adds device ID for Wilocity Wil6210 802.11ad
60 GHz PCI wireless card.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2019-03-11 23:02:32 +01:00
Daniel Golle
cb108c5468 iwinfo: fix capitalization of vendor name
They were called 'Ralink' rather than 'RaLink'.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-03-01 23:16:28 +01: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
Daniel Golle
b514490688 iwinfo: add device id for MediaTek MT7603E
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-03-01 10:23:10 +01:00
Mathias Kresin
dd508af481 iwinfo: fix QCA9984 vendor id
Fix the typo in the QCA9984 vendor id.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-12-25 09:23:48 +01:00
Mathias Kresin
0eaabf1e65 iwinfo: add device id for Atheros AR9287
Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-12-25 09:23:41 +01:00