Skip to content

Integrate linux-seco-mtk/oleksii/upstream-wifi

GitBot requested to merge linux-seco-mtk/oleksii/upstream-wifi into kirkstone

Commit: clea-os/bsp/mediatek/linux-seco-mtk@749fe11c

UPSTREAM: ieee80211: add power type definition for 6 GHz

6 GHz regulatory domains introduces different modes for 6 GHz AP operations: Low Power Indoor (LPI), Standard Power (SP) and Very Low Power (VLP). 6 GHz STAs could be operated as either Regular or Subordinate clients. Define the flags for power type of AP and STATION mode.

Signed-off-by: Wen Gong wgong@codeaurora.org Link: https://lore.kernel.org/r/20210924100052.32029-2-wgong@codeaurora.org Signed-off-by: Johannes Berg johannes.berg@intel.com (cherry picked from commit 405fca8a946168e71c04b82cc80727c3ea686e08)

BUG=b:232096343 TEST=emerge-herobrine chromeos-kernel-5_15; deploy and test basic WiFi functionality on herobrine device

Signed-off-by: Kevin Lund kglund@google.com Change-Id: I293422cb9ccfdc0291b98a7f4297671a08515e6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3654329 Reviewed-by: Sean Paul seanpaul@chromium.org Reviewed-by: Abhishek Kumar kuabhs@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@81c3c01b

FROMLIST: wifi: mt76: mt7921s: fix potential hung tasks during chip recovery

During chip recovery (e.g. chip reset), there is a possible situation that kernel worker reset_work is holding the lock and waiting for kernel thread stat_worker to be parked, while stat_worker is waiting for the release of the same lock. It causes a deadlock resulting in the dumping of hung tasks messages and possible rebooting of the device.

This patch prevents the execution of stat_worker during the chip recovery.

