1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-18 05:03:56 +02:00
Commit Graph

1205 Commits

Author SHA1 Message Date
Felix Fietkau
49ef4dbee5 mac80211: fix processing HE capabilities (FS#3871)
Use the right argument to fix setting unsupported capabilities to 0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-17 12:40:43 +02:00
Felix Fietkau
f2c6d892ca mac80211: add support for 802.3 encap offload with software rate control
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-12 10:46:39 +02:00
Felix Fietkau
7dd8829ef9 mac80211: improve rate control performance
Call rate control handler after intermediate queueuing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-12 10:46:39 +02:00
Felix Fietkau
e1d57d4d43 mac80211: rely on iwinfo for phy->path and path->phy lookups
This avoids inconsistencies from having multiple implementations do the same thing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-10 10:15:39 +02:00
Hauke Mehrtens
04a260911c mac80211: Update to backports-5.10.42
The removed patches were integrated upstream.

The brcmf_driver_work workqueue was removed in brcmfmac with kernel
5.10.42, the asynchronous call was covered to a synchronous call. There
is no need to wait any more.
This part was removed manually from this patch:
brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-06-06 17:49:40 +02:00
Ansuel Smith
3394af677c mac80211: split ath patch in dedicated subdir
The ath patch number is already large and adding other patch for ath11k
will add more confusion with the patch numbering.
Since the support of ath11k based device is imminent, prepare the mac80211
ath patch dir and split it in the dedicated ath5k, ath9k, ath10k and ath11k
(empty for now).

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-06-04 22:44:40 +02:00
Felix Fietkau
2cd1a10829 mac80211: fix typo
Remove stray parenthesis

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-03 05:38:59 +02:00
Felix Fietkau
42a99b18ff mac80211: do not enable VHT in the default config on 2.4 GHz
Some drivers advertise it, but it's not supported at the moment

Reported-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-02 07:46:21 +02:00
Felix Fietkau
3518b793a2 mac80211: fix detecting VHT capabilities when generating the default config
The colon does not directly follow the "VHT Capabilities" string

Reported-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-02 07:46:21 +02:00
Felix Fietkau
91abeebd3b mac80211: sync nl80211.h with upstream and backport a WPA3 related commit
Fixes compatibility issues with the latest hostapd update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 20:08:25 +02:00
Felix Fietkau
fbd6f099f5 mac80211: add more HE capabilities
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 11:48:15 +02:00
Felix Fietkau
8d79915327 mac80211: fix center freq selection for 6 GHz
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 11:48:14 +02:00
Felix Fietkau
c8bcdd5619 mac80211: set hostapd op_class for 6 GHz
This is needed to disambiguate it from 5 GHz channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 11:48:14 +02:00
Felix Fietkau
8504212f65 mac80211: rework default config script
Emit the new band option instead of hwmode
Support 6 GHz band and HE options

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 11:48:14 +02:00
Felix Fietkau
8b8c1cb09b mac80211: make use of the new 'band' option
Use it to look up frequencies only in the configured band to better deal
with channel number overlap

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 11:48:14 +02:00
Felix Fietkau
db072fdc9e mac80211: add 6 GHz support to mac80211_hwsim
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-26 11:48:14 +02:00
Robert Marko
b054009854 mac80211: fix ATH_REG_DYNAMIC_USER_REG_HINTS
ATH_REG_DYNAMIC_USER_REG_HINTS is currently not being set as mac80211
tries to set it as m which is not possible as its boolean only.

Since its used alongside user regulatory, move it to USER_REGD.

This is required for ath11k to accept regulatory changes, otherwise
it wont accept any changes and will simply force US.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-23 15:11:38 +02:00
Felix Fietkau
025bd93f36 mac80211: backport upstream fixes for FragAttacks
From the patch series description:

Several security issues in the 802.11 implementations were found by
Mathy Vanhoef (New York University Abu Dhabi), who has published all
the details at

	https://papers.mathyvanhoef.com/usenix2021.pdf

Specifically, the following CVEs were assigned:

 * CVE-2020-24586 - Fragmentation cache not cleared on reconnection
 * CVE-2020-24587 - Reassembling fragments encrypted under different
                    keys
 * CVE-2020-24588 - Accepting non-SPP A-MSDU frames, which leads to
                    payload being parsed as an L2 frame under an
                    A-MSDU bit toggling attack
 * CVE-2020-26139 - Forwarding EAPOL from unauthenticated sender
 * CVE-2020-26140 - Accepting plaintext data frames in protected
                    networks
 * CVE-2020-26141 - Not verifying TKIP MIC of fragmented frames
 * CVE-2020-26142 - Processing fragmented frames as full frames
 * CVE-2020-26143 - Accepting fragmented plaintext frames in
                    protected networks
 * CVE-2020-26144 - Always accepting unencrypted A-MSDU frames that
                    start with RFC1042 header with EAPOL ethertype
 * CVE-2020-26145 - Accepting plaintext broadcast fragments as full
                    frames
 * CVE-2020-26146 - Reassembling encrypted fragments with non-consecutive
                    packet numbers
 * CVE-2020-26147 - Reassembling mixed encrypted/plaintext fragments

In general, the scope of these attacks is that they may allow an
attacker to
 * inject L2 frames that they can more or less control (depending on the
   vulnerability and attack method) into an otherwise protected network;
 * exfiltrate (some) network data under certain conditions, this is
   specific to the fragmentation issues.

A subset of these issues is known to apply to the Linux IEEE 802.11
implementation (mac80211). Where it is affected, the attached patches
fix the issues, even if not all of them reference the exact CVE IDs.

In addition, driver and/or firmware updates may be necessary, as well
as potentially more fixes to mac80211, depending on how drivers are
using it.

Specifically, for Intel devices, firmware needs to be updated to the
most recently released versions (which was done without any reference
to the security issues) to address some of the vulnerabilities.

To have a single set of patches, I'm also including patches for the
ath10k and ath11k drivers here.

We currently don't have information about how other drivers are, if
at all, affected.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-12 17:51:59 +02:00
Hauke Mehrtens
17ac9849d3 mac80211: Update to version 5.10.34-1
The removed patches were applied upstream and are not needed anymore.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-05-04 22:25:43 +02:00
Rui Salvaterra
eeda8652f1 mac80211/rtl: backport a rtl8192cu AP mode fix
Running USB devices in AP mode is never a good idea. That said, fix the TIM
issue in rtl8192cu [1], allowing these devices to "work" in AP mode.

[1] https://patchwork.kernel.org/project/linux-wireless/patch/20210419065956.6085-1-pkshih@realtek.com/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-05-01 00:37:15 +02:00
Felix Fietkau
12cb52bd06 mac80211: minstrel_ht: fix issue in calculating success probability
Missing braces in a macro were leading to badly working rates sometimes
getting a success probabilty of 1.0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-28 21:08:29 +02:00
Felix Fietkau
dfdb28c24a mac80211: add client mode connection monitor fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-11 19:44:07 +02:00
Felix Fietkau
7d8e14e44f mac80211: support rx timestamps for HE rates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-04-11 19:44:07 +02:00
Felix Fietkau
571aedbc6c mac80211: merge a few pending tx related fixes
Improve performance and fix potential mgmt tx hangs/warnings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-03-28 12:16:24 +02:00
Rui Salvaterra
b1d0f66388 mac80211: rtl: update RTL8821AE PHY/RF parameters
Create a new directory for Realtek patches and backport the updated PHY and RF
parameters patch. Improves the connectivity in the 5 GHz band [1].

[1] https://patchwork.kernel.org/project/linux-wireless/patch/20210219052607.7323-1-pkshih@realtek.com/#23988567

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-03-19 01:25:26 +01:00
Felix Fietkau
5dc5015072 mac80211: backport upstream patches for driver disconnect
Needed for an mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-03-15 14:05:43 +01:00
Daniel Golle
ebcb4f1d0a
treewide: fix spelling 'seperate' -> 'separate'
This popular spelling mistake was also introduced by myself lately.
Fix it everywhere.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-28 23:59:21 +00:00
Hauke Mehrtens
1132340a22 mac80211: Update to version 5.10.16-1
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-15 22:29:42 +01:00
Hauke Mehrtens
0cde9a0a65 mac80211: Refresh patches again
A wrong quilt configuration was used last time.

Fixes: ed1e234d87 ("mac80211: refresh patches")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-15 22:29:42 +01:00
Felix Fietkau
f118be0712 ath9k: fix transmitting to stations in dynamic SMPS mode
When transmitting to a receiver in dynamic SMPS mode, all transmissions that
use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to
give the receiver's extra chains some time to wake up.
This fixes the tx rate getting stuck at <= MCS7 for some clients, especially
Intel ones, which make aggressive use of SMPS.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:55:45 +01:00
Felix Fietkau
9cb63f5360 mac80211: fix a regression in processing rx stats
A logic error caused rx rate update to be missed for any driver not using
fast-rx

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau
ed1e234d87 mac80211: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau
072bfe2113 mac80211: add minstrel performance improvements
Reduce fluctuations in rate selection / statistics

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau
b6066846ad mac80211: add decapsulation offload support
On hardware that supports this, this will improve performance by passing
802.3 frames from the hardware to the stack

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau
8fc2cfea87 mac80211: fix a corner case in encapsulation offload support
Fix encryption key selection with WEP

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Felix Fietkau
268210cec8 mac80211: add fq performace improvements
Improves performance under load

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:07 +01:00
Hauke Mehrtens
12424edff5 mac80211: Update to version 5.10-rc6-1
The removed patches were applied upstream.

This adapts ath10k-ct and mt76 to changed APIs.
nl80211.h in iw is updated to match the version from backports.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-14 15:15:29 +01:00
Hauke Mehrtens
bf6f7cf29b mac80211: Update to version 5.9.12-1
The removed patches were applied upstream.

Remove the 300-mac80211-optimize-skb-resizing.patch.
This patch was not applied upstream, but it conflicts with upstream
changes and needs bigger changes. It was applied with Felix to remove
this patch for now. It should be reworked and then send upstream later.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-02-14 15:13:40 +01:00
Paul Spooren
8286f3a3d3 treewide: unify OpenWrt hosted source via @OPENWRT
Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history.

Replace all by @OPENWRT which is an "empty" mirror, therefore using the
fallback servers sources.cdn.openwrt.org and sources.openwrt.org.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-05 12:00:24 -10:00
Felix Fietkau
84fa59b5a8 mac80211: fix station rate table updates on assoc
If the driver uses .sta_add, station entries are only uploaded after the sta
is in assoc state. Fix early station rate table updates by deferring them
until the sta has been uploaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-01 10:00:23 +01:00
David Bauer
8019c54d8a mac80211: fix incorrect parameter
he_mu_beamformer only accepts values of 0 and 1 according to the hostapd
documentation.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-01 00:48:37 +01:00
David Bauer
0c499f6068 mac80211: convert UniFi Outdoor+ HSR support to OF
Enable support for the Ubiquiti UniFi Outdoor+ RF filter via
device-tree. The old way of using platform data is not required anymore,
as it was only used on the now removed ar71xx target.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-01 00:47:36 +01:00
Felix Fietkau
7ca75a2d01 mac80211: fix an uninitialized variable warning
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 20:00:03 +01:00
Felix Fietkau
56c20f0a5a mac80211: minstrel_ht: fix regression in the max_prob_rate fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 16:46:45 +01:00
Felix Fietkau
1fdbb8779a mac80211: remove accidentally duplicated line in minstrel_ht patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-26 16:46:45 +01:00
Felix Fietkau
37752336bd mac80211: add significant minstrel_ht performance improvements
Completely redesign the rate sampling approach

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-25 12:19:22 +01:00
Felix Fietkau
b0ad07e9a0 mac80211: fix rounding error in minstrel_ht throughput calculation
Fixes rate selection with lower data rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-15 13:05:40 +01:00
Felix Fietkau
faeaf5a010 mac80211: fix an uninitialized stack variable in the minstrel update
It can lead to out-of-bounds access and invalid rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-14 20:12:29 +01:00
Daniel Golle
d9d6988434 mac80211: improve error handling when adding hostapd config
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-14 00:52:50 +00:00
Daniel Golle
cbd67dbdcd mac80211: use hostapd PID returned from config_add
Use PID returned from config_add instead of querying procd when adding
configuration to hostapd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-01-10 19:18:29 +00:00
Robert Marko
6442b8cbc2 mac80211: Add wil6210 driver
This patch adds wil6210 driver for Wilocity/QCA based 802.11ad
PCI cards.

Driver uses cfg80211 and nl80211 but not mac80211.
Integration for UCI and LuCI will come in other patches.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-01-05 02:16:24 +00:00
Gary Cooper
d140d18990 mac80211: add 802.11ad-support
This adds logic to properly populate defaults in /etc/config/wireless.

Signed-off-by: Gary Cooper <gaco@bitmessage.de>
2021-01-05 02:16:24 +00:00
Felix Fietkau
3a12c6679e mac80211: replace legacy minstrel with minstrel_ht, improve rate selection
Legacy minstrel is essentially unmaintained and was showing poor performance
Replace it with minstrel_ht and improve rate selection and sampling behavior

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-01-03 12:56:40 +01:00
Felix Fietkau
e1851720f1 hostapd: do not restart hostapd instance on wireless restarts
Add the flag that prevents netifd from killing hostapd/wpa_supplicant

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-31 14:26:00 +01:00
Dobroslaw Kijowski
1a9b896d8b treewide: nuke DRIVER_11W_SUPPORT
As of hostapd upstream commit 7d2ed8ba "Remove CONFIG_IEEE80211W build parameter"
https://w1.fi/cgit/hostap/commit?id=7d2ed8bae86a31dd2df45c24b3f7281d55315482
802.11w feature is always enabled in the build time.

It doesn't make sense to opt-in 802.11w per driver as hostapd will always
be compiled with this feature enabled.

As suggested by Hauke Mehrtens, for now keep 11w enabled in build_features.h
for compatibility reasons. This option will be dropped when LuCI is adjusted.

Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
2020-12-23 16:36:08 +01:00
Paul Fertser
39c8bc4422 mac80211: fix MAC address allocations when local bit set on base addr
Testing with hwsim reveals two problems:

1. phyX/addresses has two addresses and mac80211_get_addr keeps
returning the last one when asked for more;

2. The base address has the local bit set and the operation unsets it.

Fix both.

Fixes: 866790fd82
Reported-by: Zero_Chaos
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2020-12-22 18:59:10 +01:00
Felix Fietkau
3ab695368a mac80211: do not drop tx nulldata packets on encrypted links
Fixes sending out nulldata probing frames

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-12-18 23:05:50 +01:00
Hauke Mehrtens
6cdc21b20e mac80211: Update to version 5.8.18-1
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-12-16 22:11:19 +01:00
Felix Fietkau
0bb5d39b7a mac80211: add minstrel fixes that fix mt76 issues in legacy mode
Remove deferred sampling code which does not work well with rate tables +
probing.
Fix tx status handling if the first invalid rate idx is not set to -1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-11-12 11:24:42 +01:00
Felix Fietkau
bf3158b620 mac80211: backport the new tasklet API
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-11-12 11:24:42 +01:00
Rafał Dzięgiel
ed2491ba67 mac80211: ath9k: enable OEM cards support on x86
A lot of devices running OpenWrt x86 arch (32 or 64 bit) are either
"home-made routers" or devices that use PC class OEM components.

This commit enables OEM cards support on those devices by default.

Signed-off-by: Rafał Dzięgiel <rafostar.github@gmail.com>
[reformat commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-11-04 23:58:50 +01:00
Sven Eckelmann
7ca9b82c38 mac80211: Fix wpa_supplicant config removal ubus call
If mac80211_setup_supplicant() is called with enabled=0 then it should just
destroy the interface and remove the configuration from wpa_supplicant. But
the ubus method call always returned

  Command failed: Method not found

because the actual name of the method is "config_remove".

Fixes: b5516603dd ("mac80211: more wifi reconf related fixes")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[bump PKG_RELEASE]
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-10-28 00:11:12 +01:00
David Bauer
daeda8a87e mac80211: pass phy name to hostapd_set_bss_options
hostapd_set_bss_options expects the PHY as second and the VIF as third
argument. However, only the VIF was passed as second argument without a
third argument at all.

This was never a problem, as both PHY and VIF were never accessed.
However, with FTM support the PHY is needed to determine the HW support
when configuring the BSS.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-10-28 00:08:49 +01:00
Markov Mikhail
610843f3bc mac80211: rt2x00: save survey for every channel visited
rt2800 olny gives you survey for current channel.

Survey-based ACS algorithms are failing to perform their job when working
with rt2800.

Make rt2800 save survey for every channel visited and be able to give away
that information.

There is a bug registred https://dev.archive.openwrt.org/ticket/19081 and
this patch solves the issue.

Signed-off-by: Markov Mikhail <markov.mikhail@itmh.ru>
2020-10-21 11:56:26 +01:00
Felix Fietkau
08a42ef057 mac80211: fix memory leak on filtered powersave frames
After the status rework, ieee80211_tx_status_ext is leaking un-acknowledged
packets for stations in powersave mode.
To fix this, move the code handling those packets from __ieee80211_tx_status
into ieee80211_tx_status_ext

Reported-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-10-17 16:43:17 +02:00
Daniel Golle
e0d482fdcf rt2x00: mt7620: differentiate based on SoC's CHIP_VER
The vendor driver does things differently based on what it finds in the
SoC's CHIP_VER register, which should tell whether this is MT7620N or
MT7620A (PKG) and probably also the revision (VER) and most likely
also something about the silicon implementer (ECO).
Introduce codepaths just like the ones in the vendor driver to handle
the different chips properly.

Some of those paths are most likely dead code and left-overs from FPGA
versions or early prototypes of the chip. It'd thus be great if people
can post their kernel logs, at least the line telling the chip version
and eco, so we know what's actually out there in the wild -- all I
could find is
[ 0.000000] SoC Type: Ralink MT7620A ver:2 eco:6
and
[ 0.000000] SoC Type: Ralink MT7620N ver:2 eco:6
which would make things easier, as then we really just need to know
whether it's MT7620N or MT7620A and not care about FPGA or prototypes
with ver <= 1 and eco <= 2.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-10-09 01:50:30 +01:00
Felix Fietkau
cba4120768 mac80211: add support for specifying a per-device scan list
This is useful to bring up multiple client mode interfaces on a single
channel much faster without having to scan through a lot of channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-29 17:32:26 +02:00
Felix Fietkau
1ed6eb176c mac80211: backport sched_set_fifo_low
This is needed for newer mt76 updates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-29 17:32:26 +02:00
Felix Fietkau
5b296141c2 mac80211: another fix for the sta connection monitor
Make the code more closely match the original behavior

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-29 17:32:26 +02:00
Felix Fietkau
4bd7689d85 mac80211: update sta connection monitor regression fix
Reset the connection monitor on all acked frames

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-23 08:39:26 +02:00
Felix Fietkau
1c6d45644a mac80211: fix regression in station connection monitor optimization
When the nulldata frame was acked, the probe send count needs to be reset,
otherwise it will keep increasing until the connection is considered dead,
even though it fine.

Reported-by: Georgi Valkov <gvalkov@abv.bg>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-21 17:56:31 +02:00
Davide Fioravanti
cd36c0d2f0 mac80211: select the first available channel for 5GHz interfaces
Some 5GHz wifi interfaces, especially in Tri-band routers, can't use
channel 36. In these cases, the default configuration for 5GHz
interfaces, once enabled, doesn't work.

This patch selects the first non-disabled channel for 5GHz interfaces.

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2020-09-20 17:52:25 +02:00
Felix Fietkau
caf727767a mac80211: do not allow bigger VHT MPDUs than the hardware supports
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-17 14:48:33 +02:00
Felix Fietkau
673062fc56 mac80211: allow bigger A-MSDU sizes in VHT, even if HT is limited
Improves tx throughput when connecting to some APs (e.g. Asus RT-AC88U)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-16 18:49:11 +02:00
Felix Fietkau
d717343c85 mac80211: update encap offload patches to the latest version
Minor cleanup and code reorganization, along with a change to not disable
offload anymore when a tkip or sw crypto key is added

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-09 11:51:47 +02:00
081e944be6 ath25: add back target support
Discussion on the mailing list reveals that this target has active
users. As we are finally able to upgrade this target to kernel 5.4,
add it back to master.

This reverts commit 7d29a55714 ("ath25: drop target") and
immediately moves the relevant files to 5.4, without touching
the content.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-06 19:49:05 +02:00
Felix Fietkau
acf1733496 mac80211: add preliminary support for enabling 802.11ax in config
No advanced features are configurable yet, just basic enabling of HE modes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-04 15:49:35 +02:00
7d29a55714 ath25: drop target
This target still only works with kernel 4.14, and not so recent
attempts of getting newer kernel versions supported did not lead
to success. Therefore, drop the target, as we are already two
LTS kernel versions ahead and it does not seem like anybody will
pick up the work.

Patchwork series:
https://patchwork.ozlabs.org/project/openwrt/list/?series=169991&state=*

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-02 16:29:22 +02:00
Felix Fietkau
91fb3ce56b mac80211: remove an obsolete patch that is no longer doing anything useful
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-01 17:01:56 +02:00
Felix Fietkau
2c14710c54 mac80211: add more AQL fixes/improvements
Fix aggregation length estimation, add HE and VHT160 support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-01 17:01:56 +02:00
Hauke Mehrtens
ca5ee6eba3 mac80211: Fix potential endless loop
Backport a fix from kernel 5.8.3.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-30 22:21:34 +02:00
4e4ee46495 ar71xx: drop target
This target has been mostly replaced by ath79 and won't be included
in the upcoming release anymore. Finally put it to rest.

This also removes all references in packages, tools, etc. as well as
the uboot-ar71xx and vsc73x5-ucode packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-30 22:18:35 +02:00
mohammad rasim
785c7d9b16 kernel: add ar5523 driver
The driver currently only support managed and monitor mode

Changes since v1:
- drop the @DRIVER_11N_SUPPORT dependency

Signed-off-by: mohammad rasim <mohammad.rasim96@gmail.com>
2020-08-24 18:53:59 +02:00
Felix Fietkau
e7f7101182 mac80211: rework encapsulation offload support
Fix a number of deficiencies in the existing API

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-22 07:02:01 +02:00
Felix Fietkau
010682067b mac80211: add missing return code checks in AQL improvements
Fixes throughput issues with some drivers (e.g. ath10k)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-21 18:29:52 +02:00
Felix Fietkau
6bdd4c967b mac80211: add missing backports for building with 4.14 kernels
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-14 17:27:31 +02:00
Felix Fietkau
431fb8cae9 mac80211: add AQL improvements
Add AQL support for HE drivers.
Improve assumed aggregation length based on tx rate

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-13 17:57:19 +02:00
Hauke Mehrtens
fce0f1501b mac80211: Update to version 5.8
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-10 19:34:37 +02:00
Felix Fietkau
eff8c76aa0 mac80211: fix spurious disconnect issues with disassoc_low_ack=1 (default)
mac80211 reports a packet loss event to user space when 50 consecutive packets
were not acked. On a high throughput link with long aggregates and sudden
link changes, this can trigger way too easily.
Mitigate false positives by only triggering the event on a packet loss if
no ACK was received for at least a second

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-09 14:01:49 +02:00
David Bauer
1bfba18a36 mac80211: exchange mesh 6GHz IE patch for upstream accepted
Exchange the patch fixing the kernel ringbuffer WARNING flood for the
one accepted upstream.

Fixes commit a956c14d6a ("mac80211: util: don't warn on missing sband
iftype data")

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-08-08 10:31:57 +02:00
Felix Fietkau
3d731fc903 mac80211: merge performance improvement patches
Fix fq_codel performance issues
Add a new rx function for batch processing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:43:25 +02:00
Felix Fietkau
b7727a8005 mac80211: fix AQL issues
- Remove bogus STA txq pending airtime underflow warning
- Improve tx airtime estimation for A-MPDU traffic

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:42:29 +02:00
Felix Fietkau
25e0ae6bfc mac80211: make cfg80211 testmode support optional (and disabled by default)
Testmode commands are typically only used for manufacturing or vendor specific
debugging features, so they should not be in the default image

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 12:36:23 +02:00
David Bauer
68bf5a9659 mac80211: don't kill wireless daemon on teardown
Don't kill the wireless daemon on teardown. hostapd as well as
wpa_supplicant are managed by procd which would detect the shutdown of
either process as a crash loop.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-31 19:52:03 +02:00
David Bauer
8b3e170526 hostapd: fix incorrect service name
When retrieving the PID for hostapd and wpa_supplicant via ubus the
wrong service name is currently used. This leads to the following error
in the log:

netifd: radio0 (1409): WARNING (wireless_add_process):
executable path /usr/sbin/wpad does not match process  path (/proc/exe)

Fixing the service name retrieves the correct PID and therefore the
warning won't occur.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-31 19:51:51 +02:00
David Bauer
a956c14d6a mac80211: util: don't warn on missing sband iftype data
The kernel currently floods the ringbuffer with warnings when adding a
mesh interface for a device not support HE 6GHz modes.

Return without warning in this case, as mesh_add_he_6ghz_cap_ie calls
ieee80211_ie_build_he_6ghz_cap regardless of the supported interface
modes.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-25 22:36:34 +02:00
Hauke Mehrtens
ed2015c386 mac80211: Update to version 5.8-rc2-1
The following patches:
* 972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
* 973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
are replaced by this commit in the upstream kernel:
* 3db24065c2c8 ("ath10k: enable VHT160 and VHT80+80 modes")

The following patches were applied upstream:
* 001-rt2800-enable-MFP-support-unconditionally.patch
* 090-wireless-Use-linux-stddef.h-instead-of-stddef.h.patch

The rtw88 driver is now split into multiple kernel modules, just put it
all into one OpenWrt kernel package.

rtl8812au-ct was patched to compile against the mac80211 from kernel
5.8, but not runtime tested.

Add a patch which fixes ath10k on IPQ40XX, this patch was send upstream
and fixes a crash when loading ath10k on this SoC.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq40xx/ map-ac2200]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-23 23:39:56 +02:00
Hauke Mehrtens
d1100c76b3 mac80211: Update to version 5.7.5-1
The b43 and b43legacy driver now support DRIVER_11W_SUPPORT.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-23 22:28:52 +02:00
David Bauer
cfd2f3bf6f mac80211: create channel list for fixed channel operation
Currently a device which has a DFS channel selected using the UCI
channel setting might switch to a non-DFS channel in case no chanlist is
provided (UCI setting "channels") when the radio detects a DFS event.

Automatically add a chanlist consisting of the configured channel when
the device does not operate in auto-channel mode and no chanlist set to
circumvent this issue.

Signed-off-by: David Bauer <mail@david-bauer.net>
2020-07-20 15:07:47 +02:00
Daniel Golle
727685c317 mac80211: rt2x00: define RF5592 in init_eeprom routine
Make sure RF5592 is set for RT5592 chip which apparently sometimes
doesn't have RF defined (but always comes with RF5592).
This patch was originally submitted on linux-wireless by
Tom Psyborg <pozega.tomislav@gmail.com> but got rejected.
Turns out the patch is actually needed.

Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-07-10 18:53:52 +01:00