Commit Graph
4580 Commits
Author SHA1 Message Date
StanleyYP WangandFelix Fietkau 19b5d0918b wifi: mt76: avoid to set ACK for MCU command if wait_resp is not set
When wait_resp is not set but the ACK option is enabled in the MCU TXD,
the ACK event is enqueued to the MCU event queue without being dequeued
by the original MCU command request.

Any orphaned ACK events will only be removed from the queue when another
MCU command requests a response. Due to sequence index mismatches, these
events are discarded one by one until a matching sequence index is found.

However, if several MCU commands that do not require a response continue
to fill up the event queue, there is a risk that when an MCU command with
wait_resp enabled is issued, it may dequeue the wrong event skb,
especially if the queue contains events with all possible sequence
indices.

Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:31:54 +00:00
StanleyYP WangandFelix Fietkau 88ed9f8abc wifi: mt76: mt7996: fix struct mt7996_mcu_uni_event
The cid field is defined as a two-byte value in the firmware.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:31:54 +00:00
Shayne ChenandFelix Fietkau f21748c6cd wifi: mt76: mt7996: fix wrong DMAD length when using MAC TXP
The struct mt76_connac_fw_txp is used for HIF TXP. Change to use the
struct mt76_connac_hw_txp to fix the wrong DMAD length for MAC TXP.

Fixes: cb6ebbdffef2 ("wifi: mt76: mt7996: support writing MAC TXD for AddBA Request")
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:31:54 +00:00
Sean WangandFelix Fietkau 66067d203b wifi: mt76: mt7921: add MT7902 SDIO device support
Register the MT7902 SDIO device ID in the mt7921 driver and add its
corresponding firmware and ROM patch names.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau eaa09af12b wifi: mt76: mt7921: add MT7902 PCIe device support
Register the MT7902 PCI device ID in the mt7921 driver and add its
corresponding firmware and ROM patch names.

Co-developed-by: Xiong Huang <[email protected]>
Signed-off-by: Xiong Huang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau 4b104a082e wifi: mt76: mt792x: add MT7902 WFDMA prefetch configuration
Configure the RX/TX ring prefetch setting for MT7902 PCIe device.

This is a prerequisite patch before enabling MT7902 PCIe support.

Co-developed-by: Xiong Huang <[email protected]>
Signed-off-by: Xiong Huang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau 5ee904252a wifi: mt76: mt7921: add MT7902 MCU support
Add MCU support for the MT7902 chipset.

runtime pm is not yet supported by the driver, but normal mac80211
operation is unaffected.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau cc343793ad wifi: mt76: mt792x: ensure MCU ready before ROM patch download
Restart the MCU and poll FW state to ensure correct MCU status
before downloading the ROM patch.

This is a prerequisite for enabling MT7902 PCIe and has been
validated on MT7921 and MT7925 since they share the common code path.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau 135ebed775 wifi: mt76: mt792x: add PSE handling barrier for the large MCU cmd
Add a dummy register read in mt76_connac_mcu_rate_txpower_band() to act as
a PSE barrier. This would release PSE pages and prevents buffer underflow
issues when handling MCU commands with larger payloads without the response
in mt76_connac_mcu_set_rate_txpower().

This is a prerequisite patch before enabling MT7902 PCIe and SDIO support.

Co-developed-by: Xiong Huang <[email protected]>
Signed-off-by: Xiong Huang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau 2175fa76bf wifi: mt76: connac: mark MT7902 as hw txp devices
Add MT7902 to is_mt76_fw_txp() so it follows the legacy TX descriptor
path like the other connac2 chips that return false.

This is a prerequisite patch before enabling MT7902 pcie support.

Co-developed-by: Xiong Huang <[email protected]>
Signed-off-by: Xiong Huang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau 772c51c2eb wifi: mt76: mt7921: add MT7902e DMA layout support
Add MT7902 PCIe specific DMA layout overrides for MCU TXQ index, RX ring
size, and MCU_WA usage. Common layout remains the default for other chips.