Signed-off-by: Leon Yen leon.yen@mediatek.com Signed-off-by: Ming Yen Hsieh MingYen.Hsieh@mediatek.com (am from https://patchwork.kernel.org/patch/13585273/) (also found at https://lore.kernel.org/r/20240307094632.21638-1-mingyen.hsieh@mediatek.com)

BUG=b:178754244, b:322751430 UPSTREAM-TASK=b:328677463 TEST=build on corsola

Change-Id: I3602c958e910baf6bc408d274128a165222f76a7 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5355151 Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: Hsin-Yi Wang hsinyi@chromium.org Tested-by: Michael Lo michael.lo@mediatek.corp-partner.google.com Commit-Queue: Pin-yen Lin treapking@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@ec534364

FROMLIST: wifi: mt76: fix the issue of missing txpwr settings from ch153 to ch177

Because the number of channels to be configured is calculated using the %, and it results in 0 when there's an exact division, this leads to some channels not having their tx power configured.

Fixes: ("wifi: mt76: mt7921: enable set txpower for UNII-4") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com (am from https://patchwork.kernel.org/patch/13548079/) (also found at https://lore.kernel.org/r/20240207033123.26551-1-mingyen.hsieh@mediatek.com)

BUG=b:178754244, b:317826928 UPSTREAM-TASK=b:328677630 TEST=build on corsola

Change-Id: I204f32734bb9adb803f04da396457a3d053d76b1 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5314522 Tested-by: Michael Lo michael.lo@mediatek.corp-partner.google.com Reviewed-by: Hsin-Yi Wang hsinyi@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: Pin-yen Lin treapking@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@5e4cab67

BACKPORT: wifi: mt76: mt7921: reduce the size of MCU firmware download Rx queue

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 4812ba9ab9408f3aa5bcbb4ff80ddca84611ea17)

Conflicts: drivers/net/wireless/mediatek/mt76/mt7921/pci.c

BUG=b:296867363 TEST=build and run kernelnext on skyrim

Change-Id: Ib41483de4a06061b4df9f39ead1c6fb033ba1265 Signed-off-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5320923 Reviewed-by: Tim Van Patten timvp@google.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@7244d28c

BACKPORT: FROMLIST: wifi: mt76: mt7921: fix a potential association failure upon resuming

In multi-channel scenarios, the granted channel must be aborted before suspending. Otherwise, the firmware will be put into a wrong state, resulting in an association failure after resuming. With this patch, the granted channel will be aborted before suspending if necessary.

Signed-off-by: Leon Yen leon.yen@mediatek.com Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com (am from https://patchwork.kernel.org/patch/13546876/) (also found at https://lore.kernel.org/r/20240206085304.13059-1-mingyen.hsieh@mediatek.com)

UPSTREAM-TASK=b:325534143

Conflicts: The name of the struct mt7921_dev has changed to mt792x_dev and the location of the function mt7921s_suspend in pci.c, sdio.c

BUG=b:319948034 TEST=fix a potential association failure upon resuming

Change-Id: Ib1d2dc1b042e6a589019f57062c679b80ad40327 Signed-off-by: Arowa Suliman arowa@google.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5302740 Tested-by: Arowa Suliman arowa@chromium.org Commit-Queue: Arowa Suliman arowa@chromium.org Reviewed-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@54c61d09

wifi: mt76: fix broken precal loading from MTD for mt7915

Commit ("mt76: mt7915: add support for applying pre-calibration data") was fundamentally broken and never worked.

The idea (before NVMEM support) was to expand the MTD function and pass an additional offset. For normal EEPROM load the offset would always be 0. For the purpose of precal loading, an offset was passed that was internally the size of EEPROM, since precal data is right after the EEPROM.

Problem is that the offset value passed is never handled and is actually overwrite by

offset = be32_to_cpup(list);
ret = mtd_read(mtd, offset, len, &retlen, eep);

resulting in the passed offset value always ingnored. (and even passing garbage data as precal as the start of the EEPROM is getting read)

Fix this by adding to the current offset value, the offset from DT to correctly read the piece of data at the requested location.

Cc: stable@vger.kernel.org Fixes: ("mt76: mt7915: add support for applying pre-calibration data") Signed-off-by: Christian Marangi ansuelsmth@gmail.com Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@278e34fd

BACKPORT: FROMLIST: wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend

Before entering suspend, we need to ensure that all MCU command are completed. In some cases, such as with regd_notifier, there is a chance that CLC commands, will be executed before suspend.

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Leon Yen leon.yen@mediatek.com (am from https://patchwork.kernel.org/patch/13520345/) (also found at https://lore.kernel.org/r/20240116024857.9071-5-mingyen.hsieh@mediatek.com/)

Conflicts: drivers/net/wireless/mediatek/mt76/mt7921/init.c drivers/net/wireless/mediatek/mt76/mt792x.h

Backport Notes: Move changes from mt7921x.h to mt7921.h

BUG=b:178754244, b:288986622 UPSTREAM-TASK=b:319073641 TEST=build on corsola

Change-Id: Ia79fa2aa4b8f67a6035acd437e3ded13d16a5696 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5142376 Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5202987

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@87eb74b4

Revert "BACKPORT: FROMLIST: wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend"

to update the newer verstion fromlist patch.

BUG=b:178754244 TEST=emerge-corsola sys-kernel/chromeos-kernel-5_15;

Change-Id: I237a9c6935767a3c0d138a1c9e2698fe7c09a0c3 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5202986 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@2e9312a5

FROMLIST: wifi: mt76: mt792x: add the illegal value check for mtcl table of acpi

The mtcl table provided regulatory information for 5.9/6Ghz channels and configured by platform venders. So, sometimes vendors may write illegal values, and therefore it is necessary to check and add corresponding handling for such cases.

Signed-off-by: Leon Yen leon.yen@mediatek.com Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com (am from https://patchwork.kernel.org/patch/13516791/) (also found at https://lore.kernel.org/r/20240111061856.16370-1-mingyen.hsieh@mediatek.com)

BUG=b:178754244, b:288986622 UPSTREAM-TASK=b:319073641 TEST=build on cherry

Change-Id: I514f296edd41ac0734b4aea5e17e1767875f64de Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5190174 Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@8ea55e5c

UPSTREAM: wifi: mt76: mt7921s: fix workqueue problem causes STA association fail

The ieee80211_queue_work function queues work into the mac80211 local->workqueue, which is widely used for mac80211 internal work processes. In the mt76 driver, both the mt76-sido-status and mt76-sdio-net threads enqueue workers to the workqueue with this function. However, in some cases, when two workers are enqueued to the workqueue almost simultaneously, the second worker may not be scheduled immediately and may get stuck for a while. This can cause timing issues. To avoid these timing conflicts caused by worker scheduling, replace the worker with an independent thread.

BUG=b:178754244, b:188614537 TEST=build on cherry

Change-Id: I2deb7fa1939969a5288434ba91e2302b2c18c15d Signed-off-by: Wang Zhao wang.zhao@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Linux Patches Robot linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@c0b1df2a

FROMLIST: wifi: mt76: mt792x: update the country list of EU for ACPI SAR

This patch updates the EU country list to ensure the MTCL table works correctly.

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Leon Yen leon.yen@mediatek.com (am from https://patchwork.kernel.org/patch/13499713/) (also found at https://lore.kernel.org/r/20231220092138.12830-5-mingyen.hsieh@mediatek.com)

BUG=b:178754244, b:288986622 UPSTREAM-TASK=b:319073641 TEST=build on corsola

Change-Id: Id629c42a7a1e6688e295043c205f05b65f0885f5 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5142378 Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d721420c

BACKPORT: FROMLIST: wifi: mt76: mt792x: fix a potential loading failure of the 6Ghz channel config from ACPI

In some case, the MTCL table will exist, but MTDS table will not. So the SAR will init fail. This patch make MTCL and MTDS can exist with no dependence.

Fixes: ("mt76: mt7921: introduce ACPI SAR support") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Leon Yen leon.yen@mediatek.com (am from https://patchwork.kernel.org/patch/13499714/) (also found at https://lore.kernel.org/r/20231220092138.12830-4-mingyen.hsieh@mediatek.com)

Conflicts: drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c

Backport Notes: Rename mt792x_acpi_read to mt7921_acpi_read, Rename mt792x_asar_acpi_read_mtcl to mt7921_asar_acpi_read_mtcl

BUG=b:178754244, b:288986622 UPSTREAM-TASK=b:319073641 TEST=build on corsola

Change-Id: I30480f31dec3856cb9ebf78032ecef42e877efa5 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5142377 Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@6a4ff755

BACKPORT: FROMLIST: wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend

Before entering suspend, we need to ensure that all MCU command are completed.In some cases, such as with regd_notifier, there is a chance that CLC commands,will be executed before suspend.

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Leon Yen leon.yen@mediatek.com (am from https://patchwork.kernel.org/patch/13503101/) (also found at https://lore.kernel.org/r/20231222085338.4530-5-mingyen.hsieh@mediatek.com)

Conflicts: drivers/net/wireless/mediatek/mt76/mt7921/init.c drivers/net/wireless/mediatek/mt76/mt792x.h

Backport Notes: Move changes from mt7921x.h to mt7921.h

BUG=b:178754244, b:288986622 UPSTREAM-TASK=b:319073641 TEST=build on corsola

Change-Id: Idde1595c86ee3874178b1c5b553c5093c8e023a8 Signed-off-by: Sean Wang objelf@gmail.com Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@56be1bb4

FROMLIST: wifi: mt76: mt7921: fix incorrect type conversion for CLC command

clc->len is defined as 32 bits in length, so it must also be operated on with 32 bits, not 16 bits.

Fixes: ("wifi: mt76: mt7921: fix country count limitation for CLC") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Leon Yen leon.yen@mediatek.com Reported-by: kernel test robot lkp@intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp@intel.com/ (am from https://patchwork.kernel.org/patch/13499711/) (also found at https://lore.kernel.org/r/20231220092138.12830-2-mingyen.hsieh@mediatek.com)

BUG=b:178754244, b:288986622 UPSTREAM-TASK=b:319073641 TEST=build on cherry

Change-Id: I1b2bc26c82be23727abfb44b351c87b35cce8e91 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5142375 Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@615a88af

FROMGIT: wifi: mt76: mt7921: fix wrong 6Ghz power type

To avoid using incorrect 6g power settings after disconnection, it should to update back to the default state when disconnected.

Fixes: ("wifi: mt76: mt7921: add 6GHz power type support for clc") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 10f2903147ed04784522ab841c20bb469bdd8681 https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git for-next)

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: Id9b6cabb08e04d012cd5adce95e6fa44da06babb Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5064831 Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@c99e19bd

BACKPORT: FROMGIT: wifi: mt76: mt7921: fix CLC command timeout when suspend/resume

When enter suspend/resume while in a connected state, the upper layer will trigger disconnection before entering suspend, and at the same time, it will trigger regd_notifier() and update CLC, causing the CLC event to not be received due to suspend, resulting in a command timeout.

Therefore, the update of CLC is postponed until resume, to ensure data consistency and avoid the occurrence of command timeout.

Fixes: ("wifi: mt76: mt7921: get regulatory information from the clc event") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit d0a2bc5fe712217d2c73822ae75fd4e69a15cb2c https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git for-next)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/init.c Backport Notes: struct mt792x_dev is not available in k5.15 so we used struct so we made the corresponding changes to struct mt7921_dev instead.

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: I3ea8496f10a6a9924f33257da8f7f44994a7bc69 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5064830 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@5ef261d6

FROMGIT: wifi: mt76: mt7921: fix country count limitation for CLC

Due to the increase in the number of power tables for 6Ghz on CLC, the variable nr_country is no longer sufficient to represent the total quantity. Therefore, we have switched to calculating the length of clc buf to obtain the correct power table. Additionally, the version number has been incremented to 1.

Fixes: ("wifi: mt76: mt7921: introduce Country Location Control support") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit fa6ad88e023ddfa6c5dcdb466d159e89f451e305 https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git for-next)

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: I2ab67d88a37985b0c15ba947abe33e1de1a4bf1c Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5064829 Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@345ac1fc

UPSTREAM: wifi: mt76: mt7921: fix 6GHz disabled by the missing default CLC config

No matter CLC is enabled or disabled, the driver should initialize the default value 0xff for channel configuration of CLC. Otherwise, the zero value would disable channels.

Reported-and-tested-by: Ben Greear greearb@candelatech.com Fixes: ("wifi: mt76: mt7921: update the channel usage when the regd domain changed") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Kalle Valo kvalo@kernel.org

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: Iaf8300999043da1be2b50e7adf01832beb984967 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d731a0c0

UPSTREAM: wifi: mt76: mt7921: fix kernel panic by accessing invalid 6GHz channel info

When the chip not support 6GHz capability, the channels of 6GHz information should not be updated. This caused a crash:

[ 19.442078] Unable to handle ... 0000000000000014 [ 19.457535] Mem abort info: [ 19.465329] ESR = 0x0000000096000004 [ 19.473295] EC = 0x25: DABT (current EL), IL = 32 bits [ 19.482354] SET = 0, FnV = 0 [ 19.489143] EA = 0, S1PTW = 0 [ 19.495991] FSC = 0x04: level 0 translation fault [ 19.504554] Data abort info: [ 19.511111] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 19.520269] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 19.528988] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 19.537960] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001027a9000 [ 19.548014] [0000000000000014] pgd=0000000000000000, p4d=000000000000 [ 19.558429] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 19.568270] Modules linked in: mt7921e mt7921_common mt792x_lib mt76_connac_lib mt76 mac80211 btusb btintel cfg80211 btmtk snd_sof_ipc_msg_ btrtl snd_sof_ipc_flood_test btbcm bluetooth snd_sof_mt8195 uvcvideo mtk_adsp_common snd_sof_xtensa_dsp uvc snd_sof_of snd_sof videobuf2_vmalloc ecdh_generic ecc snd_sof_utils cros_ec_lid_angle cros_ec_sensors crct10dif_ cros_ec_sensors_core cros_usbpd_logger crypto_user fuse ip_tables ipv6 [ 19.614237] CPU: 1 PID: 105 Comm: kworker/1:1 Not tainted 6.6.0-rc6-next-20231017+ #324 [ 19.625957] Hardware name: Acer Tomato (rev2) board (DT) [ 19.634970] Workqueue: events mt7921_init_work [mt7921_common] [ 19.644522] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTY [ 19.655182] pc : mt7921_regd_notifier+0x180/0x290 [mt7921_common] [ 19.664983] lr : mt7921_regd_notifier+0xd4/0x290 [mt7921_common] [ 19.674679] sp : ffff800080acba80 [ 19.681649] x29: ffff800080acba80 x28: 0000000000000000 x27: ffff4faf [ 19.692483] x26: 0000000000000000 x25: 0000000000000000 x24: ffff4faf [ 19.703294] x23: 00000000ffffe926 x22: ffff4faf16031fa0 x21: 00000000 [ 19.714108] x20: 000000000000001c x19: ffff4faf16ba6f40 x18: 00000000 [ 19.724928] x17: 0000000000000000 x16: ffffac6b891c2750 x15: ffff8000 [ 19.735722] x14: 0000000000000180 x13: 0000000000000000 x12: 00000000 [ 19.746478] x11: 0000000000000002 x10: ffff4faf01c21780 x9 : ffffac6b [ 19.757214] x8 : 00000000006c0000 x7 : ffffac6b6b020cf0 x6 : ffffac6b [ 19.767945] x5 : ffffac6b6b020d00 x4 : ffffac6b6b020cf8 x3 : ffff4faf [ 19.778648] x2 : 0000000000000000 x1 : 000000000000001c x0 : 00000000 [ 19.789366] Call trace: [ 19.795381] mt7921_regd_notifier+0x180/0x290 [mt7921_common] [ 19.804675] wiphy_update_regulatory+0x2bc/0xa08 [cfg80211] [ 19.813864] wiphy_regulatory_register+0x4c/0x88 [cfg80211] [ 19.823029] wiphy_register+0x75c/0x8d0 [cfg80211] [ 19.831446] ieee80211_register_hw+0x70c/0xc10 [mac80211] [ 19.840479] mt76_register_device+0x168/0x2e8 [mt76] [ 19.849008] mt7921_init_work+0xdc/0x250 [mt7921_common] [ 19.857817] process_one_work+0x148/0x3c0 [ 19.865292] worker_thread+0x32c/0x450 [ 19.872489] kthread+0x11c/0x128 [ 19.879173] ret_from_fork+0x10/0x20 [ 19.886153] Code: f0000041 9100a021 94000aef aa0003f9 (b9401780) [ 19.895634] ---[ end trace 0000000000000000 ]---

Reported-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Fixes: ("wifi: mt76: mt7921: update the channel usage") Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Tested-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Reviewed-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Signed-off-by: Kalle Valo kvalo@kernel.org

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: I085ce434fc0acb2b862c66756e30ffe880d92800 Signed-off-by: Sean Wang objelf@gmail.com Commit-Queue: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d79865eb

BACKPORT: FROMGIT: wifi: mt76: mt7921: support 5.9/6GHz channel config in acpi

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 ce18572b7b5933ae3f97ea201d03463c320f0956 https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git for-next)

