Skip to content

Commit 2c80116

Browse files
committed
Johannes Berg says: ==================== Apart from the usual small things just driver updates: - mt76: - WED support for >32-bit DMA - airoha NPU support - regdomain improvements - continued WiFi7/MLO work - rtw89 - support USB devices RTL8852AU and RTL8852CU - initial work for RTL8922DE - improved injection support - rtl8xxxu: 40 MHz connection fixes/support - brcmfmac: Acer A1 840 tablet quirk * tag 'wireless-next-2025-11-27' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (152 commits) wifi: mac80211: allow sharing identical chanctx for S1G interfaces wifi: nl80211: vendor-cmd: intel: fix a blank kernel-doc line warning wifi: cfg80211: include s1g_primary_2mhz when comparing chandefs wifi: cfg80211: include s1g_primary_2mhz when sending chandef wifi: ieee80211: correct FILS status codes mt76: mt7615: Fix memory leak in mt7615_mcu_wtbl_sta_add() wifi: mt76: mt792x: fix wifi init fail by setting MCU_RUNNING after CLC load wifi: mt76: Strip whitespace from build ddate wifi: mt76: mt7996: Add missing locking in mt7996_mac_sta_rc_work() wifi: mt76: mt7996: skip ieee80211_iter_keys() on scanning link remove wifi: mt76: mt7996: skip deflink accounting for offchannel links wifi: mt76: Move mt76_abort_scan out of mt76_reset_device() wifi: mt76: mt7996: move mt7996_update_beacons under mt76 mutex wifi: mt76: mt7996: grab mt76 mutex in mt7996_mac_sta_event() wifi: mt76: mt7925: ensure the 6GHz A-MPDU density cap from the hardware. wifi: mt76: mt7996: fix EMI rings for RRO wifi: mt76: mt7996: fix using wrong phy to start in mt7996_mac_restart() wifi: mt76: mt7996: fix MLO set key and group key issues wifi: mt76: mt7996: fix MLD group index assignment wifi: mt76: mt7996: use correct link_id when filling TXD and TXP ... ==================== Link: https://patch.msgid.link/20251127103806.17776-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents c940be4 + f9e788c commit 2c80116

298 files changed

Lines changed: 5044 additions & 1786 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ properties:
151151
- ETSI
152152
- JP
153153

154+
country:
155+
$ref: /schemas/types.yaml#/definitions/string
156+
pattern: '^[A-Z]{2}$'
157+
description:
158+
ISO 3166-1 alpha-2 country code for power limits
159+
154160
patternProperties:
155161
"^txpower-[256]g$":
156162
type: object
@@ -210,6 +216,66 @@ properties:
210216
minItems: 13
211217
maxItems: 13
212218

219+
paths-cck:
220+
$ref: /schemas/types.yaml#/definitions/uint8-array
221+
minItems: 4
222+
maxItems: 4
223+
description:
224+
4 half-dBm backoff values (1 - 4 antennas, single spacial
225+
stream)
226+
227+
paths-ofdm:
228+
$ref: /schemas/types.yaml#/definitions/uint8-array
229+
minItems: 4
230+
maxItems: 4
231+
description:
232+
4 half-dBm backoff values (1 - 4 antennas, single spacial
233+
stream)
234+
235+
paths-ofdm-bf:
236+
$ref: /schemas/types.yaml#/definitions/uint8-array
237+
minItems: 4
238+
maxItems: 4
239+
description:
240+
4 half-dBm backoff values for beamforming
241+
(1 - 4 antennas, single spacial stream)
242+
243+
paths-ru:
244+
$ref: /schemas/types.yaml#/definitions/uint8-matrix
245+
description:
246+
Sets of half-dBm backoff values for 802.11ax rates for
247+
1T1ss (aka 1 transmitting antenna with 1 spacial stream),
248+
2T1ss, 3T1ss, 4T1ss, 2T2ss, 3T2ss, 4T2ss, 3T3ss, 4T3ss
249+
and 4T4ss.
250+
Each set starts with the number of channel bandwidth or
251+
resource unit settings for which the rate set applies,
252+
followed by 10 power limit values. The order of the
253+
channel resource unit settings is RU26, RU52, RU106,
254+
RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
255+
minItems: 1
256+
maxItems: 7
257+
items:
258+
minItems: 11
259+
maxItems: 11
260+
261+
paths-ru-bf:
262+
$ref: /schemas/types.yaml#/definitions/uint8-matrix
263+
description:
264+
Sets of half-dBm backoff (beamforming) values for 802.11ax
265+
rates for 1T1ss (aka 1 transmitting antenna with 1 spacial
266+
stream), 2T1ss, 3T1ss, 4T1ss, 2T2ss, 3T2ss, 4T2ss, 3T3ss,
267+
4T3ss and 4T4ss.
268+
Each set starts with the number of channel bandwidth or
269+
resource unit settings for which the rate set applies,
270+
followed by 10 power limit values. The order of the
271+
channel resource unit settings is RU26, RU52, RU106,
272+
RU242/SU20, RU484/SU40, RU996/SU80 and RU2x996/SU160.
273+
minItems: 1
274+
maxItems: 7
275+
items:
276+
minItems: 11
277+
maxItems: 11
278+
213279
txs-delta:
214280
$ref: /schemas/types.yaml#/definitions/uint32-array
215281
description:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ static const struct brcmf_dmi_data acepc_t8_data = {
2424
BRCM_CC_4345_CHIP_ID, 6, "acepc-t8"
2525
};
2626

