Commit Graph
4277 Commits
Author SHA1 Message Date
Shayne ChenandFelix Fietkau 4364571e4b wifi: mt76: mt7996: add support for more variants
Current varaints supported:
- mt7996 chipset: tri-band, 4+4+4 NSS, eFEM
- mt7992 chipset: dual-band, 4+4 NSS, eFEM

This patch adds support for the following variants:
- mt7996 chipset:
  - tri-band, 4+4+4 NSS, iFEM
  - tri-band, 2+3+3 NSS, eFEM
  - tri-band, 2+3+3 NSS, iFEM
- mt7992 chipset:
  - dual-band, 4+4 NSS, iFEM
  - dual-band, 4+4 NSS, with band0 iFEM and band1 eFEM
  - dual-band, 2+3 NSS, eFEM
  - dual-band, 2+3 NSS, iFEM

Co-developed-by: StanleyYP Wang <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Tested-by: Daniel Golle <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-27 07:47:31 +02:00
Shayne ChenandFelix Fietkau 4529cddb67 wifi: mt76: mt7996: extend flexibility of mt7996_mcu_get_eeprom()
Support passing customized buffer pointer and length to
mt7996_mcu_get_eeprom().

This is the preparation for adding more variants support which needs to
prefetch FEM module from efuse, and also fixes potential OOB issue when
reading the last efuse block.

Co-developed-by: StanleyYP Wang <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Tested-by: Daniel Golle <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-27 07:47:31 +02:00
Aditya Kumar SinghandFelix Fietkau 4b16d2bfdc wifi: mac80211: handle color change per link
In order to support color change with MLO, handle the link ID now
passed from cfg80211, adjust the code to do everything per link
and call the notifications to cfg80211 correctly.

Signed-off-by: Aditya Kumar Singh <[email protected]>
Link: https://msgid.link/[email protected]
Link: https://msgid.link/[email protected]
Link: https://msgid.link/[email protected]
Link: https://msgid.link/[email protected]
[squash, move API call updates to this patch]
Signed-off-by: Johannes Berg <[email protected]>
2024-09-24 12:40:16 +02:00
Emmanuel GrumbachandFelix Fietkau 8bef114432 wifi: mac80211: inform the low level if drv_stop() is a suspend
This will allow the low level driver to take different actions for
different flows.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618192529.739036208b6e.Ie18a2fe8e02bf2717549d39420b350cfdaf3d317@changeid
Signed-off-by: Johannes Berg <[email protected]>
2024-09-24 12:39:22 +02:00
Felix Fietkau 059342ca6a wifi: mt76: move mt76_tm_policy to from testmode.h to mt76.h
This fixes using testmode.h from user space code

Signed-off-by: Felix Fietkau <[email protected]>
2024-09-24 12:34:25 +02:00
Felix Fietkau a2a9d98262 wifi: mt76: do not increase mcu skb refcount if retry is not supported
If mcu_skb_prepare_msg is not implemented, incrementing skb refcount does not
work for mcu message retry. In some cases (e.g. on SDIO), shared skbs can trigger
a BUG_ON, crashing the system.
Fix this by only incrementing refcount if retry is actually supported.

Fixes: 3688c18b65ae ("wifi: mt76: mt7915: retry mcu messages")
Reported-by: Nícolas F. R. A. Prado <[email protected]> #KernelCI
Tested-by: Alper Nebi Yasak <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-17 12:58:21 +02:00
Felix Fietkau 6685a2f4c2 wifi: mt76: mt7996: remove phy->monitor_vif
It is unused

Signed-off-by: Felix Fietkau <[email protected]>
2024-09-13 14:18:26 +02:00
Felix Fietkau d10ce9d65d wifi: mt76: remove mt76_calculate_default_rate()
It is only used in mt76_connac2_mac_tx_rate_val, inline it there.

Signed-off-by: Felix Fietkau <[email protected]>
2024-09-13 14:16:30 +02:00
Ming Yen HsiehandFelix Fietkau bec8cb851d wifi: mt76: mt7925: replace chan config with extend txpower config for clc
Since MT792x_CLC_CHAN is currently not in use, we have added an
extension for setting txpower to replace it.

Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:05:39 +02:00
Ming Yen HsiehandFelix Fietkau 922e515bd8 wifi: mt76: mt7925: fix a potential array-index-out-of-bounds issue for clc
Due to the lack of checks on the clc array, if the firmware supports
more clc configuration, it will cause illegal memory access.