Conflict: drivers/net/wireless/mediatek/mt76/mt792x_acpi_sar.c drivers/net/wireless/mediatek/mt76/mt792x.h Backport Notes: struct mt792x.h and mt792x_acpi_sar.c is not available in k5.15 so we used we made the corresponding changes to mt7921/mt7921.h and mt7921/acpi_sar.c instead.

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: Id450b9b0eda33481b53293fc0029b3a330907156 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4977801 Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@ddac279b

BACKPORT: UPSTREAM: wifi: mt76: mt7921: update the channel usage when the regd domain changed

The 5.9/6GHz channel license of a certain platform device has been regulated in various countries. That may be difference with standard Liunx regulatory domain settings. In this case, when .reg_notifier() called for regulatory change, mt792x chipset should update the channel usage based on clc or dts configurations.

Channel would be disabled by following cases.

  • clc report the particular UNII-x is disabled.
  • dts enabled and the channel is not configured.

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@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 09382d8f8641bc12fffc41a93eb9b37be0e653c0)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/init.c Backport Notes: struct mt792x_dev is not available in k5.15 so we used struct so we made the corresponding changes to struct mt7921_dev instead.

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: Id0994faf5654c30ae8d848e3d4e0120f6584ab41 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4977800 Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@03af7f52

BACKPORT: UPSTREAM: wifi: mt76: mt7921: get regulatory information from the clc event

