Commit graph

137 commits

Author SHA1 Message Date
David Bauer
a479b9b08a devices: remove whitespace
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-04-24 23:04:57 +02:00
David Bauer
562d015326 iwinfo: nl80211: fix hwmode parsing for multi-band NICs
In case a NIC supports multiple frequency bands, the supported
hw-modelist might not contain all valid hwmodes, as B/G/AD hwmodes are
only included based on the last parsed supported frequency.

In case a radio supports multiple bands, this might result in these
hwmodes not being flagged as supported.

Circumvent this by tracking all seen frequency bands using a bitmask
which later determined which HW modes are listed as supported.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-04-23 11:59:29 +02:00
Hauke Mehrtens
90bfbb9a3a devices: Add Cypress CYW43455
This adds the Cypress CYW43455. This device was found on the Raspberry Pi 4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-03-01 20:54:37 +01:00
David Bauer
234075bf15 devices: fix AMD RZ608 format
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-06 02:13:45 +01:00
David Bauer
0e2a318824 devices: add AMD RZ608 device-id
Signed-off-by: David Bauer <mail@david-bauer.net>
2022-01-02 02:33:25 +01:00
Jo-Philipp Wich
a0a0e02dd9 iwinfo: rename hardware.txt to devices.txt
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-11 15:56:35 +02:00
Felix Fietkau
c9b1672f5a nl80211: fix path compatibility issue
The previous shell script implementation accepted shorter path values
that omitted initial parts before the pcie bus node by only checking if
the configured path is included in the determined path
Add support for doing the same thing here

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-28 15:39:22 +02:00
Felix Fietkau
c0414642fe iwinfo: nl80211: fix typo
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-09 22:12:08 +02:00
Felix Fietkau
268bb26d2e iwinfo: nl80211: support looking up phy by path=.. and macaddr=...
Can be used from within mac80211.sh without the need to reference the uci
config directly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-09 14:21:55 +02:00
Felix Fietkau
dd6d6d2dec iwinfo: nl80211: use new path lookup function for nl80211_phy_idx_from_uci_path
Fixes issues with multiple phy instances of one device

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-09 14:05:05 +02:00
Felix Fietkau
aa0e3c4bbe iwinfo: nl80211: add support for printing the device path for a phy
Will be used to replace the shell code from mac80211.sh

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-09 13:57:26 +02:00
David Bauer
c45f0b584b iwinfo: add 802.11ax HE rate information
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>
2021-05-02 00:20:54 +02:00
David Bauer
cd23727f72 iwinfo: cli: fix hwmode formatting
The placeholder for the 802.11ax hwmode was missing.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-20 18:04:31 +02:00
David Bauer
70d2136069 iwinfo: nl80211: perform split wiphy dump
Perform a split wiphy dump when acquiring the hw modelist of a mac80211
device. Otherwise HE capabilities are missing from the message.

This is necessary since upstream commit f8d504caa ("nl80211: reduce
non-split wiphy dump size")  (Kernel 5.9).

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-04-20 18:04:06 +02:00
David Bauer
50b64a63e3 iwinfo: add basic IEEE 802.11ax support
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>
2021-04-12 23:45:42 +02:00
Stijn Segers
4a32b33e96 iwinfo: add PCI ID for MediaTek MT7613BE
This adds the PCI ID for the MT7613BE series, found in e.g.
the TP-Link EAP235-Wall v1.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
2021-01-31 14:05:58 +00:00
Daniel Golle
5a2dd180f7 iwinfo: add hardware description for MediaTek MT7622
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-28 22:37:45 +00:00
Jo-Philipp Wich
23d2722b12 build: add ability to specify shared object version
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-01-06 23:47:37 +00:00
Ansuel Smith
51c1336e7a iwinfo: set center chan unsupported for not-nl80211 driver
Declare get_center_chan1 and get_center_chan2 not supported for not
nl80211 driver.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-01-06 17:38:07 +00:00
Ansuel Smith
0702f32294 iwinfo: improve center channel handling
- Improve iwinfo center channel struct position
- Prevent read beyond buffer on malformed data

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-01-06 17:38:07 +00:00
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