Cc: [email protected]
Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:05:39 +02:00
Ma KeandFelix Fietkau d4b3b302ce wifi: mt76: mt7615: check devm_kasprintf() returned value
devm_kasprintf() can return a NULL pointer on failure but this returned
value is not checked. Fix this lack and check the returned value.

Found by code review.

Cc: [email protected]
Fixes: 0bb4e9187ea4 ("mt76: mt7615: fix hwmon temp sensor mem use-after-free")
Signed-off-by: Ma Ke <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:05:39 +02:00
Chen NiandFelix Fietkau eeb51b5273 wifi: mt76: mt7925: convert comma to semicolon
Replace comma between expressions with semicolons.

Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.

Found by inspection.
No functional change intended.
Compile tested only.

Signed-off-by: Chen Ni <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:05:39 +02:00
Michael LoandFelix Fietkau 5fdb1841f7 wifi: mt76: mt7925: 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.

Cc: [email protected]
Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Michael Lo <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:05:39 +02:00
Gustavo A. R. SilvaandFelix Fietkau 4a95c1a81e wifi: mt76: Avoid multiple -Wflex-array-member-not-at-end warnings
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

So, in order to avoid ending up with a flexible-array member in the
middle of multiple other structs, we use the `struct_group_tagged()`
helper to create a new tagged `struct mt76_connac2_mcu_rxd_hdr`.
This structure groups together all the members of the flexible
`struct mt76_connac2_mcu_rxd` except the flexible array.

As a result, the array is effectively separated from the rest of the
members without modifying the memory layout of the flexible structure.
We then change the type of the middle struct members currently causing
trouble from `struct mt76_connac2_mcu_rxd` to `struct
mt76_connac2_mcu_rxd_hdr`.

We also want to ensure that when new members need to be added to the
flexible structure, they are always included within the newly created
tagged struct. For this, we use `static_assert()`. This ensures that the
memory layout for both the flexible structure and the new tagged struct
is the same after any changes.

This approach avoids having to implement `struct mt76_connac2_mcu_rxd_hdr`
as a completely separate structure, thus preventing having to maintain
two independent but basically identical structures, closing the door
to potential bugs in the future.

So, with these changes, fix the following warnings:

drivers/net/wireless/mediatek/mt76/mt7915/mcu.h:32:37: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h:40:37: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h:49:37: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h:58:37: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Link: https://patch.msgid.link/Zr5KsZugaEXrApQJ@elsanto
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:04:30 +02:00
Ma KeandFelix Fietkau 042082027b wifi: mt76: mt7921: Check devm_kasprintf() returned value
devm_kasprintf() can return a NULL pointer on failure but this returned
value is not checked. Fix this lack and check the returned value.

Found by code review.

Cc: [email protected]
Fixes: 6ae39b7c7ed4 ("wifi: mt76: mt7921: Support temp sensor")
Signed-off-by: Ma Ke <[email protected]>
Reviwed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:04:30 +02:00
Ma KeandFelix Fietkau 1231d45dcb wifi: mt76: mt7915: check devm_kasprintf() returned value
devm_kasprintf() can return a NULL pointer on failure but this returned
value is not checked. Fix this lack and check the returned value.

Found by code review.

Cc: [email protected]
Fixes: 6ae39b7c7ed4 ("wifi: mt76: mt7921: Support temp sensor")
Signed-off-by: Ma Ke <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-09-06 11:04:24 +02:00
Daniel GolleandFelix Fietkau 65cc3daf2a wifi: mt76: support per-band MAC addresses from OF child nodes
With dual-band-dual-congruent front-ends which appear as two independent
radios it is desirable to assign a per-band MAC address from device-tree,
eg. using nvmem-cells.
Support specifying MAC-address related properties in band-specific child
nodes, e.g.
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
                #addr-cells = <1>;
                #size-cells = <0>;

                band@0 {
                        /* 2.4 GHz */
                        reg = <0>;
                        nvmem-cells = <&macaddr 2>;
                        nvmem-cell-names = "mac-address";
                };

                band@1 {
                        /* 5 GHz */
                        reg = <1>;
                        nvmem-cells = <&macaddr 3>;
                        nvmem-cell-names = "mac-address";
                };
        };