The clc event can report the radio configuration for the corresponding country and the driver would take it as regulatory information of a certain platform device.

This patch would change the clc commnad from no-waiting to waiting for event. For backward compatible, we also add a new nic capability tag to indicate the firmware did support this new clc event from now on.

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@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 4fc8df50fd41c2762d893211487be0ecb24c6a05)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/mcu.c drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h drivers/net/wireless/mediatek/mt76/mt792x.h Backport Notes: Use MT7921_CHIP_CAP_CLC_EVT_EN instead of MT792x_CHIP_CAP_CLC_EVT_EN

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: I98792ced144962930ddc3a7d44c7477a38d11b38 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4977799 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@63a0007b

BACKPORT: UPSTREAM: wifi: mt76: mt7921: add 6GHz power type support for clc

There are several power type should be supported in 6GHz band. mt7921 apply 6GHz power type from AP settings and clc will setup the corresponding regulatory power.

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@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 c36457a8f34d1e0fc55fbbd7b8b2d716af3f6289)

Conflict: drivers/net/wireless/mediatek/mt76/mt792x.h Backport Notes: struct mt792x.h is not available in k5.15 so we used struct so we made the corresponding changes to mt76/mt7921.h instead. use mt7921_vif, mt7921_phy and mt7921_dev instead of mt792x_vif, mt792x_phy and mt792x_dev respectively

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: I37cde34f4d11f4f92d4ee40e0ecf3250518b6f0a Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4977798 Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@651de4de

UPSTREAM: wifi: mt76: mt7921: enable set txpower for UNII-4

support power config for channel 165/173/177

Signed-off-by: Ming Yen Hsieh mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 7801da3388567c78f79d5ed96a5527de264fdef7 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: Ibe14ea0bc22cfb8ce7c1b511de248189a46d0e70 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4977797 Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@7a26e381

BACKPORT: UPSTREAM: wifi: mt76: mt7921: move connac nic capability handling to mt7921

mt76_connac_mcu_get_nic_capability() is used by mt7921 only. It would be better to put the code in chip folder. And we can provide more chip capability information in mt792x_phy without making mt76_phy much bigger.

The three functions would be moved to mt7921 folder and renamed. mt76_connac_mcu_parse_tx_resource() mt76_connac_mcu_parse_phy_cap() mt76_connac_mcu_get_nic_capability()

Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit dab35009fc1c6dc1598e832016594161988d8f68)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/mcu.c Backport Notes: struct mt792x_phy is not available in k5.15 so we used struct mt7921_phy instead

BUG=b:178754244, b:288986622 TEST=build on corsola

Change-Id: I3f4f33b8559b6fff40371da74064c10ce12f43c5 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4977636 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@4868a786

wifi: mt76: mt7603: improve stuck beacon handling

Before preparing the new beacon, check the queue status, flush out all previous beacons and buffered multicast packets, then (if necessary) try to recover more gracefully from a stuck beacon condition by making a less invasive attempt at getting the MAC un-stuck.

Fixes: ("mt76: add driver for MT7603E and MT7628/7688") Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Sasha Levin sashal@kernel.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@63b669de

wifi: mt76: mt7603: rework/fix rx pse hang check

It turns out that the code in mt7603_rx_pse_busy() does not detect actual hardware hangs, it only checks for busy conditions in PSE. A reset should only be performed if these conditions are true and if there is no rx activity as well. Reset the counter whenever a rx interrupt occurs. In order to also deal with a fully loaded CPU that leaves interrupts disabled with continuous NAPI polling, also check for pending rx interrupts in the function itself.

Fixes: ("mt76: add driver for MT7603E and MT7628/7688") Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Sasha Levin sashal@kernel.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@12b44132

UPSTREAM: wifi: mt76: mt7915: fix beamforming availability check

Without this patch, when ap sets the tx stream number to 2, ap won't send any beamforming packet.

Fixes: ("mt76: mt7915: fix txbf starec TLV issues") Signed-off-by: MeiChia Chiu meichia.chiu@mediatek.com Signed-off-by: Shayne Chen shayne.chen@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit ced1a0b8f3944e44e7f4eb3772dea1bada25d38a)

BUG=b:178754244, b:188614537 TEST=build on cherry

Signed-off-by: Linux Patches Robot linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com Change-Id: I1d7f392feee5cdc7d240525e134714f554d2a767 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5008209 Commit-Queue: Guenter Roeck groeck@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: Guenter Roeck groeck@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@7859feaf

FROMLIST: wifi: mt76: reduce spin_lock_bh held up in mt76_dma_rx_cleanup

mt76_dma_rx_cleanup would be frequenetly called up to reset the dma rings to be freshed as new ones when switching back from the deep sleep mode to the active mode on mt7921 and mt7922.

Shrink the scope of spin_lock_bh in mt76_dma_rx_cleanup being held up to allow the kernel scheduler to be able to switch other tasks in time by reducing the latency.