This is a prerequisite patch before enabling MT7902 PCIe support.

Co-developed-by: Xiong Huang <[email protected]>
Signed-off-by: Xiong Huang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau c3d742932a wifi: mt76: mt7921: handle MT7902 irq_map quirk with mutable copy
MT7902 PCIe requires a different wm2_complete_mask value, so introduce a
mutable per-device copy of the default irq_map and override the field
only for this chip. Other devices continue using the shared const
template.

This is a prerequisite patch before enabling MT7902 PCIe support.

Co-developed-by: Xiong Huang <[email protected]>
Signed-off-by: Xiong Huang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau 95df5c5915 wifi: mt76: mt7921: use mt76_for_each_q_rx() in reset path
Replace explicit napi_disable() calls for RX queues with
mt76_for_each_q_rx() in mt7921e_mac_reset().

This removes hardcoded queue indices and disables all configured
RX queues during reset.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
Sean WangandFelix Fietkau f1c3200333 wifi: mt76: connac: use is_connac2() to replace is_mt7921() checks
Unify all per-chip conditionals under the new is_connac2() helper. This
avoids confusion caused by the previous is_mt7921() check, which
implicitly covered multiple connac2 chipsets and no longer reflected its
actual scope. This is a clean-up only change with no functional impact.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 09:29:41 +00:00
StanleyYP WangandFelix Fietkau 36c59c31bf wifi: mt76: mt7996: apply calibration-free data from OTP
Before sending the current EEPROM data to the firmware, read the
calibration-free data (FT data) from the efuse and merge it with
the existing EEPROM data.

Co-developed-by: Shayne Chen <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 08:56:45 +00:00
Shayne ChenandFelix Fietkau f656567eff wifi: mt76: mt7996: add variant for MT7992 chipsets
Introduce VAR_TYPE_24 for the MT7992 chipsets, a dual-band variant
supporting 3T3R/2SS on the 2 GHz band and 5T5R/4SS on the 5GHz band.

Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 08:56:45 +00:00
StanleyYP WangandFelix Fietkau 8831fa78cb wifi: mt76: add external EEPROM support for mt799x chipsets
For the MT7992 and MT7990 chipsets, efuse mode is not supported because
there is insufficient space in the efuse to store the calibration data.
Therefore, an additional on-chip EEPROM is added to address this
limitation.

Co-developed-by: Elwin Huang <[email protected]>
Signed-off-by: Elwin Huang <[email protected]>
Co-developed-by: Shayne Chen <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 08:56:45 +00:00
Felix Fietkau d62f5a0d1d wifi: mt76: update fix for backoff fields and max_power calculation
Fix copy&paste issues in earlier version

Signed-off-by: Felix Fietkau <[email protected]>
2026-02-21 08:53:44 +00:00
Felix Fietkau 9337d2f25d wifi: mt76: avoid sending probe requests on active DFS channels
Stick to beacon wait.

Signed-off-by: Felix Fietkau <[email protected]>
2026-02-20 18:30:28 +00:00
Felix Fietkau 751ae55c0d wifi: mt76: improve fix for multi-radio on-channel scanning
Compare channel frequency instead of pointer to fix 6G.
Fix scanning main operation channel.

Signed-off-by: Felix Fietkau <[email protected]>
2026-02-20 13:41:19 +00:00
Felix Fietkau a34adb961b wifi: mt76: mt7996: add missing max_remain_on_channel_duration
Having this unset breaks remain-on-channel and mgmt TX.
Move setting it to mt76 core to keep it in one place.

Fixes: 69d54ce7491d0 ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Felix Fietkau <[email protected]>
2026-02-04 14:10:50 +00:00
Felix Fietkau a47ad19275 wifi: mt76: mt7996: fix out-of-bounds array access during hardware restart
During hardware restart, link_id can be IEEE80211_LINK_UNSPECIFIED,
causing an out-of-bounds array access on msta->link[].

