1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
Commit graph

3169 commits

Author SHA1 Message Date
Johannes Berg
40cecacabc wifi: mt76: mt7615: add missing chanctx ops
Here's another one I missed during the initial conversion,
fix that.

Cc: stable@vger.kernel.org
Reported-by: Rene Petersen <renepetersen@posteo.de>
Fixes: 0a44dfc070 ("wifi: mac80211: simplify non-chanctx drivers")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218895
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240528142308.3f7db1821e68.I531135d7ad76331a50244d6d5288e14aa9668390@changeid
2024-06-01 13:00:59 +03:00
Kalle Valo
d08aeb97ce mt76 patches for 6.10
- fixes
 - mt7603 stability improvements
 - mt7921 LED control
 - mt7925 EHT radiotap support
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org
 
 iF0EABECAB0WIQR10Rp9kadxD0kAQu/XfRQdAqdu9QUCZjNw8gAKCRDXfRQdAqdu
 9fGGAKCB12huzzRR/UIM21G6YFXQsHE+fQCgy5pPqDVlhWC/F7ZCS5jSPQtZfk8=
 =/JDa
 -----END PGP SIGNATURE-----

Merge tag 'mt76-for-kvalo-2024-05-02' of https://github.com/nbd168/wireless

mt76 patches for 6.10

- fixes
- mt7603 stability improvements
- mt7921 LED control
- mt7925 EHT radiotap support
2024-05-03 13:27:45 +03:00
Aditya Kumar Singh
414e736c3d 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 <quic_adisi@quicinc.com>
Link: https://msgid.link/20240422053412.2024075-4-quic_adisi@quicinc.com
Link: https://msgid.link/20240422053412.2024075-5-quic_adisi@quicinc.com
Link: https://msgid.link/20240422053412.2024075-6-quic_adisi@quicinc.com
Link: https://msgid.link/20240422053412.2024075-7-quic_adisi@quicinc.com
[squash, move API call updates to this patch]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-05-03 10:18:19 +02:00
Felix Fietkau
59f4c57306 wifi: mt76: enable spectrum management
It is supported by all drivers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:47:05 +02:00
Deren Wu
97d7ab9f51 wifi: mt76: mt7925: add EHT radiotap support in monitor mode
Add IEEE80211_RADIOTAP_EHT and IEEE80211_RADIOTAP_EHT_USIG radiotap
to fill in EHT information, such as MCS, NSS, GI and bandwidth.

Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:47:04 +02:00
Hao Zhang
06777c8fdd wifi: mt76: mt7921e: add LED control support
Introduce wifi LED switch control, add flow to Control a wifi
gpio pin based on the status of WIFI radio, if the pin is connected
to an LED, the LED will indicate the status of the WiFi radio.

Signed-off-by: Hao Zhang <hao.zhang@mediatek.com>
Co-developed-by: Quan Zhou <quan.zhou@mediatek.com>
Signed-off-by: Quan Zhou <quan.zhou@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:47:04 +02:00
Michael-CY Lee
2706c5c7c9 wifi: mt76: mt7996: let upper layer handle MGMT frame protection
The firmware support for management frame protection has limitations:
- do not support cipher BIP-GMAC-128 and BIP-GMAC-256
- support cipher BIP-CMAC-128 and BIP-CMAC-256, except action frame with
  action type 'not robust'.

Therefore, to simplify the logic, do not set the IGTK to firmware and
let the encryption of management frames be handled by upper layer.

Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:47:04 +02:00
Rong Yan
42e85997fc wifi: mt76: mt7921: cqm rssi low/high event notify
The implementation amounts to setting the driver flag
IEEE80211_VIF_SUPPORTS_CQM_RSSI, and then providing
mechanisms for continuously updating enough information
to be able to provide notifications to userspace when
RSSI drops below a certain threshold

Signed-off-by: Rong Yan <rong.yan@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:47:04 +02:00
Felix Fietkau
39db5a541d wifi: mt76: make const arrays in functions static
Reduces size by avoiding duplicates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:52 +02:00
Felix Fietkau
64bfcdbe02 wifi: mt76: connac: use muar idx 0xe for non-mt799x as well
This is expected by the firmware of older chipsets as well, though it may
not have been as strongly required as on mt799x

Fixes: 098428c400 ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:52 +02:00
StanleyYP Wang
ec55d8e7df wifi: mt76: mt7996: add sanity checks for background radar trigger
Check if background radar is enabled or not before manually triggering it,
and also add more checks in radar detected event.

Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Howard Hsu
b03e90d19b wifi: mt76: connac: enable critical packet mode support for mt7992
For mt7992 chipsets, critical packet mode should be properly configured
to let the HW SDO module correctly fill the AC queue in TX descriptors of
some higher priority packets such as ARP and ICMP.
Without this patch, HW queues may hang when running MU traffic.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Howard Hsu
474b9412f3 wifi: mt76: mt7996: fix potential memory leakage when reading chip temperature
Without this commit, reading chip temperature will cause memory leakage.