Signed-off-by: Sean Wang sean.wang@mediatek.com (am from https://patchwork.kernel.org/patch/13399714/) (also found at https://lore.kernel.org/r/4983e1bf8f5e707a67bf6b04a0cbdce359110f48.1695766375.git.objelf@gmail.com)

BUG=b:178754244, b:296867363 TEST=Build on corsola UPSTREAM-TASK=b:300300421

Change-Id: Ie03334749aa06ef366ee2372c973cd774c570840 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4927496 Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@aae4dda4

wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling

On MT76x0, LNA gain should be applied for both external and internal LNA. On MT76x2, LNA gain should be treated as 0 for external LNA. Move the LNA type based logic to mt76x2 in order to fix mt76x0.

Fixes: ("mt76x0: unify lna_gain parsing") Reported-by: Shiji Yang yangshiji66@outlook.com Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Kalle Valo kvalo@kernel.org Link: https://lore.kernel.org/r/20230919194747.31647-1-nbd@nbd.name Signed-off-by: Sasha Levin sashal@kernel.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@81936f61

wifi: mt76: mt7915: fix power-limits while chan_switch

If user changes the channel without completely disabling the interface the txpower_sku values reported track the old channel the device was operating on. If user bounces the interface the correct power tables are applied.

mt7915_sku_group_len array gets updated before the channel switch happens so it uses data from the old channel.

Fixes: ("mt76: mt7915: rework the flow of txpower setting") Fixes: ("mt76: mt7915: implement HE per-rate tx power support") Signed-off-by: Allen Ye allen.ye@mediatek.com Signed-off-by: Ryder Lee ryder.lee@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Sasha Levin sashal@kernel.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@3169845c

wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH

It seems that the nla_policy in mt76_tm_policy is missed for attribute MT76_TM_ATTR_TX_LENGTH. This patch adds the correct description to make sure the

u32 val = nla_get_u32(tb[MT76_TM_ATTR_TX_LENGTH]);

in function mt76_testmode_cmd() is safe and will not result in out-of-attribute read.

Fixes: ("mt76: add API for testmode support") Signed-off-by: Lin Ma linma@zju.edu.cn Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Sasha Levin sashal@kernel.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@697a2c06

FROMLIST: wifi: mt76: mt7921: fix the wrong rate selected in fw for the chanctx driver

The variable band should be determined by the ieee80211_chanctx_conf when the driver is a kind of chanctx one e.g mt7921 and mt7922 driver so we added the extension to mt76_connac2_mac_tx_rate_val and mt76_connac_get_he_phy_cap for the firmware can select the proper rate.

Fixes: ("wifi: mt76: mt7921: introduce chanctx support") Signed-off-by: Sean Wang sean.wang@mediatek.com Tested-by: David Ruth druth@chromium.org (am from https://patchwork.kernel.org/patch/13376930/)

BUG=b:178754244 TEST=emerge-corsola sys-kernel/chromeos-kernel-5_15; pass test with tast.wifi.APSupportedRates.11g UPSTREAM-TASK=b:300300421

Change-Id: I311430bb20f1d427868c7ddbbc5cbcb31f5a2c38 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4859858

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@041115cf

wifi: mt76: mt7921: do not support one stream on secondary antenna only

mt7921 support following antenna combiantions only.

  • primary + secondary (2x2)
  • primary only (1x1)

Since we cannot work on secondary antenna only, return error if the antenna bitmap is 0x2 in .set_antenna().

For example: iw phy0 set antenna 3 3 /* valid / iw phy0 set antenna 1 1 / valid / iw phy0 set antenna 2 2 / invalid */

Cc: stable@vger.kernel.org Fixes: ("mt76: mt7921: add ieee80211_ops") Suggested-by: Knox Chiou knoxchiou@google.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@824cfcbb

wifi: mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC)

On DBDC devices the first (internal) phy is only capable of using 2.4 GHz band, and the 5 GHz band is exposed via a separate phy object, so avoid the false advertising.

Reported-by: Rani Hod rani.hod@gmail.com Closes: https://github.com/openwrt/openwrt/pull/12361 Fixes: ("mt76: mt7615: register ext_phy if DBDC is detected") Cc: stable@vger.kernel.org Signed-off-by: Paul Fertser fercerpav@gmail.com Reviewed-by: Simon Horman simon.horman@corigine.com Acked-by: Felix Fietkau nbd@nbd.name Signed-off-by: Kalle Valo kvalo@kernel.org Link: https://lore.kernel.org/r/20230605073408.8699-1-fercerpav@gmail.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@65736c7a

UPSTREAM: wifi: mt76: mt7921: Fix use-after-free in fw features query.

Stop referencing 'features' memory after release_firmware is called.

Fixes this crash:

RIP: 0010:mt7921_check_offload_capability+0x17d mt7921_pci_probe+0xca/0x4b0 ...

Signed-off-by: Ben Greear greearb@candelatech.com Signed-off-by: Lorenzo Bianconi lorenzo@kernel.org Acked-by: Felix Fietkau nbd@nbd.name Signed-off-by: Kalle Valo kvalo@kernel.org Link: https://lore.kernel.org/r/51fd8f76494348aa9ecbf0abc471ebe47a983dfd.1679502607.git.lorenzo@kernel.org (cherry picked from commit 2ceb76f734e37833824b7fab6af17c999eb48d2b https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:293983575, b:294770885, b:294964296 TEST=Build on corsola

Change-Id: Ic4eef4b5f4981adffcad69f5c502986c665173f4 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4766234 Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@b88382cf

UPSTREAM: wifi: mt76: mt7921e: fix init command fail with enabled device

For some cases as below, we may encounter the unpreditable chip stats in driver probe()

  • The system reboot flow do not work properly, such as kernel oops while rebooting, and then the driver do not go back to default status at this moment.
  • Similar to the flow above. If the device was enabled in BIOS or UEFI, the system may switch to Linux without driver fully shutdown.

To avoid the problem, force push the device back to default in probe()

  • mt7921e_mcu_fw_pmctrl() : return control privilege to chip side.
  • mt7921_wfsys_reset() : cleanup chip config before resource init.

Error log [59007.600714] mt7921e 0000:02:00.0: ASIC revision: 79220010 [59010.889773] mt7921e 0000:02:00.0: Message 00000010 (seq 1) timeout [59010.889786] mt7921e 0000:02:00.0: Failed to get patch semaphore [59014.217839] mt7921e 0000:02:00.0: Message 00000010 (seq 2) timeout [59014.217852] mt7921e 0000:02:00.0: Failed to get patch semaphore [59017.545880] mt7921e 0000:02:00.0: Message 00000010 (seq 3) timeout [59017.545893] mt7921e 0000:02:00.0: Failed to get patch semaphore [59020.874086] mt7921e 0000:02:00.0: Message 00000010 (seq 4) timeout [59020.874099] mt7921e 0000:02:00.0: Failed to get patch semaphore [59024.202019] mt7921e 0000:02:00.0: Message 00000010 (seq 5) timeout [59024.202033] mt7921e 0000:02:00.0: Failed to get patch semaphore [59027.530082] mt7921e 0000:02:00.0: Message 00000010 (seq 6) timeout [59027.530096] mt7921e 0000:02:00.0: Failed to get patch semaphore [59030.857888] mt7921e 0000:02:00.0: Message 00000010 (seq 7) timeout [59030.857904] mt7921e 0000:02:00.0: Failed to get patch semaphore [59034.185946] mt7921e 0000:02:00.0: Message 00000010 (seq 8) timeout [59034.185961] mt7921e 0000:02:00.0: Failed to get patch semaphore [59037.514249] mt7921e 0000:02:00.0: Message 00000010 (seq 9) timeout [59037.514262] mt7921e 0000:02:00.0: Failed to get patch semaphore [59040.842362] mt7921e 0000:02:00.0: Message 00000010 (seq 10) timeout [59040.842375] mt7921e 0000:02:00.0: Failed to get patch semaphore [59040.923845] mt7921e 0000:02:00.0: hardware init failed

Cc: stable@vger.kernel.org Fixes: ("mt76: mt7921: introduce mt7921e support") Tested-by: Kai-Heng Feng kai.heng.feng@canonical.com Tested-by: Juan Martinez juan.martinez@amd.com Co-developed-by: Leon Yen leon.yen@mediatek.com Signed-off-by: Leon Yen leon.yen@mediatek.com Signed-off-by: Quan Zhou quan.zhou@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Message-ID: 39fcb7cee08d4ab940d38d82f21897483212483f.1688569385.git.deren.wu@mediatek.com Signed-off-by: Jakub Kicinski kuba@kernel.org (cherry picked from commit 525c469e5de9bf7e53574396196e80fc716ac9eb)

BUG=b:294817895 TEST=tested pass with 20000 times on nissa planform

Change-Id: Id0833564798b510d89c80b5833c4b61aa7c3e023 Signed-off-by: wang.zhao wang.zhao@mediatek.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4753343 Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@b2ae8f45

UPSTREAM: wifi: mt76: mt7921: fix invalid remain_on_channel duration

round_jiffies_up() may change the duration reported from chip. We should take the real timeout for current channel privilege.

Fixes: ("wifi: mt76: mt7921: introduce remain_on_channel support") Signed-off-by: Deren Wu deren.wu@mediatek.com Reviewed-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit c36457a8f34d1e0fc55fbbd7b8b2d716af3f6289)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Signed-off-by: Linux Patches Robot linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com Change-Id: I52abc28ff941ce7b2059d299cb5d524de7d4da46 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4722592 Tested-by: Guenter Roeck groeck@chromium.org Reviewed-by: Guenter Roeck groeck@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: Guenter Roeck groeck@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@520aa31d

