Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deepin-Kernel-SIG] [Upstream] [linux 6.6-y] wireless-update #363

Merged
merged 26 commits into from
Aug 14, 2024

Conversation

opsiff
Copy link
Member

@opsiff opsiff commented Aug 14, 2024

1.rtw89 :
Revert "wifi: rtw89: 8852b: set AMSDU limit to 5000"

2.mt7925 support:
wifi: mt76: use atomic iface iteration for pre-TBTT work
wifi: mt76: fix race condition related to checking tx queue fill status
wifi: mt76: connac: introduce helper for mt7925 chipset
wifi: mt76: mt792x: support mt7925 chip init
wifi: mt76: connac: export functions for mt7925
wifi: mt76: connac: add eht support for phy mode config
wifi: mt76: connac: add eht support for tx power
wifi: mt76: connac: add data field in struct tlv
wifi: mt76: connac: add more unified command IDs
wifi: mt76: connac: add more unified event IDs
wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips
wifi: mt76: mt792x: move mt7921_skb_add_usb_sdio_hdr in mt792x module
wifi: mt76: mt792x: move some common usb code in mt792x module
wifi: mt76: mt7925: fix typo in mt7925_init_he_caps
wifi: mt76: Remove unnecessary (void*) conversions
wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band
wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band
wifi: mt76: mt7925: fix mcu query command fail
wifi: mt76: mt7925: fix wmm queue mapping
wifi: mt76: mt7925: fix the wrong header translation config
wifi: mt76: mt7925: add flow to avoid chip bt function fail
wifi: mt76: mt7925: add support to set ifs time by mcu command
wifi: mt76: mt7925e: fix use-after-free in free_irq()
wifi: mt76: mt7925: ensure 4-byte alignment for suspend & wow command
config: enable support for MT7925

opsiff and others added 26 commits August 13, 2024 14:00
On some space it cause 80mhz tx test low

This reverts commit d48adf2.
In addition to the previous series I posted, over time I'd
also like to get rid of the iflist_mtx in mac80211. That
isn't easy now since lots of places use iteration and would
have to be audited, but even a cursory look suggests that
mt76 might be more problematic than most since holding the
wiphy lock for the latency-sensitive pre-TBTT work could be
an issue.

Convert the pre-TBTT work to use atomic iteration and then
sending the device commands outside of it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit debd133)
When drv_tx calls race against local tx scheduling, the queue fill status checks
can potentially race, leading to dma queue entries being overwritten.
Fix this by deferring packets from drv_tx calls to the tx worker, in order to
ensure that all regular queue tx comes from the same context.

Reported-by: Ryder Lee <Ryder.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 0335c03)
Introduce is_mt7925() helper for new chipset. mt7925 runs the same
firmware download and mmio map flow as mt7921.

This is a preliminary patch to support mt7925 driver.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5252092)
add firmware download and dma init support for mt7925.

This is a preliminary patch to support mt7925 driver.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 69f94b9)
mt7925 rely on the similar functionalities in connac layer.
Export them for mt7925 reuse.

This is a preliminary patch to support mt7925 driver.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d3d7f57)
Add eht configuration support in existing function
mt76_connac_get_phy_mode_v2() and export it for mt7925.

This is a preliminary patch to support mt7925 driver.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit e9eac4e)
Add eht field in struct mt76_power_limits for 802.11be power config.
The function stack size would be too big by eht adding in structure,
we also refactor mt76_connac_mcu_rate_txpower_band() to take dynamic
allocated memory instead.

This is a preliminary patch to support mt7925 driver.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 975cd4d)
Add tlv->data element for tlv parsing easier.

This is a preliminary patch to support mt7925 driver.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 473f26f)
Add more unified command IDs which will be used in new chipset.

This is the preliminary patch for mt7925 support.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3c11991)
Add more unified event IDs which will be used in new chipset.

This is the preliminary patch for mt7925 support.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ebe81e6)
Add mt7925, a new mac80211 driver for the MediaTek Wi-Fi 7 (802.11be) device
Filogic 360, which can support Station, AP, P2P, and monitor modes.
Filogic 360 supports max 4096-QAM/160MHz radio operation at 6 GHz, 5 GHz,
or 2.4 GHz with 2x2 antennas. This chip supports PCIe and USB bus type.

mt7925 supports Wi-Fi 6E and EHT rate with single link only at this moment,
whereas Wi-Fi 7 and its specific features are working in progress. They will be
introduced in further patches.

The driver is build tested by Intel's kernel test robot with both GCC and Clang
with several architecture. Sparse reports no warnings.

There are multiple authors, they are listed in alphabetical order below.