27+
static const struct brcmf_dmi_data acer_a1_840_data = {
28+
BRCM_CC_43340_CHIP_ID, 2, "acer-a1-840"
29+
};
30+
2731
/* The Chuwi Hi8 Pro uses the same Ampak AP6212 module as the Chuwi Vi8 Plus
2832
* and the nvram for the Vi8 Plus is already in linux-firmware, so use that.
2933
*/
@@ -91,6 +95,16 @@ static const struct dmi_system_id dmi_platform_data[] = {
9195
},
9296
.driver_data = (void *)&acepc_t8_data,
9397
},
98+
{
99+
/* Acer Iconia One 8 A1-840 (non FHD version) */
100+
.matches = {
101+
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
102+
DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
103+
/* Above strings are too generic also match BIOS date */
104+
DMI_MATCH(DMI_BIOS_DATE, "04/01/2014"),
105+
},
106+
.driver_data = (void *)&acer_a1_840_data,
107+
},
94108
{
95109
/* Chuwi Hi8 Pro with D2D3_Hi8Pro.233 BIOS */
96110
.matches = {

drivers/net/wireless/intel/ipw2x00/ipw2100.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
21432143

21442144
/* Make sure the RF Kill check timer is running */
21452145
priv->stop_rf_kill = 0;
2146-
mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ));
2146+
mod_delayed_work(system_percpu_wq, &priv->rf_kill, round_jiffies_relative(HZ));
21472147
}
21482148

21492149
static void ipw2100_scan_event(struct work_struct *work)
@@ -2170,7 +2170,7 @@ static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
21702170
round_jiffies_relative(msecs_to_jiffies(4000)));
21712171
} else {
21722172
priv->user_requested_scan = 0;
2173-
mod_delayed_work(system_wq, &priv->scan_event, 0);
2173+
mod_delayed_work(system_percpu_wq, &priv->scan_event, 0);
21742174
}
21752175
}
21762176

@@ -4252,7 +4252,7 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio)
42524252
"disabled by HW switch\n");
42534253
/* Make sure the RF_KILL check timer is running */
42544254
priv->stop_rf_kill = 0;
4255-
mod_delayed_work(system_wq, &priv->rf_kill,
4255+
mod_delayed_work(system_percpu_wq, &priv->rf_kill,
42564256
round_jiffies_relative(HZ));
42574257
} else
42584258
schedule_reset(priv);

drivers/net/wireless/intel/ipw2x00/ipw2200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4415,7 +4415,7 @@ static void handle_scan_event(struct ipw_priv *priv)
44154415
round_jiffies_relative(msecs_to_jiffies(4000)));
44164416
} else {
44174417
priv->user_requested_scan = 0;
4418-
mod_delayed_work(system_wq, &priv->scan_event, 0);
4418+
mod_delayed_work(system_percpu_wq, &priv->scan_event, 0);
44194419
}
44204420
}
44214421

drivers/net/wireless/mediatek/mt76/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: GPL-2.0-only
1+
# SPDX-License-Identifier: BSD-3-Clause-Clear
22
config MT76_CORE
33
tristate
44
select PAGE_POOL
@@ -37,6 +37,10 @@ config MT792x_USB
3737
tristate
3838
select MT76_USB
3939

