Skip to content

Update MTK WiFi drive Part 1/7#1850

Open
gtc199389 wants to merge 50 commits into
deepin-community:linux-6.6.yfrom
gtc199389:pr/mtk-001
Open

Update MTK WiFi drive Part 1/7#1850
gtc199389 wants to merge 50 commits into
deepin-community:linux-6.6.yfrom
gtc199389:pr/mtk-001

Conversation

@gtc199389

Copy link
Copy Markdown

Synchronize the MTK WiFi driver from chromeos-kernel-6.6 and update the MTK WiFi driver to the latest version.

Part 1/7

Link: #1849

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @gtc199389, your pull request is larger than the review limit of 150000 diff characters

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is part 1/7 of a larger MTK WiFi driver sync/update, pulling in changes from chromeos-kernel-6.6 and extending the mt76 stack with MT7992 support and MediaTek WED (including RRO) integration, plus thermal and TX power SKU handling for MT7996/MT7992.

Changes:

  • Add WED offload plumbing across mt76 DMA/MMIO, including RRO queue types and dual-HIF WED handling for MT7996/MT7992.
  • Extend mt7996 driver for MT7992 variant (FW/EEPROM selection, register offset revisions, IRQ bits/queues, PCI init changes).
  • Add thermal (hwmon + cooling device) support and TX power SKU messaging, and add MODULE_DESCRIPTION metadata across multiple mt76 modules.

Reviewed changes

Copilot reviewed 72 out of 72 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
include/linux/soc/mediatek/mtk_wed.h Rename WED RX buffer descriptor type
drivers/net/wireless/mediatek/mt76/util.c Add module description metadata
drivers/net/wireless/mediatek/mt76/usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/sdio.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7996/regs.h Add MT7996/MT7992 offset indirection + new regs
drivers/net/wireless/mediatek/mt76/mt7996/pci.c WED-aware IRQ init + MT7992 firmware list
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h MT7992 support, RRO/thermal structures, API updates
drivers/net/wireless/mediatek/mt76/mt7996/mmio.c Add WED init/reset + WED IRQ masking paths
drivers/net/wireless/mediatek/mt76/mt7996/mcu.h Add thermal/RRO/RA uni-structs + helpers
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c MT7992 FW selection, thermal/RRO handlers, new MCU cmds
drivers/net/wireless/mediatek/mt76/mt7996/main.c Enable thermal protect + TX power SKU updates + WED netdev ops
drivers/net/wireless/mediatek/mt76/mt7996/mac.c WED PPE check path + TX/RX/RRO integration changes
drivers/net/wireless/mediatek/mt76/mt7996/init.c Add thermal hwmon/cooling + WED-aware wiphy init
drivers/net/wireless/mediatek/mt76/mt7996/eeprom.h Add per-band RX path EEPROM fields
drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c MT7992 EEPROM selection + RX path parsing
drivers/net/wireless/mediatek/mt76/mt7996/dma.c WED/RRO queue setup + DMA start/reset refactors
drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c Extend debug output for BW320/EHT
drivers/net/wireless/mediatek/mt76/mt792x.h Add ACPI MTCL config API
drivers/net/wireless/mediatek/mt76/mt792x_usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt792x_core.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt792x_acpi_sar.h Extend ACPI SAR country list struct
drivers/net/wireless/mediatek/mt76/mt792x_acpi_sar.c Add MTCL config lookup helper
drivers/net/wireless/mediatek/mt76/mt7925/usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7925/pci.c Update tx queue init signature + module description
drivers/net/wireless/mediatek/mt76/mt7925/main.c Adjust EHT caps helper signature + module description
drivers/net/wireless/mediatek/mt76/mt7921/usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7921/sdio.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7921/pci.c Update tx queue init signature + RX ring sizing
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h Split MCU ring sizes (WM vs WA)
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c Send MTCL config in CLC request
drivers/net/wireless/mediatek/mt76/mt7921/main.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7915/soc.c Convert to .remove_new() callback
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h Change txpower init API to per-phy
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c Switch to shared mt76 WED helpers + module description
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h Use chainmask for power bound calc
drivers/net/wireless/mediatek/mt76/mt7915/main.c Use shared mt76 net_setup_tc helper
drivers/net/wireless/mediatek/mt76/mt7915/mac.c Use per-phy txpower init API
drivers/net/wireless/mediatek/mt76/mt7915/init.c Refactor txpower init per-phy + init-time call
drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c Load precal via MTD then NVMEM fallback
drivers/net/wireless/mediatek/mt76/mt7915/dma.c WED queue plumbing cleanup + shared DMA reset helper
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x02_util.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c Update tx queue init signature
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7615/usb.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7615/soc.c Convert to .remove_new() callback
drivers/net/wireless/mediatek/mt76/mt7615/sdio.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7615/mmio.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7615/main.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7615/dma.c Update tx queue init signature
drivers/net/wireless/mediatek/mt76/mt7603/soc.c Convert to .remove_new() callback
drivers/net/wireless/mediatek/mt76/mt7603/main.c Add module description metadata
drivers/net/wireless/mediatek/mt76/mt7603/dma.c Update tx queue init signature
drivers/net/wireless/mediatek/mt76/mt76.h Add WED-RRO queue types + new helper APIs
drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h Add TXD6 fixed BW/MSDU CNT v2 + TXP fields
drivers/net/wireless/mediatek/mt76/mt76_connac2_mac.h Add TXS format constants
drivers/net/wireless/mediatek/mt76/mt76_connac.h Add is_mt7992() + WED arg for tx queues
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h Add thermal/fixed-rate-table/RRO event IDs
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c Treat MT7992 like MT7996 for patch addr
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c WED-aware tx queue init + TXS filtering changes
drivers/net/wireless/mediatek/mt76/mmio.c Add shared mt76 WED RX buffer/offload helpers
drivers/net/wireless/mediatek/mt76/mac80211.c DTS LED-disable handling + shared WED tc setup helper
drivers/net/wireless/mediatek/mt76/eeprom.c Split OF data fetch into MTD/NVMEM helpers
drivers/net/wireless/mediatek/mt76/dma.h Add WED-RRO desc + drop logic + DMA reset helper
drivers/net/wireless/mediatek/mt76/dma.c WED pointer per-queue + RRO ring handling + dual WED detach
drivers/net/ethernet/mediatek/mtk_wed.c Update RX buffer descriptor type name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3749 to +3759
struct sk_buff *skb;
int ret;

ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL),
&req, sizeof(req), true, &skb);
if (ret)
return ret;

