Commit Graph
3891 Commits
Author SHA1 Message Date
Felix Fietkau 605624a4e1 mt76: fix path to page_pool helper include
Signed-off-by: Felix Fietkau <[email protected]>
2024-03-24 15:51:52 +01:00
Felix Fietkau 2135e201e7 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 <[email protected]>
2024-03-18 10:33:01 +01:00
Peter ChiuandFelix Fietkau b4a917417c 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 <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:47 +01:00
MeiChia ChiuandFelix Fietkau e5fb6995e7 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:47 +01:00
Felix Fietkau 2330781b8c 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 <[email protected]>
2024-03-15 17:07:47 +01:00
Bo JiaoandFelix Fietkau 8ede229eb8 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 <[email protected]>
2024-03-15 17:07:47 +01:00
Howard HsuandFelix Fietkau 4f681a8fbc 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:47 +01:00
Henry YenandFelix Fietkau 3f27a64a80 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:47 +01:00
Peter ChiuandFelix Fietkau 7b054e5cb3 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:47 +01:00
Felix Fietkau b5640b3153 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 <[email protected]>
2024-03-15 17:07:47 +01:00
Felix Fietkau 46c7d1849d wifi: mt76: replace skb_put with skb_put_zero
Avoid potentially reusing uninitialized data

Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:47 +01:00
Felix Fietkau a238df940d wifi: mt76: mt7915: initialize rssi on adding stations
Improves initial rate selection after connecting

Signed-off-by: Felix Fietkau <[email protected]>
2024-03-15 17:07:31 +01:00
Colin Ian KingandFelix Fietkau ce7ccc5401 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 <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-21 21:14:17 +01:00
Ming Yen HsiehandFelix Fietkau 841bf82e99 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: 7801da338856 ("wifi: mt76: mt7921: enable set txpower for UNII-4")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-21 21:14:17 +01:00
Michael LoandFelix Fietkau eb0d0ce344 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 <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-21 21:14:17 +01:00
Leon YenandFelix Fietkau a903d31691 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 <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-21 21:14:17 +01:00
Ming Yen HsiehandFelix Fietkau 6124ea9135 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 <[email protected]>
Signed-off-by: Leon Yen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Ming Yen HsiehandFelix Fietkau ea55196bc4 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 <[email protected]>
Signed-off-by: Leon Yen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Ming Yen HsiehandFelix Fietkau 7bd5401f5b 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: f965333e491e ("mt76: mt7921: introduce ACPI SAR support")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Leon Yen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Ming Yen HsiehandFelix Fietkau d75eac9f55 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: fa6ad88e023d ("wifi: mt76: mt7921: fix country count limitation for CLC")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Deren WuandFelix Fietkau f3c5b4820d wifi: mt76: mt7925e: fix use-after-free in free_irq()
From commit a304e1b82808 ("[PATCH] Debug shared irqs"), there is a test
to make sure the shared irq handler should be able to handle the unexpected
event after deregistration. For this case, let's apply MT76_REMOVED flag to
indicate the device was removed and do not run into the resource access
anymore.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Deren WuandFelix Fietkau 1b088a7ac0 wifi: mt76: mt7921e: fix use-after-free in free_irq()
From commit a304e1b82808 ("[PATCH] Debug shared irqs"), there is a test
to make sure the shared irq handler should be able to handle the unexpected
event after deregistration. For this case, let's apply MT76_REMOVED flag to
indicate the device was removed and do not run into the resource access
anymore.