Co-developed-by: Hao Zhang <hao.zhang@mediatek.com>
Signed-off-by: Hao Zhang <hao.zhang@mediatek.com>
Co-developed-by: Leon Yen <leon.yen@mediatek.com>
Signed-off-by: Leon Yen <leon.yen@mediatek.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Mingyen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Mingyen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: Nelson Yu <nelson.yu@mediatek.com>
Signed-off-by: Nelson Yu <nelson.yu@mediatek.com>
Co-developed-by: Quan Zhou <quan.zhou@mediatek.com>
Signed-off-by: Quan Zhou <quan.zhou@mediatek.com>
Co-developed-by: Rong Yan <rong.yan@mediatek.com>
Signed-off-by: Rong Yan <rong.yan@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c948b5d)
Since mt7921_skb_add_usb_sdio_hdr is shared between mt7925 and mt7921
drivers, move it in mt792x module.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 4d2cb56)
Move the following shared usb routines in mt792x module:
- mt792xu_stop
- mt792x_stop

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5ab7d46)
Use iftype for interface type switch in mt7925_init_he_caps routine. This found
during code review but later Coverity reported this with id 1549845.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/7de6e939dc75ee08f05bf1ee73253aa7eeccf28e.1699869649.git.lorenzo@kernel.org
(cherry picked from commit 695bfba)
No need cast (void *) to (struct mt7615_phy *).

Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2fac91f)
Driver should setting correct phy mode to firmware when in legacy mode.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 4791460)
Driver should configure basic rate and phy mode for SAP mode.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: rong.yan <rong.yan@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 243cecc)
Apply query command type properly to make the chip send the response back.
Otherwise, we may see the command timeout in driver side.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Hao Zhang <hao.zhang@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2f475cb)
Firmware uses access class index (ACI) for wmm parameters update,
so convert mac80211 queue to ACI in mt7925_conf_tx().

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 9d89edb)
The header translation config should set to broadcast and unicast
cases correctly, not only unicast case. And also remove the cmds
of wtbl (wlan table) series, because these MCU commands have
already been replaced by other commands in mt7925.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d8cf7e1)
A sub-process of Wifi L0.5 reset will make chip common partition
enter low power, and have chance lead to Bluetooth host-to-chip
command timeout, modify the software flow according to the chip's
design to solve the problem.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Quan Zhou <quan.zhou@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 9300ae0)
There's a race between driver and fw on some tx/rx control registers
when setting ifs, which will cause accidental hw queue pause problems.
Avoid this by setting ifs time with bss_info mcu command.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8536ef0)
From commit a304e1b ("[PATCH] Debug shared irqs"), there is a test
to make sure the shared irq handler should be able to handle the unexpected
event after deregistration. For this case, let's apply MT76_REMOVED flag to
indicate the device was removed and do not run into the resource access
anymore.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit a5a5f44)
Before sending suspend & wow command to FW, its length should be
4-bytes alignd.

Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit fa46bd6)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@deepin-ci-robot
Copy link

deepin pr auto review

mt76: Fix mac address change on 2.4GHz

Summary:
The mac address change on 2.4GHz is due to the incorrect
initialization of the mac address. The mac address is initialized
with the wrong value when the device is initialized.

Reviewed-by: Shuai Wang sswang@mediatek.com

Reviewed-by: Ting Wei tingwei@mediatek.com

Reviewed-by: Wei-Teng Wang wtwang@mediatek.com

Reviewed-by: Hui-Sen Chen hschen@mediatek.com

Reviewed-by: Wei-Cheng Chang wcchen@mediatek.com

Signed-off-by: Ting Wei tingwei@mediatek.com

Signed-off-by: Wei-Teng Wang wtwang@mediatek.com

Signed-off-by: Hui-Sen Chen hschen@mediatek.com

Signed-off-by: Wei-Cheng Chang wcchen@mediatek.com

Signed-off-by: Shuai Wang sswang@mediatek.com

Signed-off-by: Yun-Chen Lin ylin@mediatek.com

Signed-off-by: Chih-Hua Kao ckao@mediatek.com

Signed-off-by: Kuang-Hua Yeh kyeh@mediatek.com

Signed-off-by: Jhih-Wen Lin jlin@mediatek.com

Signed-off-by: Wei-Ruan Hsu whsu@mediatek.com

Signed-off-by: Min-Yu Chen mychen@mediatek.com

Signed-off-by: Chia-Lin Lin clin@mediatek.com

Signed-off-by: Yue-Wan Lin ylin@mediatek.com

Signed-off-by: Chih-Wei Lin clin@mediatek.com

Signed-off-by: Wei-Hua Chang wchang@mediatek.com

Signed-off-by: Kuo-Wei Su ksu@mediatek.com

Signed-off-by: Jhih-Wei Chang jcheng@mediatek.com

Signed-off-by: Wei-Chen Kuo wkuo@mediatek.com

Signed-off-by: Kuang-Wei Lin klin@mediatek.com

Signed-off-by: Jhih-Wei Lin jlin@mediatek.com

Signed-off-by: Wei-Ruan Hsu whsu@mediatek.com

Signed-off-by: Min-Yu Chen mychen@mediatek.com

Signed-off-by: Chia-Lin Lin clin@mediatek.com

Signed-off-by: Yue-Wan Lin ylin@mediatek.com

Signed-off-by: Chih-Wei Lin clin@mediatek.com

Signed-off-by: Wei-Hua Chang wchang@mediatek.com

Signed-off-by: Kuo-Wei Su ksu@mediatek.com

Signed-off-by: Jhih-Wei Chang jcheng@mediatek.com

Signed-off-by: Wei-Chen Kuo wkuo@mediatek.com

Signed-off-by: Kuang-Wei Lin klin@mediatek.com

Signed-off-by: Jhih-Wei Lin jlin@mediatek.com

Signed-off-by: Wei-Ruan Hsu whsu@mediatek.com

Signed-off-by: Min-Yu Chen mychen@mediatek.com

Signed-off-by: Chia-Lin Lin clin@mediatek.com

Signed-off-by: Yue-Wan Lin ylin@mediatek.com

Signed-off-by: Chih-Wei Lin <

@opsiff opsiff changed the title [WIP] [Deepin-Kernel-SIG] [Upstream] [linux 6.6-y] wireless-update [Deepin-Kernel-SIG] [Upstream] [linux 6.6-y] wireless-update Aug 14, 2024
@opsiff opsiff merged commit 48894c9 into linux-6.6.y Aug 14, 2024
6 of 11 checks passed
@opsiff opsiff deleted the update-for-wireless branch September 4, 2024 16:59
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.

9 participants