UPSTREAM: wifi: mt76: mt7921: resource leaks at mt7921_check_offload_capability()

Fixed coverity issue with resource leaks at variable "fw" going out of scope leaks the storage it points to mt7921_check_offload_capability().

Reported-by: coverity-bot keescook+coverity-bot@chromium.org Addresses-Coverity-ID: 1527806 ("Resource leaks") Fixes: ("wifi: mt76: mt7921: introduce remain_on_channel support") Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 47180ecf4541146836c5307c1d5526f8ac6a5a6d)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Signed-off-by: Linux Patches Robot linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com Change-Id: If1b26793744df6dffd40020692393fc4bbe0af3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4722591 Reviewed-by: Guenter Roeck groeck@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: Guenter Roeck groeck@chromium.org Tested-by: Guenter Roeck groeck@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@15226d71

UPSTREAM: wifi: mt76: mt7921: fix fw used for offload check for mt7922

Fix the firmware version used for offload capability check used by 0x0616 devices. This path enables offload capabilities for 0x0616 devices.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217245 Fixes: ("wifi: mt76: mt7921: introduce remain_on_channel support") Cc: stable@vger.kernel.org Signed-off-by: Lorenzo Bianconi lorenzo@kernel.org Signed-off-by: Kalle Valo kvalo@kernel.org

BUG=b:178754244, b:290317904 TEST=Build on corsola

Signed-off-by: Linux Patches Robot linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com Change-Id: Ib1c41df737cb2cd06c6ff588e83c2b70cd829a1b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4720050 Reviewed-by: Guenter Roeck groeck@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: Guenter Roeck groeck@chromium.org Tested-by: Guenter Roeck groeck@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@b699568e

UPSTREAM: wifi: mt76: mt7921: fix wrong command to set STA channel

Should not use AND operator to check vif type NL80211_IFTYPE_MONITOR, and that will cause we go into sniffer command for both STA and MONITOR mode. However, the sniffer command would set channel properly (with some extra options), the STA mode still works even if using the wrong command.

Fix vif type check to make sure we using the right command to update channel.

Fixes: ("wifi: mt76: mt7921: fix channel switch fail in monitor mode") Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit fcc51acfebb85dbc3ab1bea3ce4997d7c0a3a38d)

BUG=b:178754244 TEST=Build on corsola

Signed-off-by: Linux Patches Robot linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com Change-Id: I445e11e3cc54e2ab992888ebd81218e9b9ac97f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4720053 Commit-Queue: Guenter Roeck groeck@chromium.org Reviewed-by: Guenter Roeck groeck@chromium.org Reviewed-by: Sean Paul sean@poorly.run Tested-by: Guenter Roeck groeck@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@88c3d74e

BACKPORT: FROMLIST: wifi: mt76: mt7921: fix the wrong rate pickup for the chanctx driver

The variable band should be determined by the ieee80211_chanctx_conf when the driver is a kind of chanctx one e.g mt7921 and mt7922 driver so we added the extension to mt76_connac2_mac_tx_rate_val by distinguishing if it can support chanctx to fix the incorrect rate pickup.