Add mt7996_sta_link() and mt7996_sta_link_protected() helper functions
for accessing sta links with proper RCU handling and bounds checking.
Use them for any sta link RCU access.

Reported-by: Chad Monroe <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-28 12:38:03 +00:00
Madhur KumarandFelix Fietkau b2fe7f1463 wifi: mt76: mt7921: Replace deprecated PCI function
pcim_iomap_table() and pcim_iomap_regions() have been
deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Madhur Kumar <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-28 11:23:27 +00:00
Allen YeandFelix Fietkau 093280ae5d wifi: mt76: fix backoff fields and max_power calculation
The maximum power value may exist in either the data or backoff field.
Previously, backoff power limits were not considered in txpower reporting.
This patch ensures mt76 also considers backoff values in the SKU table.

For connac2 devices,
- paths-ru = RU26, RU52, RU106, BW20, BW40, BW80, BW160
- paths-ru-bf = RU26, RU52, RU106, BW20, BW40, BW80, BW160

Only the first three entries use 1T1S and do not need index adjustment;
the remaining four require index offset.

Fixes: b05ab4be9fd7 ("wifi: mt76: mt7915: add bf backoff limit table support")
Signed-off-by: Allen Ye <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Link: https://patch.msgid.link/54627282cfb8e5a89fe753da66552c0a084f6387.1769557863.git.ryder.lee@mediatek.com
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-28 11:23:27 +00:00
Chad MonroeandFelix Fietkau 86abd922a4 wifi: mt76: support upgrading passive scans to active
On channels with NO_IR or RADAR flags, wait for beacon before sending
probe requests. Allows active scanning and WPS on restricted channels
if another AP is already present.

Fixes: c56d6edebc1f ("wifi: mt76: mt7996: use emulated hardware scan support")
Signed-off-by: Chad Monroe <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-28 11:18:24 +00:00
Chad MonroeandFelix Fietkau 2596285c6a wifi: mt76: fix multi-radio on-channel scanning
avoid unnecessary channel switch when performing an on-channel scan
using a multi-radio device.

Fixes: c56d6edebc1f ("wifi: mt76: mt7996: use emulated hardware scan support")
Signed-off-by: Chad Monroe <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-28 09:23:17 +00:00
Chad MonroeandFelix Fietkau a5930632e1 wifi: mt76: mt7996: increase txq memory limit to 32 MiB
Prior to this change, both 2G and 6G radios would fall back to the
mac80211 default of 4MB which is not enough for high data rates.

Signed-off-by: Chad Monroe <[email protected]>
Link: https://patch.msgid.link/acfe2e25768b414518be2db22b1d3ba6f5db6fa1.1765203249.git.chad@monroe.io
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:25:27 +00:00
Chad MonroeandFelix Fietkau 07ae843cd4 wifi: mt76: mt7996: reset device after MCU message timeout
Trigger a full reset after MCU message timeout.

Signed-off-by: Chad Monroe <[email protected]>
Link: https://patch.msgid.link/6e05ed063f3763ad3457633c56b60a728a49a6f0.1765203753.git.chad@monroe.io
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:25:24 +00:00
Chad MonroeandFelix Fietkau db0460d663 wifi: mt76: fix deadlock in remain-on-channel
mt76_remain_on_channel() and mt76_roc_complete() call mt76_set_channel()
while already holding dev->mutex. Since mt76_set_channel() also acquires
dev->mutex, this results in a deadlock.

Use __mt76_set_channel() instead of mt76_set_channel().
Add cancel_delayed_work_sync() for mac_work before acquiring the mutex
in mt76_remain_on_channel() to prevent a secondary deadlock with the
mac_work workqueue.

