Commit Graph

1329 Commits

Author SHA1 Message Date
Robert Marko
da4f7e51f3 mac80211: ath11k: restore 160MHz support
Recent ath11k sync introduced a regression causing 80+80 and 160MHz to
stop being advertised and thus not selectable due to the respective feature
flags being cleared.

So, until we get answers upstream to what was the reasoning behind this and
it gets fixed, lets just remove the flag clearing to reanable 160MHz.

Fixes: 789a0bac35 ("mac80211: ath11k: sync with ath-next")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-04-01 19:30:48 +02:00
Felix Fietkau
d54c91bd9a mac80211, mt76: add fixes for recently discovered security issues
Fixes CVE-2022-47522

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-30 11:40:11 +02:00
Felix Fietkau
3ab670b24e mac80211: fix receiving mesh packets in forwarding=0 networks
When forwarding is set to 0, frames are typically sent with ttl=1.
Move the ttl decrement check below the check for local receive in order to
fix packet drops.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-26 17:19:39 +02:00
Felix Fietkau
9779ee021d mac80211: fix invalid calls to drv_sta_pre_rcu_remove
Potentially fixes some driver data structure corruption issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-24 13:32:51 +01:00
Felix Fietkau
d0a06965e8 mediatek: add kernel code for supporting offloading wlan->eth and wlan->wlan flows
Will be enabled by an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-23 17:54:18 +01:00
Robert Marko
789a0bac35 mac80211: ath11k: sync with ath-next
Synchronize the ath11k backports with the current ath-next tree.

This brings in actually setting the MU-MIMO parameters in HW and 6GHz
regulatory support along with some minor resource handling fixes.

This allows to easily backport further fixes as cherry picking them has
started requiring manual conflict resolution.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-03-20 12:23:11 +01:00
Nick Hainke
d033c3ba87
mac80211: mark patches accepted upstream
Add kernel tags to the patches that got accepted upstream.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-03-19 18:10:36 +01:00
Rosen Penev
d650ca9247 mac80211: enable ATH9K_HWRNG
in kernel 5.17, fcd09c90c3c5254b18ef34e30c57c65d34290a84 integrated it
better with thee random framework.

Gives boot time randomness on supported devices.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-05 19:13:22 +01:00
Nick Hainke
79c3f8ce24 mac80211: refresh patches
The last mac80211 commits did not refresh the patches.

Refresh:
- ath/402-ath_regd_optional.patch
- ath10k/080-ath10k_thermal_config.patch
- ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
- ath9k/551-ath9k_ubnt_uap_plus_hsr.patch
- rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-03-05 01:32:08 +01:00
Felix Fietkau
f6a7ce2501 mac80211: fix regression in sw a-msdu tx introduced in mesh improvement patches
Fixes: 6262d3eb06 ("mac80211: sync mesh fast xmit patch with upstream requested changes")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-03 11:21:26 +01:00
Felix Fietkau
19817fa3f5 mac80211: add mesh fast-rx support
This helps bring down rx CPU usage by avoiding calls to the rx handlers in
the slow path. Supports forwarding and local rx, including A-MSDU.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-02 14:04:07 +01:00
Felix Fietkau
97a060dce2 mac80211: add patch for allowing the driver to refresh aggregation sessions
Required by a mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-02 11:18:27 +01:00
Felix Fietkau
ee9d706c20 mac80211: backport upstream HE/VHT capability handling changes
Will be required by an mt76 update at some point

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-02 11:17:34 +01:00
Felix Fietkau
6262d3eb06 mac80211: sync mesh fast xmit patch with upstream requested changes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-02 11:17:34 +01:00
Felix Fietkau
1272cb0a0d mac80211: fix mesh path discovery based on unicast packets
If a packet has reached its intended destination, it was bumped to the code
that accepts it, without first checking if a mesh_path needs to be created
based on the discovered source.
Fix this by moving the destination address check further down

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-26 23:45:07 +01:00
Felix Fietkau
2f96580c52 mac80211: rework mesh fast xmit implementation
Refactor in order to make use of generic fast xmit functions
Fix issues with mesh SA/DA addressing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-26 23:45:07 +01:00
Felix Fietkau
1d82a47b49 mac80211: fix mesh fast xmit header cache flush
split into multiple functions depending on sta, mpath or mpp

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-26 08:13:44 +01:00
Robert Marko
524704e677
mac80211: ath11k: sync with ath-next
Synchronize the ath11k backports with the current ath-next tree.