res = (void *)skb->data;

return le32_to_cpu(res->temperature);
Comment on lines +323 to +326
wed->wlan.base = devm_ioremap(dev->mt76.dev,
pci_resource_start(pci_dev, 0),
pci_resource_len(pci_dev, 0));
wed->wlan.phy_base = pci_resource_start(pci_dev, 0);
Comment on lines +201 to +202
if (path != rx_path)
phy->has_aux_rx = true;
Comment on lines +375 to +380
static const char * const cc_list_eu[] = {
"AT", "BE", "BG", "CY", "CZ", "HR", "DK", "EE",
"FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT",
"LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL",
"PT", "RO", "MT", "SK", "SI", "ES", "CH",
};
Comment on lines 368 to 370
phy->slottime = 9;
phy->beacon_rate = -1;

Comment on lines +61 to +62
/* display in millidegree celcius */
return sprintf(buf, "%u\n", temperature * 1000);
Comment on lines +94 to +97
dev_err(phy->dev->mt76.dev,
"temp1_max shall be 10 degrees higher than temp1_crit.");
mutex_unlock(&phy->dev->mt76.mutex);
return -EINVAL;
moore-bros and others added 25 commits June 12, 2026 11:34
We actually don't need the reserve the 512 entries for the MCU firmware
download Rx queue because the queue was only used in the firmware download
phase to save the most of space and the reduction can significantly help
with reducing latency we spent by ~20% further in resetting the Rx queue
as the device was waking up from deep sleep mode.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 4812ba9)