Fixes: a8f424c1287c ("wifi: mt76: add multi-radio remain_on_channel functions")
Signed-off-by: Chad Monroe <[email protected]>
Link: https://patch.msgid.link/ace737e7b621af7c2adb33b0188011a5c1de2166.1765204256.git.chad@monroe.io
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:23:26 +00:00
Sean WangandFelix Fietkau ee961ff91e wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync
roc_abort_sync() can deadlock with roc_work(). roc_work() holds
dev->mt76.mutex, while cancel_work_sync() waits for roc_work()
to finish. If the caller already owns the same mutex, both
sides block and no progress is possible.

This deadlock can occur during station removal when
mt76_sta_state() -> mt76_sta_remove() -> mt7921_mac_sta_remove() ->
mt7921_roc_abort_sync() invokes cancel_work_sync() while
roc_work() is still running and holding dev->mt76.mutex.

This avoids the mutex deadlock and preserves exactly-once
work ownership.

Fixes: 352d966126e6 ("wifi: mt76: mt7921: fix a potential association failure upon resuming")
Co-developed-by: Quan Zhou <[email protected]>
Signed-off-by: Quan Zhou <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:22:11 +00:00
Quan ZhouandFelix Fietkau 7595227241 wifi: mt76: mt7921: fix ROC abort flow interruption in mt7921_roc_work
The mt7921_set_roc API may be executed concurrently with mt7921_roc_work,
specifically between the following code paths:

- The check and clear of MT76_STATE_ROC in mt7921_roc_work:
    if (!test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state))
        return;

- The execution of ieee80211_iterate_active_interfaces.

This race condition can interrupt the ROC abort flow, resulting in
the ROC process failing to abort as expected.

To address this defect, the modification of MT76_STATE_ROC is now
protected by mt792x_mutex_acquire(phy->dev). This ensures that
changes to the ROC state are properly synchronized, preventing
race conditions and ensuring the ROC abort flow is not interrupted.

Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support")
Cc: [email protected]
Signed-off-by: Quan Zhou <[email protected]>
Reviewed-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/2568ece8b557e5dda79391414c834ef3233049b6.1769133724.git.quan.zhou@mediatek.com
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:10:38 +00:00
Leon YenandFelix Fietkau 4b0df538fb wifi: mt76: mt7925: fix tx power setting failure after chip reset
After the chip reset, the procedure to set the tx power will not be
successful because the previous region setting is still remains.
Clear the region setting during MAC initialization and allow it to be
reset to finalize the TX power setting.

Fixes: 3bc62aa4484d ("wifi: mt76: mt7925: add auto regdomain switch support")
Signed-off-by: Leon Yen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:09:58 +00:00
Zilin GuanandFelix Fietkau 7ab500f7db wifi: mt76: Fix memory leak after mt76_connac_mcu_alloc_sta_req()
mt76_connac_mcu_alloc_sta_req() allocates an skb which is expected to
be freed eventually by mt76_mcu_skb_send_msg(). However, currently if
an intermediate function fails before sending, the allocated skb is
leaked.

Specifically, mt76_connac_mcu_sta_wed_update() and
mt76_connac_mcu_sta_key_tlv() may fail, leading to an immediate memory
leak in the error path.