This backports several memory leak issues, PCI IRQ fixup, peer add locking
fix as well as IPQ5018 support, though IPQ5018 support is unused for now.

This allows to easily backport further fixes as cherry picking them has
started requiring manual conflict resolution.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-02-22 10:31:48 +01:00
Felix Fietkau
57db2280a2 mac80211: fix mesh issues and improve performance
fix forwarding received mesh a-msdu packets
add fast xmit support for mesh to improve performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-20 12:59:51 +01:00
Felix Fietkau
ec33a6ca2c mac80211: add fixes for receiving A-MSDU packets on mesh interfaces
The standard defines the A-MSDU header length field differently for mesh
compared to other modes. Deal with this accordingly and work around broken
implementations (e.g. ath10k, ath11k).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-13 11:45:43 +01:00
Felix Fietkau
908397f6d2 mac80211: backport napi_build_skb for 5.10
It is needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
David Bauer
a63430eac3 mac80211: use 802.11ax iw modes
This adds missing HE modes to mac80211_prepare_ht_modes.

Previously mesh without wpa_supplicant would be initialized with 802.11g
/NO-HT only, as this method did not parse channel bandwidth for HE
operation.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-01-28 13:53:39 +01:00
Robert Marko
35f28f2838 mac80211: add ath11k AHB support
This is the follow up to the PCI support commit now providing support for
AHB variant as well, though currently only for ipq807x as that is only
OpenWrt supported SoC ath11k supports as well.

Currently, we are disabling coldboot calibration on ipq807x as it does not
work, there is a remoteproc bug that makes it come late out of reset so
disable coldboot until that is fixed.

Also, as ath11k is quite memory hungry, we are introducing a config option
to use the limits for 512MB of RAM, similar to what QCA does downstream but
in way simpler and cleaner way so that 512MB save some RAM.
512MB profile is also set as the default for now.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-01-16 12:42:23 +01:00
Robert Marko
4f592fb819 mac80211: ath11k: hack for multiple card support
This is a temporary workaround for supporting multiple cards or AHB+PCI.

There is ongoing upstream work to properly support this based of
advertised FW features, but that is still ongoing.

This is only supported on QCN9074 cards due to FW limitation, so HW ID
is checked in order to prevent breaking QCA6390 and other popular cards.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-01-16 12:42:23 +01:00
Robert Marko
c83dbcdf8f
mac80211: ath11k: fix monitor bringup
Currently, ath11k will crash the crash if we try to bringup the monitor
mode interface.
Luckily, it has already been fixed upstream, so backport the patches
fixing it.

Fixes: 93ae4353cd ("mac80211: add ath11k PCI support")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-01-12 15:17:18 +01:00
Felix Fietkau
12fdb4c9f4 mac80211: fix receiving multicast packets on multiple sta interfaces
Also fix MLO sta sdata link initialization

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-30 21:20:04 +01:00
Hauke Mehrtens
cb7d662dac mac80211: Do not build brcmsmac on bcm47xx_legacy
brcmsmac needs bcma. bcma is build into the kernel for the other bcm47xx
subtargets, but not for the legacy target because it only uses ssb. We
could build bcma as a module for bcm47xx_legacy, but none of these old
devices uses a wifi card supported by brcsmac.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-24 15:14:58 +01:00
Robert Marko
93ae4353cd
mac80211: add ath11k PCI support
ath11k is the upstream driver for Qualcomm 802.11ax radios, both for the
internal AHB and PCI based cards.
This commit does however only provide PCI support while AHB will follow
but its SoC specific so it will require an OpenWrt target first.

It differs a bit from ath10k as it requires stuff like QRTR, MHI and QMI
helpers.

PCI variant requires qrtr-mhi and mhi-bus which backports do provide,
however we are dropping those in a patch as they will conflict with
support for the AHB variant as that one requires qrtr-smd which in turn
requires RPMSG and GLINK and its not feasable to provide those in
backports as they are really SoC specific.