Signed-off-by: Daniel Golle <[email protected]>
Tested-by: Shiji Yang <[email protected]>
Link: https://patch.msgid.link/c69fec6bd0b6e4e8a2a776cbc860fceb977fa4b6.1690841657.git.daniel@makrotopia.org
2024-09-05 14:45:03 +02:00
Felix Fietkau a897606f7c wifi: mt76: mt76x0: fix locking regression
mt76_update_channel already takes dev->mt76.mutex

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-28 08:15:30 +02:00
Felix Fietkau 5c5e685eb0 wifi: mt76: mt7915: improve hardware recovery
Do not trigger full restarts when running into timeouts during SER.
Immediately abort MCU commands when firmware requests DMA restart.

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-25 22:48:38 +02:00
Felix Fietkau 904ef52a8d wifi: mt76: mt7996: fix uninitialized TLV data
Use skb_put_zero instead of skb_put

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-25 21:08:59 +02:00
Ming Yen HsiehandFelix Fietkau ddeb304aae wifi: mt76: mt7921: fix wrong UNII-4 freq range check for the channel usage
The check should start from 5845 to 5925, which includes
channels 169, 173, and 177.

Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-25 21:05:41 +02:00
Felix Fietkau d6611d015e firmware: update mt7916/mt7981/mt7986 firmware to version 20240823
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-25 19:30:48 +02:00
Felix Fietkau e6afe9218a wifi: mt76: mt7915: fix unused variable error
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-23 00:48:02 +02:00
Felix Fietkau b76f16ea65 wifi: mt76: mt7915: improve hardware restart reliability
- use reconfig_complete to restart mac_work / queues
- reset full wtbl after firmware init
- clear wcid and vif mask to avoid leak

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-22 23:00:16 +02:00
Felix Fietkau 1f4ac8faa5 wifi: mt76: connac: move mt7615_mcu_del_wtbl_all to connac
Preparation for reusing it in mt7915

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-22 22:43:43 +02:00
Felix Fietkau 65bbd4c394 firmware: update MT7986 firmware to version 20240507160203
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-22 20:52:11 +02:00
Felix Fietkau aea16bfe8d firmware: update MT7981 firmware to version 20240507201102
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-22 20:51:36 +02:00
Felix Fietkau 084eaaf479 wifi: mt76: mt7915: fix sta poll list corruption on hw restart
When ieee80211_restart_hw is called, all interfaces and stations are
recreated. This can lead to corruption in the sta poll list, since
existing entries were not removed before their private data is reset.

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-22 19:31:39 +02:00
Peter ChiuandFelix Fietkau 4e8167b941 wifi: mt76: connac: fix checksum offload fields of connac3 RXD
Fix incorrect RXD offset and bitfield related to RX checksum offload.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Fixes: 4e9011fcdfc4 ("wifi: mt76: connac: move connac3 definitions in mt76_connac3_mac.h")
Co-developed-by: Shayne Chen <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-21 17:16:19 +02:00
Felix Fietkau dbc9b0df7c linux-firmware: update firmware for MT7996
This commit updates firmware files to 20240809 for MT7996 WiFi devices.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Josh Boyer <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-21 17:10:59 +02:00
Felix Fietkau a5e630ef45 wifi: mt76: mt7916: fix regression in .sta_state migration
- initialize and use per-sta wcid entry instead of vif wcid
- set wcid flags for 4addr/offload
- fix 'newly' argument for vif sta entry update

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-21 16:51:03 +02:00
Felix Fietkau 3cd1c17402 wifi: mt76: mt7915: hold dev->mt76.mutex while disabling tx worker
Prevent racing against other functions disabling the same worker

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-19 20:21:05 +02:00
Felix Fietkau caed4843c5 wifi: mt76: fix station muar index
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-19 20:05:30 +02:00
Felix Fietkau d547c25cab wifi: mt76: mt7915: fix last argument to mt7915_mcu_add_sta
Purely cosmetic

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-19 20:05:30 +02:00
Felix Fietkau 5c9fbdd643 wifi: mt7915: fix wcid allocation leak
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-19 20:05:11 +02:00
Felix Fietkau 0ac3041a9a wifi: mt76: fix off-channel wcid pending queue handling
- migrate offchannel to on-channel on switch
- fix scheduling during offchannel

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-18 09:54:11 +02:00
Michael-CY LeeandFelix Fietkau 437ec1b9e2 wifi: mt76: mt7996: set IEEE80211_KEY_FLAG_GENERATE_MMIE for other ciphers
When beacon protection is enabled, FW checks MMIE tag & length in the
beacon for every cipher mode. To pass the check, driver needs to set the
key flag IEEE80211_KEY_GENERATE_MMIE to let mac80211 generate and
initialize MMIE.