40+
config MT76_NPU
41+
bool
42+
depends on MT76_CORE
43+
4044
source "drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig"
4145
source "drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig"
4246
source "drivers/net/wireless/mediatek/mt76/mt7603/Kconfig"

drivers/net/wireless/mediatek/mt76/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: GPL-2.0-only
1+
# SPDX-License-Identifier: BSD-3-Clause-Clear
22
obj-$(CONFIG_MT76_CORE) += mt76.o
33
obj-$(CONFIG_MT76_USB) += mt76-usb.o
44
obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o
@@ -12,6 +12,7 @@ mt76-y := \
1212
mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o \
1313
tx.o agg-rx.o mcu.o wed.o scan.o channel.o
1414

15+
mt76-$(CONFIG_MT76_NPU) += npu.o
1516
mt76-$(CONFIG_PCI) += pci.o
1617
mt76-$(CONFIG_NL80211_TESTMODE) += testmode.o
1718

drivers/net/wireless/mediatek/mt76/agg-rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: ISC
1+
// SPDX-License-Identifier: BSD-3-Clause-Clear
22
/*
33
* Copyright (C) 2018 Felix Fietkau <nbd@nbd.name>
44
*/

drivers/net/wireless/mediatek/mt76/channel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: ISC
1+
// SPDX-License-Identifier: BSD-3-Clause-Clear
22
/*
33
* Copyright (C) 2024 Felix Fietkau <nbd@nbd.name>
44
*/

drivers/net/wireless/mediatek/mt76/debugfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: ISC
1+
// SPDX-License-Identifier: BSD-3-Clause-Clear
22
/*
33
* Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
44
*/
@@ -93,9 +93,9 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str,
9393
{
9494
int i;
9595

96-
seq_printf(file, "%10s:", str);
96+
seq_printf(file, "%16s:", str);
9797
for (i = 0; i < len; i++)
98-
seq_printf(file, " %2d", val[i]);
98+
seq_printf(file, " %4d", val[i]);
9999
seq_puts(file, "\n");
100100
}
101101
EXPORT_SYMBOL_GPL(mt76_seq_puts_array);

drivers/net/wireless/mediatek/mt76/dma.c

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: ISC
1+
// SPDX-License-Identifier: BSD-3-Clause-Clear
22
/*
33
* Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
44
*/
@@ -7,37 +7,6 @@
77
#include "mt76.h"
88
#include "dma.h"
99

10-
#if IS_ENABLED(CONFIG_NET_MEDIATEK_SOC_WED)
11-
12-
#define Q_READ(_q, _field) ({ \
13-
u32 _offset = offsetof(struct mt76_queue_regs, _field); \
14-
u32 _val; \
15-
if ((_q)->flags & MT_QFLAG_WED) \
16-
_val = mtk_wed_device_reg_read((_q)->wed, \
17-
((_q)->wed_regs + \
18-
_offset)); \
19-
else \
20-
_val = readl(&(_q)->regs->_field); \
21-
_val; \
22-
})
23-
24-
#define Q_WRITE(_q, _field, _val) do { \
25-
u32 _offset = offsetof(struct mt76_queue_regs, _field); \
26-
if ((_q)->flags & MT_QFLAG_WED) \
27-
mtk_wed_device_reg_write((_q)->wed, \
28-
((_q)->wed_regs + _offset), \
29-
_val); \
30-
else \
31-
writel(_val, &(_q)->regs->_field); \
32-
} while (0)
33-
34-
#else
35-
36-
#define Q_READ(_q, _field) readl(&(_q)->regs->_field)
37-
#define Q_WRITE(_q, _field, _val) writel(_val, &(_q)->regs->_field)
38-
39-
#endif
40-
4110
static struct mt76_txwi_cache *
4211
mt76_alloc_txwi(struct mt76_dev *dev)
4312
{
@@ -220,10 +189,15 @@ static void
220189
mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q)
221190
{
222191
Q_WRITE(q, desc_base, q->desc_dma);
223-
if (q->flags & MT_QFLAG_WED_RRO_EN)
192+
if ((q->flags & MT_QFLAG_WED_RRO_EN) && !mt76_npu_device_active(dev))
224193
Q_WRITE(q, ring_size, MT_DMA_RRO_EN | q->ndesc);
225194
else
226195
Q_WRITE(q, ring_size, q->ndesc);
196+
197+
if (mt76_queue_is_npu_tx(q)) {
198+
writel(q->desc_dma, &q->regs->desc_base);
199+
writel(q->ndesc, &q->regs->ring_size);
200+
}
227201
q->head = Q_READ(q, dma_idx);
228202
q->tail = q->head;
229203
}
@@ -235,7 +209,7 @@ void mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q,
235209
return;
236210