Fix this by explicitly freeing the skb in these error paths.
Commit 7c0f63fe37a5 ("wifi: mt76: mt7996: fix memory leak on
mt7996_mcu_sta_key_tlv error") made a similar change.

Compile tested only. Issue found using a prototype static analysis tool
and code review.

Fixes: d1369e515efe ("wifi: mt76: connac: introduce mt76_connac_mcu_sta_wed_update utility routine")
Fixes: 6683d988089c ("mt76: connac: move mt76_connac_mcu_add_key in connac module")
Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support")
Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Zilin Guan <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-01-27 12:09:04 +00:00
Michael LoandFelix Fietkau f5b57ffab5 wifi: mt76: mt7925: Skip scan process during suspend.
We are experiencing command timeouts because an upper layer triggers
an unexpected scan while the system/device is in suspend.
The upper layer should not initiate scans until the NIC has fully resumed.
We want to prevent scans during suspend and avoid timeouts without harming
power management or user experience.

Signed-off-by: Michael Lo <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:04:49 +00:00
Sean WangandFelix Fietkau efbbfd5af0 wifi: mt76: mt7925: drop puncturing handling from BSS change path
IEEE80211_CHANCTX_CHANGE_PUNCTURING is a channel context change
flag and should not be checked in the BSS change handler, where
the changed mask represents enum ieee80211_bss_change.

Remove the puncturing handling from the BSS path and rely on
mt7925_change_chanctx() to update puncturing configuration.

Fixes: cadebdad959b ("wifi: mt76: mt7925: add EHT preamble puncturing")
Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 12:04:40 +00:00
Shuah KhanandFelix Fietkau c825e8c80a wifi: mt76: Remove blank line after mt792x firmware version dmesg
An extra blank line gets printed after printing firmware version
because the build date is null terminated. Remove the "\n" from
dev_info() calls to print firmware version and build date to fix
the problem.

Reported-by: Mario Limonciello <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2026-01-27 11:59:34 +00:00
Lorenzo BianconiandFelix Fietkau bd9fb7ac97 wifi: mt76: Enable NPU support for MT7996 devices
Enable NPU offloading for MT7990 chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau e826923c53 wifi: mt76: mt7996: Store DMA mapped buffer addresses in mt7996_npu_hw_init()
In order to not always reallocate them during NPU reset, store the DMA
mapped buffer addresses allocated by mt7996_npu_hw_init routine in
mt7996 structure.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 2bc891cc94 wifi: mt76: mt7996: Do not schedule RRO and TxFree queues during reset for NPU
This is a preliminary patch to properly manage reset procedure when NPU
offloading is enabled.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 9ccd49d455 wifi: mt76: Do not reset idx for NPU tx queues during reset
Do not run reset_q callaback with reset_idx set to true for NPU Tx
queues. This is a preliminary patch to properly manage reset procedure
when NPU offloading is enabled.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau d78bce0a15 wifi: mt76: mt7996: Move RRO dma start in a dedicated routine
This is a preliminary patch to properly enable NPU offloading for MT7996
chipset since NPU initialization must be completed before kicking rx
queues.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 56334c1c9b wifi: mt76: mt7996: Add __mt7996_npu_hw_init routine
Introduce __mt7996_npu_hw_init utility routine in order to run it
holding mt76 mutex and move NPU hw re-initialization before restarting
the NAPIs during device reset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 8a02211445 wifi: mt76: mt7996: Integrate MT7990 dma configuration for NPU
Add NPU integration in MT7996 dma codebase for MT7990 chipset.
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 9e10bcac81 wifi: mt76: mt7996: Integrate MT7990 init configuration for NPU
Add NPU integration in MT7996 init codebase for MT7990 chipset.
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau d7a79fcece wifi: mt76: mt7996: Integrate NPU in RRO session management
Add NPU integration in RRO 3.0 session management.
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 01575edfc3 wifi: mt76: mt7996: Add NPU support for MT7990 chipset
Introduce support for MT7990 chipset in MT7996 npu configuration
codebase.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau cdb32a658b wifi: mt76: mt7996: Rename mt7996_npu_rxd_init() in mt7992_npu_rxd_init()
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 853eafe859 wifi: mt76: mt7996: Add mt7992_npu_txrx_offload_init routine
Introduce mt7992_npu_txrx_offload_init utility routine.
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau bc5529c123 wifi: mt76: mt7996: Fix wdma_idx for MT7996 device if NPU is enabled
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00
Lorenzo BianconiandFelix Fietkau 8e94d3266b wifi: mt76: mt7996: Fix BAND2 tx queues initialization when NPU is enabled
Fix BAND2 tx queues initialization for MT7990 chipset when NPU is
enabled. This is a preliminary patch to enable NPU offload for MT7996
(Eagle) chipset.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2026-01-27 11:56:18 +00:00