Commit graph

102 commits

Author SHA1 Message Date
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
David Bauer
6e998ec591 iwinfo: add device id for MediaTek MT7612E
Signed-off-by: David Bauer <mail@david-bauer.net>
2018-12-25 08:31:26 +01:00
Daniel Danzberger
5aa8c5496c libiwinfo: nl80211: add mesh stats on assoclist.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2018-11-26 11:03:17 +01:00
Rosen Penev
77a9e98009 iwinfo: Add Mikrotik R11e-2HPnD and R11e-5HacT to hardware list
These are both miniPCIe cards that show up as Generic MAC80211. This fixes
that.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-09-10 09:10:48 +02:00
Jo-Philipp Wich
65b8333f5b Revert "build: compile with -ffunction-sections, -fdata-sections and LTO"
This reverts commit a51413988c.

It causes assertion failures in ld and requires changes to linked libraries,
so drop this for now.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-31 20:36:35 +02:00
Jo-Philipp Wich
3c30b17170 wl: only invoke nvram executable if it exists
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-31 20:09:02 +02:00
Jo-Philipp Wich
a51413988c build: compile with -ffunction-sections, -fdata-sections and LTO
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-26 09:13:21 +02:00
Jo-Philipp Wich
94b1366de3 nl80211: attempt to query Mesh ID from ubus
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-24 17:36:22 +02: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
44956b780d nl80211: add support for obtaining bssid from NL80211_CMD_GET_INTERFACE
Fixes missing "BSSID" on Mesh Point interfaces

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-23 18:00:31 +02:00
Jo-Philipp Wich
49c0a4b1a2 nl80211: handle Mesh ID IE
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-23 17:08:44 +02:00
Daniel Danzberger
305f6955d6 iwinfo: nl80211: add survey.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2018-07-16 09:03:12 +02:00
Daniel Danzberger
2c5c641aab iwinfo: nl80211: add more stats to assoclist.
+ NL80211_STA_INFO_SIGNAL_AVG
+ NL80211_STA_INFO_RX_DROP_MISC
+ NL80211_STA_INFO_CONNECTED_TIME

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2018-07-16 09:01:23 +02:00
Jo-Philipp Wich
e59f9253aa hardware: add device ids for QCA9984, 88W8887 and 88W8964 radios
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26 21:50:08 +02:00
Jo-Philipp Wich
2a82f87ac9 nl80211: back out early when receiving FAIL-BUSY reply
The wpa_supplicant control socket might reply with "FAIL-BUSY" when
attempting to start a scan while another scanning process is already
running, back out early in this case.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26 17:12:16 +02:00
Rafał Miłecki
77c32f0eb6 nl80211: fix code calculating average signal and rate
Using average of previous average and the next value is highly
imprecise. E.g. for values 20, 20, 20, 180 it would result in /average/
of 100 (instead of 60). Fix it by storing & using an info of how many
samples were used for the previous calculation.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-04-09 07:30:37 +02:00