Fixes: 6879b2e941 ("wifi: mt76: mt7996: add thermal sensor device support")
Reported-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Henry Yen
a7908d5b61 wifi: mt76: mt7996: fix non-main BSS no beacon issue for MBSS scenario
Do not add UNI_BSS_INFO_11V_MBSSID tag when bssid_indicator is not set
to avoid abnormal beaconing behavior in non-11v MBSS scenario.

Signed-off-by: Henry Yen <henry.yen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Howard Hsu
a30e00946e wifi: mt76: connac: enable HW CSO module for mt7996
For mt7996 chipsets, the HW CSO module can help to identify TCP traffic,
which assists the firmware in adjusting algorithms to improve overall
performance.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Peter Chiu
2019959944 wifi: mt76: mt7996: set RCPI value in rate control command
Set RCPI values in mt7996_mcu_sta_rate_ctrl_tlv(), which can make the
FW rate control algorithm be initialized with a better MCS selection
table.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Shayne Chen
51b795d68c wifi: mt76: connac: use peer address for station BMC entry
Set peer address and aid for the BMC wtbl of station interface. For some
functions such as parsing MU_EDCA parameters from beacon, firmware will
need the peer address to do correct parsing.
Without this patch, MU uplink traffic would get suffered.

Reported-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Shayne Chen
d5479097a2 wifi: mt76: mt7996: disable rx header translation for BMC entry
When a BMC wtbl of station interface is correctly set with peer address,
HW will do rx header translation for broadcast data packets, which makes
mac80211 unable to find the corresponding ieee80211_sta and drop the
packets. To fix this, disable HW rx header translation for BMC entry.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Andy Shevchenko
2d5e1f88f4 wifi: mt76: mt7915: Remove unused of_gpio.h
of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Ben Greear
2f7cf3b61d wifi: mt76: mt7915: add missing chanctx ops
Looks like this was missed in the initial patch that made
the conversion to the emulated chanctx drivers.

Fixes: 0a44dfc070 ("wifi: mac80211: simplify non-chanctx drivers")
Tested-by: James Courtier-Dutton <james.dutton@gmail.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Lorenzo Bianconi
6d1af9b64c wifi: mt76: sdio: move mcu queue size check inside critical section
Even if it is not a real issue at the moment since concurrent access to
mcu message queue is protected by mcu mutex, make the code more robust
and move mcu queue free space check inside queue spinlock critical section.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Lorenzo Bianconi
1ac710a6e8 wifi: mt76: mt7996: fix uninitialized variable in mt7996_irq_tasklet()
Set intr1 to 0 in mt7996_irq_tasklet() in order to avoid possible
uninitialized variable usage if wed is not active for hif2.

