1296 Commits

Author SHA1 Message Date
Tianling Shen
1209f4c2f0
mac80211: mt7601u: allow AP mode
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-11 16:52:28 +08:00
Tianling Shen
3267c28531
mac80211: set default country to CN
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit a290a61f6d6240e0826b4a4c88d1e77cedbe3965)
2023-07-08 03:30:48 +08:00
Felix Fietkau
509363ba58
mac80211, mt76: add fixes for recently discovered security issues
Fixes CVE-2022-47522

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d54c91bd9ab3c54ee06923eafbd67047816a37e4)
(cherry picked from commit 4ae854d05568bc36a4df2cb6dd8fb023b5ef9944)
2023-04-02 02:07:16 +08:00
Tianling Shen
cd7ba71c76
mac80211: refresh vht patch
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit a58903115203f98dd89883294642b4cf27cc3906)
2023-03-11 15:39:00 +08:00
Tianling Shen
0d4c9bde61
mt76: backport fixes from coolsnowwolf
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-02-25 15:08:45 +08:00
Hauke Mehrtens
058b685a70
mac80211: Update to version 5.15.92-1
This update mac80211 to version 5.15.92-1. This includes multiple
bugfixes. Some of these bugfixes are fixing security relevant bugs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 863288b49d3d1466f22bcf6098e4635a5be98626)
2023-02-12 04:57:59 +08:00
David Bauer
44715a1df0
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>
(cherry picked from commit a63430eac33ceb1dbf96d3667e2a0f2e04ba391f)
2023-01-28 22:29:54 +08:00
Felix Fietkau
9e98d6d813
hostapd: use wpa_supplicant for unencrypted mesh connections
It's more reliable than using iw

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit a797f0e82a075fd78180c27692a1b404bedd38a8)
2022-12-24 12:08:18 +08:00
Hauke Mehrtens
a571b805cb
mac80211: Update to version 5.15.81
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 077622a198039f9f3d907b5cf4d77a52d7592c49)
2022-12-06 03:00:24 +08:00
Nick Hainke
5411500caa
mac80211: rt2x00: add tags to upstreamed patches
Some patches are already upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit b2272c6194666a299210a0ee1bf307c83abc278b)
2022-12-06 03:00:14 +08:00
Tianling Shen
f6c4028e51
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-10-25 17:51:12 +08:00
Hauke Mehrtens
b3142fff2a mac80211: Update to version 5.10.149-1
This updates mac80211 to version 5.10.149-1 which is based on kernel
5.10.149.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-23 20:52:28 +02:00
zxlhhyccc
3a246aad3d
mac80211: remove set wireless.default_${name}.iw_qos_map_set=none
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 996ef9f206175080d60f6a3c944ce26697fdc67b)
2022-10-22 15:47:10 +08:00
Tianling Shen
0bf054cd9e
mac80211: rename default SSID to ImmortalWrt
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 377f0191d02e78129d17404cb3cd393362b25d09)
2022-10-15 00:45:33 +08:00
Felix Fietkau
1b19d7e879
mac80211: fix typo in netifd script
Reported-by: Chad Monroe <chad.monroe@smartrg.com>
Fixes: 590eaaeed59a ("mac80211: fix issues in HE capabilities")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit da6b77215b995eb61edd84b2766930bc963b3331)
2022-10-15 00:43:23 +08:00
Felix Fietkau
fa9a932fdb mac80211: backport security fix and disable MBSSID support
Fixes: CVE-2022-41674
Fixes: CVE-2022-42719
Fixes: CVE-2022-42720
Fixes: CVE-2022-42721
Fixes: CVE-2022-42722
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-13 21:16:38 +02:00
Felix Fietkau
bd2dc958ad
mac80211: backport security fixes
This mainly affects scanning and beacon parsing, especially with MBSSID enabled

Fixes: CVE-2022-41674
Fixes: CVE-2022-42719
Fixes: CVE-2022-42720
Fixes: CVE-2022-42721
Fixes: CVE-2022-42722
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 26f400210d6b3780fcc0deb89b9741837df9c8b8)
2022-10-13 22:24:11 +08:00
Felix Fietkau
86c7db3049
mac80211: fix issues in HE capabilities
Enable HE SU beamformee by default
Fix spatial reuse configuration:
- he_spr_sr_control is not a bool for enabling, it contains multiple bits
  which disable features that should be disabled by default
- one of the features (PSR) can be enabled through he_spr_psr_enabled
- add option to disable bss color / spatial reuse

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 590eaaeed59a9eb6637a1480587fc410de182523)
2022-10-13 22:23:42 +08:00
Felix Fietkau
41de86ba81
mac80211: disable drivers that rely on wireless extensions
They are unmaintained and don't work properly with current wifi scripts

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f613c1368b5c4a5cdd9fb04607faa20ace2b7b74)
2022-10-08 14:53:01 +08:00
Felix Fietkau
452f246bce
mac80211: sync rx STP fix with updated version
Add back skb length check and fix a minor issue in protocol detection

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f6c359a65528b994e97235b5f0b0d02d6cdad918)
2022-10-08 14:49:47 +08:00
Felix Fietkau
181da347c0
mac80211: fix issues with receiving small STP packets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit cec7dfa49775ce65270b977bea5fc0f928f97bdc)
2022-10-08 14:49:37 +08:00
Koen Vandeputte
af228abdae
mac80211: fix compile error when mesh is disabled
This fixes following compile error seen when
building mac80211 with mesh disabled:

.../backports-5.15.58-1/net/mac80211/agg-rx.c: In function 'ieee80211_send_addba_resp':
...backports-5.15.58-1/net/mac80211/agg-rx.c:255:17: error: 'struct sta_info' has no member named 'mesh'
  255 |         if (!sta->mesh)
      |                 ^~

sta_info.h shows this item as being optional based on flags:

	struct mesh_sta *mesh;

Guard the check to fix this.

Fixes: f96744ba6b ("mac80211: mask nested A-MSDU support for mesh")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
(cherry picked from commit 45109f69a64c31aa64db05d5de37cd7f6a1aaaa2)
2022-10-08 14:49:23 +08:00
David Bauer
2828efd489
mac80211: mask nested A-MSDU support for mesh
mac80211 incorrectly processes A-MSDUs contained in A-MPDU frames. This
results in dropped packets and severely impacted throughput.

As a workaround, don't indicate support for A-MSDUs contained in
A-MPDUs. This improves throughput over mesh links by factor 10.

Ref: https://github.com/openwrt/mt76/issues/450

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit f96744ba6b2fd444f4f7575d234c7579bd3030cd)
2022-10-08 14:48:59 +08:00
Felix Fietkau
8efbdb8df8
mac80211: fix decap offload for stations on AP_VLAN interfaces
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit eb07020de2b4a5f89579f09f5060d4b9f070a356)
2022-10-08 14:48:22 +08:00
Alberto Martinez-Alvarez
ea88b22e42
mac80211: fix parameter reading for AC_BE tx bursting
The "tx_burst" option which should control the value was
expecting more of a list and hence tx_queue_data2_burst
value wasn't updated.

Yes, it would make sense to have a list for this, the
existing  code only updates tx_queue_data2_burst and
not the other tx_queue_data[0134]_burst values.

Signed-off-by: Alberto Martinez-Alvarez <amteza@gmail.com>
(formatted commit message, wrote extra information into commit,
moved tx_burst to existing json_get_vars)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit b02b95d1b0816274e5cf221071e0f52482c7537a)
2022-09-27 17:09:19 +08:00
Daniel Golle
4549ba8df7
mac80211: rt2x00: replace patches with v3 of pending series
See also patchwork for submission progress:
https://patchwork.kernel.org/project/linux-wireless/cover/cover.1663445157.git.daniel@makrotopia.org/

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 412fcf3d4400f84551f3ead0514834c62d94a251)
2022-09-20 15:36:09 +08:00
Sungbo Eo
aee32d96e5
mac80211: rt2x00: fix typo
Add missing semicolon and refresh patches.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit d826c91704d2baa5e389c225791740e4c61d62c4)
2022-09-20 15:35:53 +08:00
Daniel Golle
c0f93194ee
mac80211: clean and submit a bunch of rt2x00 patches
Clean and submit patches, mostly related to MT7620 to linux-wireless
mailing list:
https://patchwork.kernel.org/project/linux-wireless/list/?series=677770

Replace local patches with now submitted versions.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit e785ca05e9f0502894772f5df92192b816ba5d7c)
2022-09-20 15:35:22 +08:00
Koen Vandeputte
fc3c63f676
mac80211: merge upstream fixes
fetched from upstream kernel v5.15.67

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry picked from commit aa9be386d40f3a5e559c0f2183c772175a45cf0d)
2022-09-16 15:43:20 +08:00
Felix Fietkau
cc43824357
mac80211: merge pending fixes for tx queueing issues
Fixes a potential deadlock and a tx queue hang on STA assoc

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8b06e06832ebe757246582b65306ad2a2537741f)
2022-09-16 15:43:04 +08:00
Daniel Golle
dded755881
mac80211: rt2x00: experimental improvements for MT7620 wifi
Serge Vasilugin reports:

To improve mt7620 built-in wifi performance some changes:
1. Correct BW20/BW40 switching (see comments with mark (1))
2. Correct TX_SW_CFG1 MAC reg from v3 of vendor driver see
	https://gitlab.com/dm38/padavan-ng/-/blob/master/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/chips/rt6352.c#L531
3. Set bbp66 for all chains.
4. US_CYC_CNT init based on Programming guide, default value was 33 (pci),
   set chipset bus clock with fallback to cpu clock/3.
5. Don't overwrite default values for mt7620.
6. Correct some typos.
7. Add support for external LNA:
    a) RF and BBP regs never be corrected for this mode
    b) eLNA is driven the same way as ePA with mt7620's pin PA
	but vendor driver explicitly pin PA to gpio mode (for forrect calibration?)
	so I'm not sure that request for pa_pin in dts-file will be enough

First 5 changes (really 2) improve performance for boards w/o eLNA/ePA.
Changes 7 add support for eLNA