BUG: KASAN: use-after-free in mt7921_irq_handler+0xd8/0x100 [mt7921e]
Read of size 8 at addr ffff88824a7d3b78 by task rmmod/11115
CPU: 28 PID: 11115 Comm: rmmod Tainted: G        W    L    5.17.0 #10
Hardware name: Micro-Star International Co., Ltd. MS-7D73/MPG B650I
EDGE WIFI (MS-7D73), BIOS 1.81 01/05/2024
Call Trace:
 <TASK>
 dump_stack_lvl+0x6f/0xa0
 print_address_description.constprop.0+0x1f/0x190
 ? mt7921_irq_handler+0xd8/0x100 [mt7921e]
 ? mt7921_irq_handler+0xd8/0x100 [mt7921e]
 kasan_report.cold+0x7f/0x11b
 ? mt7921_irq_handler+0xd8/0x100 [mt7921e]
 mt7921_irq_handler+0xd8/0x100 [mt7921e]
 free_irq+0x627/0xaa0
 devm_free_irq+0x94/0xd0
 ? devm_request_any_context_irq+0x160/0x160
 ? kobject_put+0x18d/0x4a0
 mt7921_pci_remove+0x153/0x190 [mt7921e]
 pci_device_remove+0xa2/0x1d0
 __device_release_driver+0x346/0x6e0
 driver_detach+0x1ef/0x2c0
 bus_remove_driver+0xe7/0x2d0
 ? __check_object_size+0x57/0x310
 pci_unregister_driver+0x26/0x250
 __do_sys_delete_module+0x307/0x510
 ? free_module+0x6a0/0x6a0
 ? fpregs_assert_state_consistent+0x4b/0xb0
 ? rcu_read_lock_sched_held+0x10/0x70
 ? syscall_enter_from_user_mode+0x20/0x70
 ? trace_hardirqs_on+0x1c/0x130
 do_syscall_64+0x5c/0x80
 ? trace_hardirqs_on_prepare+0x72/0x160
 ? do_syscall_64+0x68/0x80
 ? trace_hardirqs_on_prepare+0x72/0x160
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported-by: Mikhail Gavrilov <[email protected]>
Closes: https://lore.kernel.org/linux-wireless/CABXGCsOdvVwdLmSsC8TZ1jF0UOg_F_W3wqLECWX620PUkvNk=A@mail.gmail.com/
Fixes: 9270270d6219 ("wifi: mt76: mt7921: fix PCI DMA hang after reboot")
Tested-by: Mikhail Gavrilov <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Ming Yen HsiehandFelix Fietkau 9907f4f202 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 <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Ming Yen HsiehandFelix Fietkau dccbd25985 wifi: mt76: mt7925: fix the wrong data type for scan command
For the member of 'struct scan_req_tlv', replace data type of
func_mask_ext from 'u8' to '__le32'.

Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:47 +01:00
Lorenzo BianconiandFelix Fietkau 9827df56b2 wifi: mt76: move wed common utilities in wed.c
Introduce wed.c in order to collect mt76 wed common codebase used by
mt7915 and mt7996 drivers.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Gen XuandFelix Fietkau ecc14276af wifi: mt76: mt792x: fix ethtool warning
Add a missing EHT related field to fix the following ethtool warning:
[98179.287352] mt7921e 0003:01:00.0: ei: 74  SSTATS_LEN: 73

Fixes: c74df1c067f2 ("wifi: mt76: mt792x: introduce mt792x-lib module")
Signed-off-by: Gen Xu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Benjamin LinandFelix Fietkau ae0c62279a wifi: mt76: mt7996: fix HIF_TXD_V2_1 value
Sync the value of HIF_TXD_V2_1 with firmware to let it correctly fill
TXD values for HW path.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Benjamin Lin <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Shayne ChenandFelix Fietkau d0cc92c1fd wifi: mt76: connac: set correct muar_idx for mt799x chipsets
The MUAR (multicast unicast address) is an address mapping table that
participates in the process of searching WTBL entries. For mt799x
chipsets, the default muar index of BMC WTBL is 0xe.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Shayne ChenandFelix Fietkau e0f1ed168e wifi: mt76: mt7996: add locking for accessing mapped registers
A race condition was observed when accessing mapped registers, so add
locking to protect against concurrent access.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Peter ChiuandFelix Fietkau c2fc7dae7b wifi: mt76: mt7996: remove TXS queue setting
DMA queue settings of TXS will be initialized by the firmware.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
StanleyYP WangandFelix Fietkau b47ad8a776 wifi: mt76: mt7996: fix efuse reading issue
The efuse data starts from the 48th bytes instead of 64th bytes in the
returned event skb.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Michael-CY LeeandFelix Fietkau 66a28f340c wifi: mt76: mt7996: mark GCMP IGTK unsupported
Since the FW does not support to handle the integrity and validation of
IGTK in GCMP mode, return -EOPNOTSUPP to let it be handled by upper layer.

Signed-off-by: Michael-CY Lee <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Howard HsuandFelix Fietkau 68dad7dacd wifi: mt76: mt7996: fix HE beamformer phy cap for station vif
Set correct beamformer capabilities for station vif in HE PHY
capability IE.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Benjamin LinandFelix Fietkau f21728f3f4 wifi: mt76: mt7996: ensure 4-byte alignment for beacon commands
If TLV includes beacon content, its length might not be 4-byte aligned.
Make sure the length is aligned before sending beacon commands to FW.

Signed-off-by: Benjamin Lin <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Benjamin LinandFelix Fietkau d71716d93a wifi: mt76: mt7996: fix incorrect interpretation of EHT MCS caps
The EHT MCS map subfield of 20 MHz-Only is not present in the EHT
capability of AP, so STA does not need to parse the subfield.
Moreover, AP should parse the subfield only if STA is 20 MHz-Only, which
can be confirmed by checking supported channel width in HE capability.