BUG=b:316960866, b:296867363
TEST=build and run kernelnext on nissa

Change-Id: I01559dbc96c7bd6fde12ea42d6deb117d3b1f86c
Signed-off-by: David Ruth <druth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5319271
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Lalith Rajendran <lalithkraj@google.com>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add ability to explicitly forbid LED registration using DT led\status = "disabled".

Tested-by: Alexey D. Filimonov <alexey@filimonic.net>
Signed-off-by: Alexey D. Filimonov <alexey@filimonic.net>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 14cdeaf
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I1bca046b5cc1d92cfb52b34c3896c6aacd1fafff
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486323
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
The mtcl table, configured by platform vendor, provides regulatory
information for 5.9/6 GHz channels. mt792x should work on
corresponding channels supported by mtcl. This patch would parse
the settings in mtcl table and apply the result into chip side.

Signed-off-by: Rong Yan <rong.yan@mediatek.com>
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ce18572
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I8c1b77bf6544e80eb98e74a334c7455c1f4c3e0b
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486324
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Limit support for precal loading for mt7915 only to MTD. Passing data
from DT doesn't support offset and NVMEM require a different cell name
and doesn't support offset hence only MTD way is actually supported.

Rename mt76_get_of_eeprom_from_mtd to mt76_get_of_data_from_mtd as it is
now used for a more generic purpose and export it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit a6342c3
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I2503d9f1dc0b412a8dcff94a80d46a2b017ae3b2
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486326
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Since mt76_get_of_eeprom is not used by mt7915 anymore, unexport it and
make it static again.

Also drop offset arg as it's only supported for MTD and was always set
to 0, hardcode the MTD functio instead.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3d96764
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ifefa1de24529f3536b0211811589361b720da57d
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486327
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Generilize mt76_get_of_eeprom_from_nvmem to use alternative cell name by
passing the cell name as an arg and expose it.

Rename it to mt76_get_of_data_from_nvmem to better reflect the now more
generic usage.

This is to permit driver to load additional cell, like precal cell.

Tested-by: Shiji Yang <yangshiji66@outlook.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit a1f5768
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ie67345874f370b265afbd7010efa5dc4d32b217d
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486328
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Permit to load precal from NVMEM cell for mt7915. The NVMEM cell must be
named "precal" to be correctly loaded.

NVMEM cell must already account the correct offset and be placed after
the EEPROM as the function expect the data right from the start.

Tested-by: Shiji Yang <yangshiji66@outlook.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit fdddaa5
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ie70a2d79f3f70c10e217571996f5c7530a6c0e49
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486329
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Rename mtk_rxbm_desc structure in mtk_wed_bm_desc since it will be used
even on tx side by MT7988 SoC.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit bafd764
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ia1e03439c3058566fb2e3f59e61d47fa31da2ace
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486331
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
…code

Move mt76_mmio_wed_init_rx_buf and mt76_mmio_wed_release_rx_buf routines
in common code.
This is a preliminary patch to introduce WED support for mt7996

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit b92158a
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I7e789aa3b9bec0c33c1d7647dedae92b17aacc6c
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486332
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
mt76_mmio_wed_offload_enable and mt76_mmio_wed_offload_disable routines
will be reused by mt7996 driver for wed support.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5f60735
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I90e73a5145330a0f7be3a07a10e7ed4911c0115b
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486333
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
This is a preliminary patch to introduce WED support for mt7996

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ac46598
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I6e6053d1a392165e45974775429363748a5e5747
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486334
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
This is a preliminary patch to introduce WED support for mt7996

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 132d74d
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I14ccb5debe88dbda4a80af05c4579f8d5b83fa11
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486335
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Introduce mtk_wed_device pointer in mt76_queue structure in order to
configure WED chip.
Get rid of dev parameter in Q_READ and Q_WRITE macros.
Introduce wed parameter to the following routine signatures:
- mt76_init_queue
- mt76_init_tx_queue