QRTR and MHI in kernel 5.10 are not usable and backporting the changes
is not easy as they have changed drastically from 5.10 to 5.15 ath11k will
only be available on targets that use kernel 5.15.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-12-19 01:01:57 +01:00
Felix Fietkau
d07d47d0e3 mac80211: fix a regression in processing management frames for AP VLAN interfaces
Fixes re-assoc of WDS stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-16 14:32:47 +01:00
Felix Fietkau
133a1e2f37 mac80211: work around a race condition on detecting a phy while bringing it up
When reloading modules and running wifi, a phy can sometimes be renamed
while in the middle of a hotplug call that tries to detect new phys
This can lead to bogus wifi-device sections being created

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-16 14:32:47 +01:00
Felix Fietkau
92acd9f3e8 mac80211: fix uninitialized variable in rx->link/link_sta initialization fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-16 14:32:47 +01:00
Felix Fietkau
b7a7a97037 mac80211: fix connecting multiple wds stations to an AP
A faulty check prevented the AP_VLAN interfaces from being brought up

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-14 13:54:02 +01:00
Felix Fietkau
a4339c5a21 mac80211: add a fix for a crash in __ieee80211_rx_h_amsdu
Fix initialization of rx->link_sta

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-13 21:14:43 +01:00
Andre Heider
7c63295bf4 treewide: remove DRIVER_11N_SUPPORT
hostapd's compile time option CONFIG_IEEE80211N was removed almost 3 years
ago, 80.211n/HT is always included since then.

Noticed because `hostapd -v11n` confusingly returned an error.

See hostapd's commit:
f3bcd69603 "Remove CONFIG_IEEE80211N build option"

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-12-13 10:54:50 +01:00
Felix Fietkau
e046500fe9 ath9k: add missing dependency on random core
Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-13 10:25:27 +01:00
Felix Fietkau
8d90b9fef1 mac80211: update to linux 6.1-rc8
This should help stay in sync with upstream development

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-10 15:15:19 +01:00
Felix Fietkau
a797f0e82a hostapd: use wpa_supplicant for unencrypted mesh connections
It's more reliable than using iw

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-10 12:38:46 +01:00
Hauke Mehrtens
077622a198 mac80211: Update to version 5.15.81
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-03 18:32:19 +01:00
Nick Hainke
6640c788fe mac80211: subsys: complete patch files for use with git am
Adding proper fields to patch files allowing for `git am` to properly
function.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-27 13:18:29 +01:00
Felix Fietkau
161b22d103 mac80211: fix mesh airtime link metric estimation
fix reading the per-packet rate on devices with firmware rate control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-10 14:47:07 +01:00
Felix Fietkau
a06e023b4e mac80211: remove old legacy legacy drivers
Get rid of drivers that are either limited to 802.11b/g or don't even support
cfg80211/mac80211. Most of these are either limited to boards that we don't even
support anymore because of firmware size, or were only used for custom hacks by
a really small number of users in the past.
Let's get rid of those to reduce the maintenance effort and the number of useless
packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:44:28 +01:00
Nick Hainke
2426dbb734
mac80211: subsys: add tags to upstreamed patches
Some patches were already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:10:03 +01:00
Nick Hainke
b2272c6194
mac80211: rt2x00: add tags to upstreamed patches
Some patches are already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:09:30 +01:00
Nick Hainke
f472a2fb15
mac80211: brcm: add tag to upstreamed patch
Add tag to upstreamed patch.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:08:49 +01:00
Nick Hainke
6f5e1df597
mac80211: ath9k: add tag to upstreamed patch
Add tag to upstreamed patch.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:08:12 +01:00
Nick Hainke
c47f8dacb8
mac80211: ath10k: add tags for upstreamed patches
Add tags to already upstreamed patches.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-09 17:07:42 +01:00
Andre Heider
8246ab6a27 mac80211: fix masking nested A-MSDU support for mesh
CONFIG_MAC80211_MESH isn't defined for this package, rendering the patch
useless. Match protecting the access of sta_info.mesh with the very same
define declaring it.

Fixes 45109f69a6 "mac80211: fix compile error when mesh is disabled"
Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-10-25 00:32:58 +02:00
Felix Fietkau
e4b9538ddb mac80211: use KERNEL_MAKEOPTS instead of KERNEL_MAKE_FLAGS
Fixes issues with disabling stack validation on non-linux systems

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-24 20:49:34 +02:00
Hauke Mehrtens
58b65525f3 mac80211: Update to version 5.15.74-1
This updates mac80211 to version 5.15.74-1 which is based on kernel
5.15.74.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-23 22:33:46 +02:00
Felix Fietkau
a7ca1b2314 mac80211: use board.json provided phy names in generated default config
The phy will be automatically renamed on setup

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-14 13:13:11 +02:00