Fixes: 92aa2da9fa49 ("wifi: mt76: mt7996: enable EHT support in firmware")
Co-developed-by: Shayne Chen <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Benjamin Lin <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Peter ChiuandFelix Fietkau a65e3eced9 wifi: mt76: mt7996: disable AMSDU for non-data frames
Disable AMSDU for non-data frames to prevent TX token leak issues.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Peter ChiuandFelix Fietkau 4768bfa2ba wifi: mt76: mt7996: fix TWT issues
This patch fixes the following TWT issues:
- Change table_mask to u16 to support up to 16 TWT stations
- Reject TWT flows for duplicated establishment
- Fix possible unaligned pointer
- Remove unsupported TWT_CONTROL_WAKE_DUR_UNIT flag
- The minimum TWT duration supported by mt7996 chipsets is 64. Reply
  with TWT_SETUP_CMD_DICTATE if the min_twt_dur is smaller than 64

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]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Peter ChiuandFelix Fietkau 025d5734ca wifi: mt76: mt7996: check txs format before getting skb by pid
The PPDU TXS does not include the error bit so it cannot use to report
status to mac80211. This patch fixes issue that STA wrongly detects if AP
is still alive.

Fixes: 2569ea5326e2 ("wifi: mt76: mt7996: enable PPDU-TxS to host")
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Deren WuandFelix Fietkau c190c15765 wifi: mt76: mt7925: support temperature sensor
Allow sensors tool to read radio's temperature, example:

mt7925_phy8-pci-3b00
Adapter: PCI adapter
temp1:        +35.0°C

Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Deren WuandFelix Fietkau 87deaf82ef wifi: mt76: mt7925: update PCIe DMA settings
Fix the wrong WFDMA settings to improve TX performance.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Ming Yen HsiehandFelix Fietkau 762ab4530e wifi: mt76: mt7925: add support to set ifs time by mcu command
There's a race between driver and fw on some tx/rx control registers
when setting ifs, which will cause accidental hw queue pause problems.
Avoid this by setting ifs time with bss_info mcu command.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Co-developed-by: Deren Wu <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Quan ZhouandFelix Fietkau 50928b7e13 wifi: mt76: mt7925: add flow to avoid chip bt function fail
A sub-process of Wifi L0.5 reset will make chip common partition
enter low power, and have chance lead to Bluetooth host-to-chip
command timeout, modify the software flow according to the chip's
design to solve the problem.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Quan Zhou <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Ming Yen HsiehandFelix Fietkau 6a72716ec2 wifi: mt76: mt7925: fix the wrong header translation config
The header translation config should set to broadcast and unicast
cases correctly, not only unicast case. And also remove the cmds
of wtbl (wlan table) series, because these MCU commands have
already been replaced by other commands in mt7925.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Ming Yen HsiehandFelix Fietkau f982c3d67a wifi: mt76: mt7925: fix WoW failed in encrypted mode
When in suspend mode, WoW (Wake-on-WLAN) fails to wake the system remotely
due to incorrect encryption mode settings. For the new mt7925 chipset, the
old STA_REC_KEY_V2 command will send incorrect parameters to the firmware.
Therefore, STA_REC_KEY_V3 has been introduced as a replacement for it.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Ming Yen HsiehandFelix Fietkau bcfe2ad966 wifi: mt76: mt7925: fix fw download fail
Add an address of fw region for fw download.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Ming Yen HsiehandFelix Fietkau 1f0f71ed81 wifi: mt76: mt7925: fix wmm queue mapping
Firmware uses access class index (ACI) for wmm parameters update,
so convert mac80211 queue to ACI in mt7925_conf_tx().

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Hao ZhangandFelix Fietkau bab721a65f wifi: mt76: mt7925: fix mcu query command fail
Apply query command type properly to make the chip send the response back.
Otherwise, we may see the command timeout in driver side.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Hao Zhang <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
rong.yanandFelix Fietkau b7443c6306 wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band
Driver should configure basic rate and phy mode for SAP mode.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: rong.yan <[email protected]>
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Ming Yen HsiehandFelix Fietkau 27c81f7c14 wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band
Driver should setting correct phy mode to firmware when in legacy mode.

Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00
Dacio RomeroandFelix Fietkau 7864d7ad0e wifi: mt76: mt76x2u: add netgear wdna3100v3 to device table
Netgear WDNA3100v3 has a chipset that's compatible with the mt76x2u driver
and works without modification with the mainline kernel by writing to sysfs.

Signed-off-by: Dacio Romero <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-02-03 15:04:42 +01:00