This is a preliminary patch to introduce WED support for mt7996 since
mt7996 runs two separate WED chips.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2e420b8
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Id435cc63110fa0265df64ae12baf1569916f5d69
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486336
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
This is a preliminary patch to introduce WED support for mt7996

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit af8d2af
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I38f991c2c02753081395da8beb0d12988ed2244b
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486337
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Similar to MT7915, enable Wireless Ethernet Ditpatcher for MT7996
to offload traffic received from the LAN nic and transmitted on the
WLAN one

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 83eafc9
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I5eb1c16ed4a5a6ace7c212c10cd12f342df2fc14
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486338
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
This is a preliminary patch to introduce WED support for mt7996

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5bb7a65
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I495a17a44f10077039ebac0b34421ea4062777de
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486339
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
…ture

This is a preliminary patch to introduce WED rx support for mt7996
driver.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit b8b36f4
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I4118dc057ebd10201becf7739afa4fd1881a0987
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486340
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Similar to MT7915, enable Wireless Ethernet Ditpatcher for MT7996
to offload traffic received from the WLAN nic and transmitted on the
LAN one

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 950d0ab
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I13844f6a0d32720c9ad693bdeb9e4172f8ba9569
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486341
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Move WED reset code shared between mt7915 and mt7996 in common module.
This is a preliminary patch to introduce WED reset support for mt7996.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d4b85af
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Iaf334245b9918a4cc2160ed4399a1c55eef4addb
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486342
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Introduce the capability to reset mt7996 chipset if requested by wed
driver.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 00d2ced
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I1ab037b3f16320fb82a1165375f1b685e6bf797e
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486343
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Introduce the capability to clear WED rro session configured in the hw
according to the event reported by the MCU firmware

Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit a5d028d
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ic59c20693968346472a879c5ce51f8c5c2681e6e
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486344
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add support to correctly configure the rx chainmask of variants that
have additional auxiliary RX path. e.g., 4T5R.
The auxiliary RX path is transparent to driver, but driver needs to
correctly configure it in the set channel fw command.

Co-developed-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit af28257
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I8e02114361bf70e29232288c4cec9ae14be4956c
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486345
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add EHT statistics of beamforming feedback and BW320 in debugfs tx_stats
command.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 0afb228
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I252a3b909df0f8b8633fa97969e19febeb169e78
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486346
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Implement thermal protection commands and support Linux cooling device
control for mt7996 chipsets.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 21f2908
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ib913859bad10fcab6a1a61c7e111d56460659750
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486347
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
This patch adds support for thermal sensor device, including the
following features:
- Support to read current chip temperature.
- Support to set/get the trigger/restore temperature for thermal service.
- Support to read current chip tx cycle.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 6879b2e
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I907156bad4f96f997553a4c016a0eea7a2a5c792
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486348
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
StanleyYP Wang and others added 25 commits June 12, 2026 11:34
For connac3 chipsets, setting of spe_idx is moved from TX descriptor to
the fixed rate table. This patch implements the setting to support
duplicate TX mode for beacon.

Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 254ab81
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I1efe46f30a2316427f1784847530f8eec64c8493
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486349
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Refactor and update dma prefetch parts and also split band 1 traffic to
PCIe 1 to enhance throughput.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit de2a41c
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ie2d7157609c36a6086f0f7500eec427cf1237d2b
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486350
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
…frames

Always set the fixed_bw bitfield for fixed rate frames to keep it being
sent with specific bandwidth. Without this change, the bw of fixed rate
frames will still be decided by hardware.

Reported-by: Chank Chen <chank.chen@mediatek.com>
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 4ef49d1
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I3c92a7c5133872d14bda704f620d2ee289723828
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486351
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Make mt7996_mcu_set_fixed_field() non-static in order to handle
IEEE80211_RC_SMPS_CHANGED in mt7996_mac_sta_rc_work().

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8c8f77e
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Idb7382f28f497d324414b1baeeb813584558090a
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486352
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Use the new fixed rate command format to let the fixed field function
work normally.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 22f5dc7
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I7fee0aafde6fd2f641dcf22bc5cb3e27b027b718
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486353
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Use per-phy structure for maximum txpower value initializing, since each
phy may have a different chainmask, which can impact the calculation of
power gain.