237211
if (!mt76_queue_is_wed_rro_ind(q) &&
238-
!mt76_queue_is_wed_rro_rxdmad_c(q)) {
212+
!mt76_queue_is_wed_rro_rxdmad_c(q) && !mt76_queue_is_npu(q)) {
239213
int i;
240214

241215
/* clear descriptors */
@@ -446,6 +420,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush)
446420

447421
while (q->queued > 0 && q->tail != last) {
448422
mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry);
423+
mt76_npu_txdesc_cleanup(q, q->tail);
449424
mt76_queue_tx_complete(dev, q, &entry);
450425

451426
if (entry.txwi) {
@@ -680,6 +655,10 @@ mt76_dma_tx_queue_skb(struct mt76_phy *phy, struct mt76_queue *q,
680655
if (test_bit(MT76_RESET, &phy->state))
681656
goto free_skb;
682657

658+
/* TODO: Take into account unlinear skbs */
659+
if (mt76_npu_device_active(dev) && skb_linearize(skb))
660+
goto free_skb;
661+
683662
t = mt76_get_txwi(dev);
684663
if (!t)
685664
goto free_skb;
@@ -727,6 +706,9 @@ mt76_dma_tx_queue_skb(struct mt76_phy *phy, struct mt76_queue *q,
727706
if (ret < 0)
728707
goto unmap;
729708

709+
if (mt76_npu_device_active(dev))
710+
return mt76_npu_dma_add_buf(phy, q, skb, &tx_info.buf[1], txwi);
711+
730712
return mt76_dma_add_buf(dev, q, tx_info.buf, tx_info.nbuf,
731713
tx_info.info, tx_info.skb, t);
732714

@@ -825,9 +807,17 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
825807
q->ndesc = n_desc;
826808
q->buf_size = bufsize;
827809
q->hw_idx = idx;
810+
q->dev = dev;
811+
812+
if (mt76_queue_is_wed_rro_ind(q))
813+
size = sizeof(struct mt76_wed_rro_desc);
814+
else if (mt76_queue_is_npu_tx(q))
815+
size = sizeof(struct airoha_npu_tx_dma_desc);
816+
else if (mt76_queue_is_npu_rx(q))
817+
size = sizeof(struct airoha_npu_rx_dma_desc);
818+
else
819+
size = sizeof(struct mt76_desc);
828820

829-
size = mt76_queue_is_wed_rro_ind(q) ? sizeof(struct mt76_wed_rro_desc)
830-
: sizeof(struct mt76_desc);
831821
q->desc = dmam_alloc_coherent(dev->dma_dev, q->ndesc * size,
832822
&q->desc_dma, GFP_KERNEL);
833823
if (!q->desc)
@@ -843,6 +833,7 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
843833
if (ret)
844834
return ret;
845835

836+
mt76_npu_queue_setup(dev, q);
846837
ret = mt76_wed_dma_setup(dev, q, false);
847838
if (ret)
848839
return ret;
@@ -870,6 +861,11 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
870861
if (!q->ndesc)
871862
return;
872863

864+
if (mt76_queue_is_npu(q)) {
865+
mt76_npu_queue_cleanup(dev, q);
866+
return;
867+
}
868+
873869
do {
874870
spin_lock_bh(&q->lock);
875871
buf = mt76_dma_dequeue(dev, q, true, NULL, NULL, &more, NULL);
@@ -900,7 +896,7 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
900896
return;
901897

902898
if (!mt76_queue_is_wed_rro_ind(q) &&
903-
!mt76_queue_is_wed_rro_rxdmad_c(q)) {
899+
!mt76_queue_is_wed_rro_rxdmad_c(q) && !mt76_queue_is_npu(q)) {
904900
int i;
905901

906902
for (i = 0; i < q->ndesc; i++)
@@ -920,7 +916,10 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
920916
return;
921917

922918
mt76_dma_sync_idx(dev, q);
923-
mt76_dma_rx_fill_buf(dev, q, false);
919+
if (mt76_queue_is_npu(q))
920+
mt76_npu_fill_rx_queue(dev, q);
921+
else
922+
mt76_dma_rx_fill(dev, q, false);
924923
}
925924

926925
static void

0 commit comments

Comments
 (0)