Signed-off-by: Michael-CY Lee <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Benjamin LinandFelix Fietkau bb6a5dbbb7 wifi: mt76: connac: add IEEE 802.11 fragmentation support for mt7996
Add fragment index into TXD.DW2 to support IEEE 802.11 fragmentation.

Signed-off-by: Benjamin Lin <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Rex LuandFelix Fietkau c4e34c8bb9 wifi: mt76: mt7996: fix handling mbss enable/disable
When mbss was previously enabled, the TLV needs to be included when
disabling it again, in order to clear the firmware state.

Fixes: a7908d5b61e5 ("wifi: mt76: mt7996: fix non-main BSS no beacon issue for MBSS scenario")
Signed-off-by: Rex Lu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Howard HsuandFelix Fietkau 4a90f92731 wifi: mt76: mt7996: set correct value in beamforming mcu command for mt7992
Configure correct bf number and bitmap in beamforming mcu command for
mt7992 chipsets, which only support dual-band.

Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Howard HsuandFelix Fietkau 5cf02b0a26 wifi: mt76: mt7996: fix EHT beamforming capability check
If a VIF acts as a beamformer, it should check peer's beamformee
capability, and vice versa.

Fixes: ba01944adee9 ("wifi: mt76: mt7996: add EHT beamforming support")
Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Howard HsuandFelix Fietkau c2c6940e60 wifi: mt76: mt7996: set correct beamformee SS capability
According to IEEE P802.11be/D6.0 Table 9-417n, beamformee SS field stands
for the maximum number of spatial streams that the STA can receive in an
EHT sounding NDP minus 1, and the minimum value of this field is 3.

This value indicates the decoding capability of a beamformee, which is
independent of current antenna settings. Correct the value for mt7996
and mt7992 chipsets based on their HW capability.

Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Howard HsuandFelix Fietkau bf2eeec731 wifi: mt76: mt7996: fix HE and EHT beamforming capabilities
Fix HE and EHT beamforming capabilities for different bands and
interface types.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Fixes: 348533eb968d ("wifi: mt76: mt7996: add EHT capability init")
Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Peter ChiuandFelix Fietkau 8e2f906cb1 wifi: mt76: mt7996: advertize beacon_int_min_gcd
Advertize beacon_int_min_gcd as 100 to allow setting different beacon
intervals on different interfaces.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Peter ChiuandFelix Fietkau a5aa259fb1 wifi: mt76: mt7996: fix wmm set of station interface to 3
According to connac3 HW design, the WMM index of AP and STA interface
should be 0 and 3, respectively.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Peter ChiuandFelix Fietkau b980637b11 wifi: mt76: mt7996: fix traffic delay when switching back to working channel
During scanning, UNI_CHANNEL_RX_PATH tag is necessary for the firmware to
properly stop and resume MAC TX queue. Without this tag, HW needs more time
to resume traffic when switching back to working channel.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Peter ChiuandFelix Fietkau 37955a4d08 wifi: mt76: mt7996: use hweight16 to get correct tx antenna
The chainmask is u16 so using hweight8 cannot get correct tx_ant.
Without this patch, the tx_ant of band 2 would be -1 and lead to the
following issue:
BUG: KASAN: stack-out-of-bounds in mt7996_mcu_add_sta+0x12e0/0x16e0 [mt7996e]

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2024-08-16 19:21:32 +02:00
Felix Fietkau 362fec004c wifi: mt76: mt7915: reset the device after MCU timeout
On MT7915, MCU hangs do not trigger watchdog interrupts, so they can only
be detected through MCU message timeouts. Ensure that the hardware gets
restarted when that happens in order to prevent a permanent stuck state.

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-13 20:48:53 +02:00
Felix Fietkau a1a65d8608 wifi: mt76: mt7915: retry mcu messages
In some cases MCU messages can get lost. Instead of failing completely,
attempt to recover by re-sending them.

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-13 20:22:43 +02:00
Felix Fietkau 863b3a5f52 wifi: mt76: mt7915: set MT76_MCU_RESET early in mt7915_mac_full_reset
This avoids running into unnecessary timeouts waiting for MCU responses

Signed-off-by: Felix Fietkau <[email protected]>
2024-08-13 19:53:35 +02:00