Co-developed-by: Allen Ye <allen.ye@mediatek.com>
Signed-off-by: Allen Ye <allen.ye@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 11a60bd
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ie5b7dee1c337c48572bc51e1b0bbbc0adbb5095b
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486354
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add support for setting txpower from upper layer and configuring per-rate
txpower limit table.

Co-developed-by: Allen Ye <allen.ye@mediatek.com>
Signed-off-by: Allen Ye <allen.ye@mediatek.com>
Co-developed-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit f75e477
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ibd2cfe9e05b4bb0dc770e7abe62e96f09ca91835
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486355
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
The power gain value is related to total TX path, so change the
calculation to use per-phy chainmask.

Signed-off-by: Allen Ye <allen.ye@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 1e12f0f
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Id078672ba79b68f9ac5676b8696015f6534b1358
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486356
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
During runtime, the GI value in the WTBL is not updated in real-time. To
obtain the latest results for the TX GI, switch to use an MCU command.

Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d57e1b2
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: If1c8b9bdc6676f25ef80888877d72857df8821d6
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486357
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add sta_rec_ht_uni struct to pass HT ampdu params to firmware. For VHT,
HE, and EHT mode, firmware will get the ampdu params by parsing the
corresponding capability.

Co-developed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit b769f7d
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ia7885bf2182b5ba6d10b81698ea8555d96dabc16
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486359
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Replace dbdc_support and tbtc_support with mt7996_band_valid() to
support mt7996 variants with band0/band2 dual-band support.
This changes reduces ambiguity when checking supported bands on different
variants or new chipsets, as well as during the init configurations on
DMA TX/RX queues or irq masks.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 1e1e563
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ib332671e678d4c18da4df5ee4277a6b6eb87cb96
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486362
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Support firmware download and enable related AFE PLL for mt7992 chipsets.
This is a preliminary patch for mt7992 chipsets support.

Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Co-developed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit a63b75a
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ifc8588435f1b3a7409c379ab0c364555d28d0e74
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486363
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add DMA TX/RX queues and RRO init flow for mt7992 chipsets.
This is a preliminary patch for mt7992 chipsets support.

Co-developed-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Co-developed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 9fe6690
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I621f9739a6d8217cc938d6b11f5913a341f2186b
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486364
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add mt7992_offs to differentiate registers that share the same
definitions with mt7996 chipsets but have differnet offsets.
This is a preliminary patch for mt7992 chipsets support.

Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 50fbebf
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Ib415716284dc4ec74b71098dccbb36b81bf09b5e
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486365
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add the default eeprom and 0x7992 check to mt7996_check_eeprom().
This is a preliminary patch for mt7992 chipsets support.

Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2cbbefd
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I2a0d697ff3ca490445a45783c20c882fddf00827
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486366
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
MT7992 chipsets support up to 32 interfaces (with maximum 19 per-band)
and 512 station entries.
This is a preliminary patch for mt7992 chipsets support.

Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8df63a4
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: If943f97a4744591c7c68012d87644a0feed19fe8
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486367
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Add MT_TXD6_MSDU_CNT_V2 bitfield, which is used by mt7992 chipsets.
This is a preliminary patch for mt7992 chipsets support.

Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 408566d
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I2845bc4f80284cb070e22a380f6d327b9070d151
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486368
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Get rid of nl80211_iftype from mt7925_init_eht_caps routine signature
since it is not actually used.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 170a896
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I101196215f65798d5d3db4a124c7cc9e9b2d23d0
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486369
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert the three mt76 drivers from always returning zero in
the remove callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d079746
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I07d2c8e807df22a51d4e442b44ec626ee3df1eda
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486370
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
… 4GB of RAM

Introduce the capability to run mt7996 driver on boards with more than
4GB of memory.

Co-developed-by: Rex Lu <rex.lu@mediatek.com>
Signed-off-by: Rex Lu <rex.lu@mediatek.com>
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 4920a3a
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Iff7c423a0758d1202bf58a2d68c479217e124acc
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486371
Reviewed-by: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
…arnings