Configuration w/o eLAN/ePA and with eLNA show results
tx/rx (from router point of view) for each stream:
 35-40/30-35 Mbps for HT20
 65-70/60-65 Mbps for HT40

Yes. Max results for 2T2R client is 140-145/135-140
with peaks 160/150, It correspond to mediatek driver results.
Boards with ePA untested.

Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 31a6605de04218e1c04bd5c2436c24d7d1c07506)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-09-16 15:42:34 +08:00
Daniel Golle
2648cd19d7
mac80211: add patch descriptions to rt2x00 patches
Prepare patches for sending upstream by adding patch descriptions
generated from the original OpenWrt commits adding each patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit d4feb66048f6a8f387eedfb162a1184cdae9d756)
2022-09-16 15:37:20 +08:00
Hauke Mehrtens
3eb87af37e
mac80211: Update to version 5.15.58-1
This updates mac80211 to version 5.15.58-1 which is based on kernel
5.15.58.
The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-09-10 09:26:08 +08:00
Tianling Shen
e863cd7a02
mac80211: avoid building unavailable kmods
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-08-10 18:12:42 +08:00
Tianling Shen
d7c98b6ebb
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-04-22 09:16:00 +08:00
Thibaut VARÈNE
39f1815b3e mac80211: fix QCA9561 PA bias
This patch fixes an invalid TX PA DC bias level on QCA9561, which
results in a very low output power and very low throughput as devices
are further away from the AP (compared to other 2.4GHz APs),
following a suggestion from nbd[1].

This patch has been submitted upstream[2].

[1] https://lore.kernel.org/all/91c58969-c60e-2f41-00ac-737786d435ae@nbd.name
[2] https://lore.kernel.org/linux-wireless/20220417145145.1847-1-hacks+kernel@slashdirt.org/

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry-picked from 7dc52a78ae2c2f748a0c0c4adcb13979260b3498)
2022-04-19 14:56:49 +02:00
Tianling Shen
3bcd504017
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-04-13 05:43:12 +08:00
Hauke Mehrtens
99b00edf35 mac80211: Update to version 5.10.110-1
This updates mac80211 to version 5.10.110-1 which is based on kernel
5.10.110.
The removed patches were applied upstream.

This new release contains many fixes which were merged into the upstream
Linux kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-04-11 22:51:57 +02:00
Tianling Shen
7d409270a9
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-01-10 20:26:41 +08:00
Nick Hainke
27225e3538 kernel: ath10k: provide a build variant for small RAM devices
Based on: 1ac627024de9 ("kernel: ath10k-ct: provide a build variant for
small RAM devices")

Like described in the ath10k-ct-smallbuffers version, oom-killer gets
triggered frequently by devices with small RAM.

That change is necessary for many community mesh networks which use
ath10k based devices with too little RAM. The -ct driver has been
proven unstable if used with 11s meshing and only wave2 chipsets are
supporting 11s. Freifunk Berlin is nowadays assembling its
firmware-based completely of vanilla OpenWRT with some package additions
which are made through the imagebuilder. Therefore we cannot take the
approach other freifunk communities have taken to maintain that patch
downstream [1]. Other communities consider these devices as broken and
that change would pretty much give those devices a second life [2].
[1] - 450b306e54
[2] - https://github.com/freifunk-gluon/gluon/issues/1988#issuecomment-619532909

Signed-off-by: Simon Polack <spolack+git@mailbox.org>
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 694757a08f620a9f24b70003542d9dcd0abeac46)
2022-01-02 12:35:21 +01:00
Tianling Shen
a1bbf9863d
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-12-24 23:41:10 +08:00
Felix Fietkau
e1b79b1dc3 mac80211: optimize airtime fairness code to reduce cpu usage
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 87def9efd8cee66da3bd3961671e580282427c2e)
2021-12-21 12:58:22 +01:00
Tianling Shen
b7afdb4b5b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-12-17 18:21:20 +08:00
Hauke Mehrtens
4b52d89531 mac80211: Update toversion 5.10.85
The following patches were backported from upstream before and are not
needed any more:
  package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch
  package/kernel/mac80211/patches/subsys/307-mac80211-do-not-access-the-IV-when-it-was-stripped.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-12-14 23:12:22 +01:00
Tianling Shen
b38ee6f170
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-12-14 01:10:37 +08:00
Felix Fietkau
efc76b1361 mac80211: bump PKG_RELEASE
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-12-02 14:27:22 +01:00
Felix Fietkau
1276ef9c1c mac80211: fix tx aggregation locking issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit a1a71a71999001502fa86136dbf8925da8341098)
2021-12-02 14:14:39 +01:00
Felix Fietkau
b1e684fa88 mac80211: fix queue assignment of aggregation start requests
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 15d8c7aa74c202c530dbd53e53b00e418f0b64f4)
2021-12-02 14:13:33 +01:00
Tianling Shen
e2e94600f3
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-26 19:24:12 +08:00
Felix Fietkau
0e0192098a mac80211: backport fix for dealing with stripped IV on rx
This fixes potental rx drop issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 68189835ac81779f9cf21060dca0c54dcdb0c0a6)
2021-11-26 08:55:04 +01:00