Fixes: ("wifi: mt76: mt7921: introduce chanctx support") Signed-off-by: Sean Wang sean.wang@mediatek.com (am from https://patchwork.kernel.org/patch/13325342/) (also found at https://lore.kernel.org/r/7c7c2c1f0584e8dd016bc2bf8de88684fcc7679c.1690232804.git.objelf@gmail.com)

Conflict: drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c Backport Notes: Add the changes to the corresponding structure

UPSTREAM-TASK= b:292581131 BUG=b:178754244, b:292266077 TEST=tested with wifi.APSupportedRates.11g

Change-Id: I51241aaea87e110f5b9611919cb5f45c761fc397 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713361 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@b1e701bb

BACKPORT: FROMLIST: wifi: mt76: move struct ieee80211_chanctx_conf up to struct mt76_vif

Move struct ieee80211_chanctx_conf up to struct mt76_vif to allow the connac2 library can access the struct ieee80211_chanctx_conf * member in struct mt76_vif.

Signed-off-by: Sean Wang sean.wang@mediatek.com (am from https://patchwork.kernel.org/patch/13325341/) (also found at https://lore.kernel.org/r/8fd42ac8e1c97246f6e65225a14fc8a029ac3aaa.1690232804.git.objelf@gmail.com)

Conflict: drivers/net/wireless/mediatek/mt76/mt76.h Backport Notes: Add the changes to the corresponding structure

UPSTREAM-TASK= b:292581131 BUG=b:178754244, b:292266077 TEST=tested with wifi.APSupportedRates.11g

Change-Id: I5331ded3c23e4a6d2f852053c5bebc97f09a3671 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713360 Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d6158251

BACKPORT: wifi: mt76: mt7921: fix channel switch fail in monitor mode

When the chanctx enabled, IEEE80211_CONF_CHANGE_CHANNEL in .config() would not be called anymore. mt76 cannot control RF channel for monitor. Add monitor type set-channel flow in .change_chanctx().

Fixes: ("wifi: mt76: mt7921: introduce chanctx support") Reviewed-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 914189af23b83c9a83a0137a3a40f17de7d2c618 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/mcu.c Backport Notes: 320M bandwidth is not supported by the k5.15

BUG=b:178754244 TEST=Build on corsola

Change-Id: I8868fdba1c172d5910bcd1f8200d4e34ffb594df Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713359 Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@e41af4d3

UPSTREAM: wifi: mt76: mt7921: fix deadlock in mt7921_abort_roc

When mt7921_abort_roc is called with dev->mutex held, it can deadlock while calling cancel_work_sync(&phy->roc_work), because the work function could be waiting to acquire the mutex.

Fix this by flushing the work before taking the mutex

Reported-by: Mikhail Gavrilov mikhail.v.gavrilov@gmail.com Fixes: ("wifi: mt76: mt7921: introduce remain_on_channel support") Fixes: ("wifi: mt76: mt7921: introduce chanctx support") Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit de19b9c83654e323d83f839a550ca4af37fea15b https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244 TEST=Build on corsola

Change-Id: I07ed0454b2fd41f0a2a6cbfbaa7ffcb8ecdee5c5 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713358 Commit-Queue: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@45a7c648

BACKPORT: wifi: mt76: mt7921: introduce chanctx support

The firmware can have the capability to manage the channel context scheduling on multiple roles running on the device including Station, AP and P2P GC/GO mode (will be extended based on the future patchset) to help users sharing the network with others on a single device.

The firmware is able to support the channel chanctx up to 2 interface simultaneously running on the different channels.

Another thing to be noted is that before the driver is going sent out the management frames, the driver has to get the privilege from the firmware to occupy the current channel context until the frame handshake is completed and then get the privilege back to the firmware.

Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 41ac53c899bd1493a75ab9b52c8f76176b7419e1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/main.c Backport Notes: There is no the parameter of struct ieee80211_bss_conf * in mt7921_assign_vif_chanctx and mt7921_unassign_vif_chanctx in the current k5.15 kernel.

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I7ff6dc245052369fabc3b279f25e3eaf38309d25 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691131 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713357

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@05e7ee3f

UPSTREAM: wifi: mt76: mt7921: introduce remain_on_channel support

Introduce remain_on_channel support. Additionally, we add mt7921_check_offload_capability to disable .remain_on_channel and .cancel_remain_on_channel and related configuration because those operations would rely on the fundamental MCU commands that will be only supported with newer firmware.

Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 034ae28b56f13dc1f2beb3fa294b455f57ede9cb https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I734cf0a54240c0998d6d20b1cdd6a5afcc813710 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691130 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713356

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@675a4d6d

UPSTREAM: wifi: mt76: connac: accept hw scan request at a time

The current hw scan cannot accept multiple hw scan requests at a time, we return the proper error code when the hw scan is still undergoing.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit fe62788b6233df0fe43920e32f30c9583d584117 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: Id0777cf5fc4222496066d29332bbfc9e53be8c26 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691129 Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713355

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@93346986

UPSTREAM: wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver

The firmware would be in charge of braking and continuing the traffic while the channel contexts are switching between different BSS and HW SCAN in the background.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 98678fc03c9599be3bac7a1e253d2697b3a26624 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I9d9e4d5145fa2f052f458539411406f447db5a8e Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691128 Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713354

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@52bbd46f

UPSTREAM: wifi: mt76: mt7921: add unified ROC cmd/event support

Add unified ROC cmd/event which is only supported by the newer fw.

Co-developed-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Co-developed-by: Kaikai Hu kaikai.hu@mediatek.com Signed-off-by: Kaikai Hu kaikai.hu@mediatek.com Signed-off-by: Quan Zhou quan.zhou@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 5b55b6da982c974fca3e521edb239163d133834f https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I61aeebb8d0b5f11409ff3d2e3764975bad0e2fd7 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691127 Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713353

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d5de14f9

UPSTREAM: wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature

Add a chanctx parameter to mt76_connac_mcu_uni_add_bss signature to allow the firmware binds the BSS into the specific channel context.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit a0ab9c3160dfafece67ed39f43f35f533eeea428 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I5bfd24db5cb9b582c6057bea1eef2686098d4e82 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691126 Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Tested-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713352

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@de0e7e11

UPSTREAM: wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx

add mt76_connac_mcu_uni_set_chctx to set up the channel context per BSS in the firmware

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit c1eab2418fa44164a74448e62a5967f1e813e063 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I29c4c39ae44a88abf7446975ab4530aadad1550a Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691125 Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713351

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@0f12aad4

UPSTREAM: wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_[start, stop]_ap

Add mt7921_mutex_acquire at mt7921_[start, stop]_ap to fix the race with the context holding dev->muxtex and the driver might access the device in low power state.

Fixes: ("mt76: mt7921: fix command timeout in AP stop period") Tested-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Signed-off-by: Sean Wang sean.wang@mediatek.com Acked-by: Lorenzo Bianconi lorenzo@kernel.org Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 52b44015f031f629f1ce1d73415a2017593c7ade https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: Idfacfdfc49c7685d87e2d86600664e3bbc956364 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691124 Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4713350

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@54cd7a7c

Revert "UPSTREAM: wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_[start, stop]_ap"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: mt7921: add mt7921_mutex_acquire atmt7921_[start, stop]_ap

Add mt7921_mutex_acquire at mt7921_[start, stop]_ap to fix the race with the context holding dev->muxtex and the driver might access the device in low power state.

Fixes: ("mt76: mt7921: fix command timeout in AP stop period") Tested-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Signed-off-by: Sean Wang sean.wang@mediatek.com Acked-by: Lorenzo Bianconi lorenzo@kernel.org Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I0a242ff81083aafd7ea304c4f6c7176c96534daf Signed-off-by: Sean Wang objelf@gmail.com Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: David Ruth druth@chromium.org

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I13c949f98ef7c5c0190a36335e799490256fc203 Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@f14f1edd

Revert "UPSTREAM: wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx

add mt76_connac_mcu_uni_set_chctx to set up the channel context per BSS in the firmware

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: If1d22c9606486314595ef8c2412106c8b5abfae4 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I01b830d60f17938a633d6a37ce6978a25853c7cc Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@75bd919c

Revert "UPSTREAM: wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature

Add a chanctx parameter to mt76_connac_mcu_uni_add_bss signature to allow the firmware binds the BSS into the specific channel context.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: Ide623131001626ea1948fe4df9338024af67670e Signed-off-by: Sean Wang objelf@gmail.com Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Tested-by: David Ruth druth@chromium.org

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I165d158ec34db4123cb89e425485cb64820ebbdd Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4708655 Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@f19455df

Revert "UPSTREAM: wifi: mt76: mt7921: add unified ROC cmd/event support"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: mt7921: add unified ROC cmd/event support

Add unified ROC cmd/event which is only supported by the newer fw.

Co-developed-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Co-developed-by: Kaikai Hu kaikai.hu@mediatek.com Signed-off-by: Kaikai Hu kaikai.hu@mediatek.com Signed-off-by: Quan Zhou quan.zhou@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I5bdf325d5f88458111ae080eaba1bcf37e6c15a6 Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: David Ruth druth@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4707939 Commit-Queue: David Ruth druth@chromium.org Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@3a87186b

Revert "UPSTREAM: wifi: mt76: mt7921: drop ieee80211_ [start, stop]_queues in driver"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: mt7921: drop ieee80211_[start, stop] _queues in driver

The firmware would be in charge of braking and continuing the traffic while the channel contexts are switching between different BSS and HW SCAN in the background.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: If3ec4193b6c9ee0303d5c20c3abe6f772b962e98 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I03620a3a6f7b8ec922d7436554cd4cf6f84ed0a9 Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@96cc4946

Revert "UPSTREAM: wifi: mt76: connac: accept hw scan request at a time"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: connac: accept hw scan request at a time

The current hw scan cannot accept multiple hw scan requests at a time, we return the proper error code when the hw scan is still undergoing.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I6753b178c74cf984783d249a3382aee2fa30c6be Signed-off-by: Sean Wang objelf@gmail.com Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I0c8f0f140bed6a438a94932bc067b3ab52ec370d Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@0b69ca4e

Revert "UPSTREAM: wifi: mt76: mt7921: introduce remain_on_channel support"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

UPSTREAM: wifi: mt76: mt7921: introduce remain_on_channel support

Introduce remain_on_channel support. Additionally, we add mt7921_check_offload_capability to disable .remain_on_channel and .cancel_remain_on_channel and related configuration because those operations would rely on the fundamental MCU commands that will be only supported with newer firmware.

Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I3d3848de69630fa61533403fc4c7b28b6bc0ee32 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I9d5076c0d1d22acfb4395174f9d02e7aa0683148 Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name Signed-off-by: David Ruth druth@chromium.org Auto-Submit: David Ruth druth@chromium.org Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com Commit-Queue: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@97e1ded0

Revert "BACKPORT: wifi: mt76: mt7921: introduce chanctx support"

Reason for revert: Introduces a regression in 11g behavior

Original change's description:

BACKPORT: wifi: mt76: mt7921: introduce chanctx support

The firmware can have the capability to manage the channel context scheduling on multiple roles running on the device including Station, AP and P2P GC/GO mode (will be extended based on the future patchset) to help users sharing the network with others on a single device.

The firmware is able to support the channel chanctx up to 2 interface simultaneously running on the different channels.

Another thing to be noted is that before the driver is going sent out the management frames, the driver has to get the privilege from the firmware to occupy the current channel context until the frame handshake is completed and then get the privilege back to the firmware.

Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/main.c Backport Notes: There is no the parameter of struct ieee80211_bss_conf * in mt7921_assign_vif_chanctx and mt7921_unassign_vif_chanctx in the current k5.15 kernel.

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I0563ddb74321707e5e59d4150c5e8fe57e16e947 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

BUG=b:178754244, b:290317904, b:292266077

Change-Id: I3b6be23cda46a851c29aafc5d1e15075cc70c0ce Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: David Ruth druth@chromium.org Auto-Submit: David Ruth druth@chromium.org Commit-Queue: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@164c715b

BACKPORT: wifi: mt76: mt7921: introduce chanctx support

The firmware can have the capability to manage the channel context scheduling on multiple roles running on the device including Station, AP and P2P GC/GO mode (will be extended based on the future patchset) to help users sharing the network with others on a single device.

The firmware is able to support the channel chanctx up to 2 interface simultaneously running on the different channels.

Another thing to be noted is that before the driver is going sent out the management frames, the driver has to get the privilege from the firmware to occupy the current channel context until the frame handshake is completed and then get the privilege back to the firmware.

Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 41ac53c899bd1493a75ab9b52c8f76176b7419e1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

Conflict: drivers/net/wireless/mediatek/mt76/mt7921/main.c Backport Notes: There is no the parameter of struct ieee80211_bss_conf * in mt7921_assign_vif_chanctx and mt7921_unassign_vif_chanctx in the current k5.15 kernel.

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I0563ddb74321707e5e59d4150c5e8fe57e16e947 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691131 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@47e30263

UPSTREAM: wifi: mt76: mt7921: introduce remain_on_channel support

Introduce remain_on_channel support. Additionally, we add mt7921_check_offload_capability to disable .remain_on_channel and .cancel_remain_on_channel and related configuration because those operations would rely on the fundamental MCU commands that will be only supported with newer firmware.

Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 034ae28b56f13dc1f2beb3fa294b455f57ede9cb https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I3d3848de69630fa61533403fc4c7b28b6bc0ee32 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691130 Reviewed-by: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@70692c08

UPSTREAM: wifi: mt76: connac: accept hw scan request at a time

The current hw scan cannot accept multiple hw scan requests at a time, we return the proper error code when the hw scan is still undergoing.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit fe62788b6233df0fe43920e32f30c9583d584117 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I6753b178c74cf984783d249a3382aee2fa30c6be Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691129 Tested-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@a537a041

UPSTREAM: wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver

The firmware would be in charge of braking and continuing the traffic while the channel contexts are switching between different BSS and HW SCAN in the background.

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 98678fc03c9599be3bac7a1e253d2697b3a26624 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: If3ec4193b6c9ee0303d5c20c3abe6f772b962e98 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691128 Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@46a11579

UPSTREAM: wifi: mt76: mt7921: add unified ROC cmd/event support

Add unified ROC cmd/event which is only supported by the newer fw.

Co-developed-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Co-developed-by: Deren Wu deren.wu@mediatek.com Signed-off-by: Deren Wu deren.wu@mediatek.com Co-developed-by: Kaikai Hu kaikai.hu@mediatek.com Signed-off-by: Kaikai Hu kaikai.hu@mediatek.com Signed-off-by: Quan Zhou quan.zhou@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 5b55b6da982c974fca3e521edb239163d133834f https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: Ia6abc605792a7f194653c7d960a15cb18e7d6e6a Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691127 Tested-by: David Ruth druth@chromium.org Reviewed-by: David Ruth druth@chromium.org Commit-Queue: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@56e4af04

UPSTREAM: wifi: mt76: connac: add mt76_connac_mcu_uni_set_chctx

add mt76_connac_mcu_uni_set_chctx to set up the channel context per BSS in the firmware

Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit c1eab2418fa44164a74448e62a5967f1e813e063 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: If1d22c9606486314595ef8c2412106c8b5abfae4 Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691125 Reviewed-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@af98f607

UPSTREAM: wifi: mt76: mt7921: add mt7921_mutex_acquire at mt7921_[start, stop]_ap

Add mt7921_mutex_acquire at mt7921_[start, stop]_ap to fix the race with the context holding dev->muxtex and the driver might access the device in low power state.

Fixes:("mt76: mt7921: fix command timeout in AP stop period") Tested-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Signed-off-by: Sean Wang sean.wang@mediatek.com Acked-by: Lorenzo Bianconi lorenzo@kernel.org Signed-off-by: Felix Fietkau nbd@nbd.name (cherry picked from commit 52b44015f031f629f1ce1d73415a2017593c7ade https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master)

BUG=b:178754244, b:290317904 TEST=Build on corsola

Change-Id: I0a242ff81083aafd7ea304c4f6c7176c96534daf Signed-off-by: Sean Wang objelf@gmail.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4691124 Commit-Queue: David Ruth druth@chromium.org Tested-by: David Ruth druth@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: David Ruth druth@chromium.org

Merge request reports

Loading