Transform zero-length arrays `rate`, `adm_stat` and `msdu_cnt` into
proper flexible-array members in anonymous union in `struct
mt7996_mcu_all_sta_info_event` via the DECLARE_FLEX_ARRAY()
helper; and fix multiple -Warray-bounds warnings:

drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:544:61: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:551:58: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:553:58: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:530:61: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:538:66: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:540:66: warning: array subscript <unknown> is outside array bounds of 'struct <anonymous>[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:520:57: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=]
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript <unknown> is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=]

This results in no differences in binary output, helps with the ongoing
efforts to globally enable -Warray-bounds.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/ZXiU9ayVCslt3qiI@work
(cherry picked from commit 40d51f7
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I32d2535373f7c5a4420486f2ea998a8a3f8f6909
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486375
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the MediaTek mt76 drivers.

Here is a sorted list of descriptions. It might make the reviewing
process easier.

	MODULE_DESCRIPTION("MediaTek MT7603E and MT76x8 wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7615E and MT7663E wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7615E MMIO helpers");
	MODULE_DESCRIPTION("MediaTek MT7663 SDIO/USB helpers");
	MODULE_DESCRIPTION("MediaTek MT7663S (SDIO) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7663U (USB) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT76x02 helpers");
	MODULE_DESCRIPTION("MediaTek MT76x02 MCU helpers");
	MODULE_DESCRIPTION("MediaTek MT76x0E (PCIe) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT76x0U (USB) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT76x2 EEPROM helpers");
	MODULE_DESCRIPTION("MediaTek MT76x2E (PCIe) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT76x2U (USB) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT76x connac layer helpers");
	MODULE_DESCRIPTION("MediaTek MT76x EEPROM helpers");
	MODULE_DESCRIPTION("MediaTek MT76x helpers");
	MODULE_DESCRIPTION("MediaTek MT76x SDIO helpers");
	MODULE_DESCRIPTION("MediaTek MT76x USB helpers");
	MODULE_DESCRIPTION("MediaTek MT7915E MMIO helpers");
	MODULE_DESCRIPTION("MediaTek MT7921 core driver");
	MODULE_DESCRIPTION("MediaTek MT7921E (PCIe) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7921S (SDIO) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7921U (USB) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7925 core driver");
	MODULE_DESCRIPTION("MediaTek MT7925E (PCIe) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT7925U (USB) wireless driver");
	MODULE_DESCRIPTION("MediaTek MT792x core driver");
	MODULE_DESCRIPTION("MediaTek MT792x USB helpers");
	MODULE_DESCRIPTION("MediaTek MT7996 MMIO helpers");

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240130104243.3025393-10-leitao@debian.org
(cherry picked from commit f3f8f05
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Iebd4cce2131980ecb2faad9d14bd1f5d7e919539
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486376
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Copy cck and ofdm separately in order to avoid __read_overflow2_field
warning.

Fixes: f75e477 ("wifi: mt76: mt7996: add txpower setting support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240203132446.54790-1-nbd@nbd.name
(cherry picked from commit 0647903
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I78014807bff6e600b882d261d187bd83dfcd329a
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486377
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Commit-Queue: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
When using fixed rate, HW uses txd DW9 to store tx arrivial time if VTA
is set. It would overwrite the msdu_id in txd and lead to token pending
if amsdu is enable.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 775cf70
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: I841a57d22a6f9dca8d7ef85bfcb13fa925f62e9a
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486378
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
The PPDU TxS does not include the error bit so it cannot use to report
status to mac80211.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 6178554
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:337131500
TEST=Build against all mt76 drivers successfully

Change-Id: Iafbe89e3ad11f790610a77931dc33c291eb97103
Signed-off-by: Sean Wang <objelf@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5486379
Commit-Queue: David Ruth <druth@chromium.org>
Tested-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Jintao Lin <jintaolin@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: David Ruth <druth@chromium.org>
Signed-off-by: goutongchen <goutongchen@uniontech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.