Fixes: 83eafc9251 ("wifi: mt76: mt7996: add wed tx support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Ming Yen Hsieh
fa46bd62c9 wifi: mt76: mt7925: ensure 4-byte alignment for suspend & wow command
Before sending suspend & wow command to FW, its length should be
4-bytes alignd.

Fixes: c948b5da6b ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Leon Yen
ecf0b2b8a3 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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Deren Wu
4a40fcbfe3 wifi: mt76: mt7921: introduce mt7920 PCIe support
mt7920e is a mt7921 series chipset with 802.11ax 2x2:2SS support.
The major difference is in firmware side only, at this moment.
This patch would add some mandatory changes for new chip id and
firmware download control.

Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:51 +02:00
Chad Monroe
66ffcb9aba wifi: mt76: mt7996: fix size of txpower MCU command
Fixes issues with scanning and low power output at some rates.

Fixes: f75e4779d2 ("wifi: mt76: mt7996: add txpower setting support")
Signed-off-by: Chad Monroe <chad@monroe.io>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Muhammad Usama Anjum
cb47c7be0e wifi: mt76: connac: check for null before dereferencing
The wcid can be NULL. It should be checked for validity before
dereferencing it to avoid crash.

Fixes: 098428c400 ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Felix Fietkau
21de5f7226 wifi: mt76: mt7603: add wpdma tx eof flag for PSE client reset
This flag is needed for the PSE client reset. Fixes watchdog reset issues.

Fixes: c677dda165 ("wifi: mt76: mt7603: improve watchdog reset reliablity")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Felix Fietkau
b473c0e47f wifi: mt76: mt7603: fix tx queue of loopback packets
Use the correct WMM AC queue instead of the MGMT one to fix potential issues
with aggregation sequence number tracking. Drop non-bufferable packets.

Fixes: fca9615f1a ("mt76: mt7603: fix up hardware queue index for PS filtered packets")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Felix Fietkau
95ff66d15e wifi: mt76: mt7915: add fallback in case of missing precal data
When pre-calibration data is missing, do not fail the driver probe.
Instead, just print a warning and fall back to regular calibration.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Peter Chiu
19a954edec wifi: mt76: mt7915: add mt7986, mt7916 and mt7981 pre-calibration
Add pre-calibration for mt7986 and mt7916. It has different data size
with mt7915. Group cal needs 54k and 94k for 2G + 5G and 2G + 6G,
respectively. DPD cal needs 300k.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
MeiChia Chiu
196f6a9b66 wifi: mt76: mt7915: add support for disabling in-band discovery
Send an update to the MCU whenever the settings change

Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Felix Fietkau
5eb3b13ac3 wifi: mt76: mt7996: only set MT76_MCU_RESET for the main phy
The MT76_MCU_RESET flag is only read on the main phy.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Bo Jiao
ec8932f23b wifi: mt76: mt7915: only set MT76_MCU_RESET for the main phy
The MT76_MCU_RESET flag is only read on the main phy.

Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Howard Hsu
a1d9de5ef3 wifi: mt76: mt7915: fix HE PHY capabilities IE for station mode
Set correct beamformer capabilities for station vif in HE PHY
capabilities IE.

Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Henry Yen
296931843a wifi: mt76: mt7915: fix bogus Tx/Rx airtime duration values
Do not report measurements if the airtime counter was cleared since the
last update (possibly by firmware)

Signed-off-by: Henry Yen <henry.yen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Peter Chiu
b7e56fa0cc wifi: mt76: mt7915: fix mcu command format for mt7915 tx stats
The mcu command format are different for mt7915 and mt7986.
Fix the mt7915_mcu_wed_wa_tx_stats to support mt7915 and mt7986.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Felix Fietkau
5d581c3323 wifi: mt76: fix tx packet loss when scanning on DBDC
When queueing packets, only the MT76_RESET flag of the primary PHY
is checked. If the primary PHY is scanning or changing channels, this can
lead to packet loss for tx on the second PHY.
Fix this by passing the phy to the .tx_queue_skb op and using it to check
the correct flag.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:50 +02:00
Felix Fietkau
7f819a2f4f wifi: mt76: replace skb_put with skb_put_zero
Avoid potentially reusing uninitialized data

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:49 +02:00
Felix Fietkau
7b9a5bcb8b wifi: mt76: mt7915: initialize rssi on adding stations
Improves initial rate selection after connecting

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-02 12:44:49 +02:00
Kalle Valo
b68b2beadf wifi: mt76: mt7915: workaround dubious x | !y warning
Sparse warns:

drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:526:9: warning: dubious: x | !y

Workaround it by using the '?' operator. Compile tested only.

Signed-off-by: Kalle Valo <kvalo@kernel.org>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240325155838.1558680-1-kvalo@kernel.org
2024-03-28 15:08:26 +02:00
Lorenzo Bianconi
2d5cde1143 wifi: mt76: mt7915: workaround too long expansion sparse warnings
Fix the following sparse warnings:

drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion

No functional changes, compile tested only.

Fixes: e3296759f3 ("wifi: mt76: mt7915: enable per bandwidth power limit support")
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://msgid.link/5457b92e41909dd75ab3db7a0e9ec372b917a386.1710858172.git.lorenzo@kernel.org
2024-03-21 17:08:22 +02:00
Colin Ian King
a1e163bd29 wifi: mt76: Remove redundant assignment to variable tidno
The variable tidno is being assigned a value that is not being read
and is being re-assigned a new value a few statements later.
The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/net/wireless/mediatek/mt76/agg-rx.c:125:5: warning: Value stored
to 'tidno' during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Ming Yen Hsieh
e9a46175a7 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: 7801da3388 ("wifi: mt76: mt7921: enable set txpower for UNII-4")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Michael Lo
8cd725742e wifi: mt76: mt7921: fix suspend issue on MediaTek COB platform
MediaTek's controller driver on COB platform (e.g. MT8188) is
capable of controlling power supplies and reset pin of a component
(e.g. a WIFI chip) in power-on and power-off process.

Due to this optional feature, mt76 need to inform controller
that mt76 need to keep power during suspend. Otherwise WIFI will be
powered off when system enters suspend process.

The "wakeup-source" property was used for the device that need
this to go into suspend mode so that mt76 suspend handler doesn't
fail and the system is able to enter into a suspend state.

An example:
wifi: mt7921@0 {
	wifi0{
		reg = <0x0000 0 0 0 0>;
		wakeup-source;
	};
};

Signed-off-by: Michael Lo <michael.lo@mediatek.com>
Signed-off-by: Ming Yen Hsieh <MingYen.Hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Leon Yen
352d966126 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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Ming Yen Hsieh
c2b22e2675 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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Ming Yen Hsieh
420ad9182c 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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Ming Yen Hsieh
07ce1d4637 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: f965333e49 ("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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00
Ming Yen Hsieh
b6351ef999 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: fa6ad88e02 ("wifi: mt76: mt7921: fix country count limitation for CLC")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp@intel.com/
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-22 09:55:19 +01:00