Commit Graph
3545 Commits
Author SHA1 Message Date
Peter ChiuandFelix Fietkau 210a558afc wifi: mt76: mt7996: fix pointer calculation in ie countdown event
Fix the tail and data pointers. The rxd->len in mt7996_mcu_rxd does not
include the length of general rxd. It only includes the length of
firmware event rxd. Use skb->length to get the correct length.

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]>
2023-04-17 16:10:14 +02:00
Shayne ChenandFelix Fietkau 207c92bbcd wifi: mt76: mt7996: remove unused eeprom band selection
Tri-band chipsets support one band on each a-die, so remove the unused
definition of eeprom band selection.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 16:10:14 +02:00
Shayne ChenandFelix Fietkau 16a246675a wifi: mt76: mt7996: let non-bufferable MMPDUs use correct hw queue
Pass qid into mt7996_mac_write_txwi() to let the tx descriptor of
non-bufferable MMPDUs be filled with correct hw queue index.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 16:10:14 +02:00
Ryder LeeandFelix Fietkau d39bb7c81c wifi: mt76: mt7996: remove mt7996_mcu_beacon_check_caps()
Those capabilities have been added into ieee80211_bss_conf.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 15:53:06 +02:00
Ryder LeeandFelix Fietkau 4046b59183 wifi: mt76: mt7915: remove mt7915_mcu_beacon_check_caps()
Those capabilities have been added into ieee80211_bss_conf.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 15:49:17 +02:00
Felix Fietkau d63cb85c12 wifi: mt76: add missing locking to protect against concurrent rx/status calls
According to the documentation, ieee80211_rx_list must not run concurrently
with ieee80211_tx_status (or its variants).

Cc: [email protected]
Fixes: 88046b2c9f6d ("mt76: add support for reporting tx status with skb")
Reported-by: Brian Coverstone <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 15:46:10 +02:00
Felix Fietkau 22f1b7776d mt76: adjust for ieee80211_is_bufferable_mmpdu API change
Signed-off-by: Felix Fietkau <[email protected]>
2023-03-30 11:08:19 +02:00
Felix Fietkau 8ecf551c6d wifi: mt76: set NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 on supported drivers
Drivers that do not generate IV/PN in software can safely rekey PTK0

Signed-off-by: Felix Fietkau <[email protected]>
2023-03-30 11:07:53 +02:00
Felix Fietkau efa44cb57f wifi: mt76: ignore key disable commands
This helps avoid cleartext leakage of already queued or powersave buffered
packets, when a reassoc triggers the key deletion.

Cc: [email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2023-03-30 11:07:40 +02:00
Felix Fietkau 56f0cd4d5e wifi: mt76: mt7915 add tc offloading support
This is used for offloading flows from WLAN to Ethernet, or from WLAN to WLAN

Signed-off-by: Felix Fietkau <[email protected]>
2023-03-21 09:39:38 +01:00
Hauke MehrtensandFelix Fietkau 021ded363d tools: Fix compile error with glibc
This fixes the following compile error when compiling against recent
glibc:
------------
/tools/eeprom.c:223:9: error: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Werror=unused-result]
  223 |         fread(buf, 1, EEPROM_PART_SIZE, f);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
------------

Signed-off-by: Hauke Mehrtens <[email protected]>
2023-03-02 22:23:43 +01:00
Lorenzo BianconiandFelix Fietkau c32d6d849c wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue
Fix the following use-after-free issue in mt76u_free_rx_queue routine:

usb 3-3.3.4: reset high-speed USB device number 8 using xhci_hcd
iwlwifi 0000:05:00.0: Detected RF HR B3, rfid=0x10a100
iwlwifi 0000:05:00.0: base HW address: 50:eb:71:79:02:57
iwlwifi 0000:05:00.0 wlp5s0: renamed from wlan0
mt76x2u 3-3.3.4:1.0: ASIC revision: 76320044
usb 3-3.3.1: 1:3 : unsupported format bits 0x100000000
mt76x2u 3-3.3.4:1.0: could not get hardware semaphore for ROM PATCH
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 13 PID: 983 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110
Modules linked in: snd_seq_midi snd_seq_midi_event mt76x2u(+)
mt76x2_common mt76x02_usb mt76_usb iwlmvm mt76x02_lib mt76
snd_hda_codec_realtek intel_rapl_msr snd_hda_codec_generic
snd_hda_codec_hdmi intel_rapl_common snd_hda_intel mac80211
snd_intel_dspcfg snd_usb_audio(+) snd_intel_sdw_acpi btusb
edac_mce_amd snd_hda_codec btrtl btbcm snd_usbmidi_lib snd_hda_core
btintel snd_rawmidi btmtk snd_hwdep libarc4 mc iwlwifi kvm_amd snd_seq
vfat bluetooth eeepc_wmi asus_ec_sensors snd_seq_device fat kvm
cfg80211 asus_wmi snd_pcm irqbypass ledtrig_audio sparse_keymap rapl
wmi_bmof platform_profile xpad snd_timer k10temp ff_memless i2c_piix4
rfkill snd joydev soundcore acpi_cpufreq loop zram amdgpu
crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni
polyval_generic drm_ttm_helper ttm video iommu_v2 ucsi_ccg drm_buddy
gpu_sched typec_ucsi ghash_clmulni_intel drm_display_helper igb
sha512_ssse3 typec ccp nvme cec sp5100_tco nvme_core dca nvme_common
wmi ip6_tables ip_tables fuse
BTRFS info (device nvme1n1): enabling ssd optimizations
CPU: 13 PID: 983 Comm: (udev-worker) Tainted: G        W    L
-------  ---  6.3.0-0.rc0.20230222git5b7c4cabbb65.3.fc39.x86_64+debug
BTRFS info (device nvme1n1): auto enabling async discard
Hardware name: System manufacturer System Product Name/ROG STRIX
X570-I GAMING, BIOS 4601 02/02/2023
RIP: 0010:refcount_warn_saturate+0xba/0x110
Code: 01 01 e8 69 a6 83 ff 0f 0b e9 52 f4 85 00 80 3d 69 6f ec 01 00
75 85 48 c7 c7 d0 25 b3 a9 c6 05 59 6f ec 01 01 e8 46 a6 83 ff <0f> 0b
e9 2f f4 85 00 80 3d 47 6f ec 01 00 0f 85 5e ff ff ff 48 c7
RSP: 0018:ffffb4010456fb78 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000080000000 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffffa9b17e3e RDI: 00000000ffffffff
RBP: ffff8d15877336c0 R08: 0000000000000000 R09: ffffb4010456fa00
R10: 0000000000000003 R11: ffff8d246e2fffe8 R12: 0000000000000080
R13: ffff8d15b42fd000 R14: 0000000000000000 R15: ffff8d1587736a58
FS:  00007fc05ae34940(0000) GS:ffff8d2425e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d801f1d540 CR3: 000000011df60000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 mt76u_queues_deinit+0x2a0/0x370 [mt76_usb]
 mt76x2u_probe+0xf3/0x130 [mt76x2u]
 usb_probe_interface+0xe8/0x300
 really_probe+0x1b6/0x410
 __driver_probe_device+0x78/0x170
 driver_probe_device+0x1f/0x90
 __driver_attach+0xd2/0x1c0
 ? __pfx___driver_attach+0x10/0x10
 bus_for_each_dev+0x8a/0xd0
 bus_add_driver+0x141/0x230
 driver_register+0x77/0x120
 usb_register_driver+0xaf/0x170
 ? __pfx_init_module+0x10/0x10 [mt76x2u]
 do_one_initcall+0x6e/0x350
 do_init_module+0x4a/0x220
 __do_sys_init_module+0x192/0x1c0
 ? lock_is_held_type+0xce/0x120
 do_syscall_64+0x5b/0x80
 ? lock_is_held_type+0xce/0x120
 ? asm_exc_page_fault+0x22/0x30
 ? lockdep_hardirqs_on+0x7d/0x100
 entry_SYSCALL_64_after_hwframe+0x72/0xdc
RIP: 0033:0x7fc05b1351be
Code: 48 8b 0d 4d 0c 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f
84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d
01 f0 ff ff 73 01 c3 48 8b 0d 1a 0c 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffd947c0988 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
RAX: ffffffffffffffda RBX: 000055d801f2b090 RCX: 00007fc05b1351be
RDX: 00007fc05b65c07d RSI: 00000000000234be RDI: 000055d802c6b170
RBP: 00007ffd947c0a40 R08: 000055d8019b4690 R09: 0000000000022000
R10: 000000055d8019b4 R11: 0000000000000246 R12: 00007fc05b65c07d
R13: 0000000000020000 R14: 000055d801f39770 R15: 000055d801f47780
 </TASK>
irq event stamp: 186313
hardirqs last  enabled at (186323): [<ffffffffa81c675e>]
__up_console_sem+0x5e/0x70
hardirqs last disabled at (186332): [<ffffffffa81c6743>]
__up_console_sem+0x43/0x70
softirqs last  enabled at (186022): [<ffffffffa811d2f7>]
__irq_exit_rcu+0xd7/0x160
softirqs last disabled at (186017): [<ffffffffa811d2f7>]
__irq_exit_rcu+0xd7/0x160
---[ end trace 0000000000000000 ]---
mt76x2u: probe of 3-3.3.4:1.0 failed with error -110
usbcore: registered new interface driver mt76x2u
kauditd_printk_skb: 32 callbacks suppressed

Fixes: 2f5c3c77fc9b ("wifi: mt76: switch to page_pool allocator")
Tested-by: Mikhail Gavrilov <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/f2398f68011c976510c81e1964975b677e65860e.1677193208.git.lorenzo@kernel.org
2023-03-01 18:50:27 +01:00
Ryder LeeandFelix Fietkau b0721b9692 wifi: mt76: connac: refresh tx session timer for WED device
There's no keep-alive packet being received by mac80211 stack when WED
is enabled, which leads to tx BA session timeout. This patch calls
ieee80211_refresh_tx_agg_session_timer() to refresh timer according
to tx status reporting.

Signed-off-by: Ryder Lee <[email protected]>
2023-03-01 17:58:14 +01:00
Lorenzo BianconiandFelix Fietkau 920bc6e1fc wifi: mt76: do not run mt76_unregister_device() on unregistered hw
Trying to probe a mt7921e pci card without firmware results in a
successful probe where ieee80211_register_hw hasn't been called. When
removing the driver, ieee802111_unregister_hw is called unconditionally
leading to a kernel NULL pointer dereference.
Fix the issue running mt76_unregister_device routine just for registered
hw.

Link: https://bugs.debian.org/1029116
Link: https://bugs.kali.org/view.php?id=8140
Reported-by: Stuart Hayhurst <[email protected]>
Fixes: 1c71e03afe4b ("mt76: mt7921: move mt7921_init_hw in a dedicated work")
Tested-by: Helmut Grohne <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2023-03-01 17:39:20 +01:00
Kang ChenandFelix Fietkau eff7666e1a wifi: mt76: handle failure of vzalloc in mt7615_coredump_work
vzalloc may fails, dump might be null and will cause
illegal address access later.

Link: https://lore.kernel.org/all/Y%2Fy5Asxw3T3m4jCw@lore-desk
Fixes: d2bf7959d9c0 ("mt76: mt7663: introduce coredump support")
Signed-off-by: Kang Chen <[email protected]>
2023-03-01 17:39:04 +01:00
Felix Fietkau f9ca70d636 wifi: mt76: mt7915: add back 160MHz channel width support for MT7915
A number of users reported that this support was working fine before
it got removed. Add it back, but leave out the unsupported 80+80 mode.

Fixes: ac922bd60ace ("wifi: mt76: mt7915: remove BW160 and BW80+80 support")
Signed-off-by: Felix Fietkau <[email protected]>
2023-03-01 16:36:55 +01:00
Peter ChiuandFelix Fietkau 39079b5e44 wifi: mt76: drop the incorrect scatter and gather frame
The scatter and gather frame may be incorrect because WED and WO may
send frames to host driver interleaved.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Howard HsuandFelix Fietkau a69c34a604 wifi: mt76: mt7915: rework init flow in mt7915_thermal_init()
If kernel do not enable CONFIG_HWMON, it may cause thermal
initialization to be done with temperature value 0 and then can not
transmit. This commit fixes it by setting trigger/restore temperature
before checking CONFIG_HWMON.

Fixes: 7d12b38ab6f6 ("wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work")
Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Sujuan ChenandFelix Fietkau 90d7825349 wifi: mt76: mt7915: add dev->hif2 support for mt7916 WED device
Enable two PCIe interfaces (dev->hif2) support for mt7916 when WED is enabled.

Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Lorenz BrunandFelix Fietkau ab2d3650a4 wifi: mt76: mt7915: expose device tree match table
On MT7986 the WiFi driver currently does not get automatically loaded,
requiring manual modprobing because the device tree compatibles are not
exported into metadata.

Add the missing MODULE_DEVICE_TABLE macro to fix this.

Fixes: 99ad32a4ca3a2 ("mt76: mt7915: add support for MT7986")
Signed-off-by: Lorenz Brun <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Ryder LeeandFelix Fietkau 17ec2146b8 wifi: mt76: dynamic channel bandwidth changes in AP mode
Allow AP to change channel width for 40Mhz intolerant STA on the
2.4 GHz band.

Signed-off-by: Himanshu Goyal <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Ryder LeeandFelix Fietkau ce2438aa61 wifi: mt76: mt7996: fix radiotap bitfield
The 11be generation's radiotap bitfields were wrongly copy-and-pasted
from 11ax driver, so fix them accordingly.

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Dan CarpenterandFelix Fietkau 1b602db9c2 wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store()
Drop the lock before returning -EINVAL.

Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Yang LiandFelix Fietkau fc2ed0dfc5 wifi: mt76: mt7996: Remove unneeded semicolon
./drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:3136:3-4: Unneeded semicolon

Reported-by: Abaci Robot <[email protected]>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4059
Signed-off-by: Yang Li <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Deren WuandFelix Fietkau 546934dacf wifi: mt76: mt7921: fix PCI DMA hang after reboot
mt7921 just stop some workers and clean up chip status before reboot.
In stress test, there are working activities still running at the period
of .shutdown callback and that would cause some hosts cannot recover
DMA after reboot. To avoid the floating state in reboot, we use
mt7921_pci_remove() to fully deinit all resources.

Fixes: f23a0cea8bd6 ("wifi: mt76: mt7921e: add pci .shutdown() support")
Signed-off-by: Deren Wu <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Deren WuandFelix Fietkau 282845ce7f 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: 914189af23b8 ("wifi: mt76: mt7921: fix channel switch fail in monitor mode")
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Deren WuandFelix Fietkau 18ccfa73a9 wifi: mt76: remove redundent MCU_UNI_CMD_* definitions
clear redundent definitions only

Fixes: 5b55b6da982c ("wifi: mt76: mt7921: add unified ROC cmd/event support")
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:12:41 +01:00
Leon YenandFelix Fietkau 34064dbcd7 wifi: mt76: mt7921e: add pci .shutdown() support
Some combinations of hosts cannnot detect mt7921e after reboot. The
interoperability issue is caused by the status mismatch between host
and chip fw. In such cases, the driver should stop chip activities
and reset chip to default state before reboot.

Suggested-by: [email protected]
Co-developed-by: Deren Wu <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Leon Yen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:12:38 +01:00
Kai-Heng FengandFelix Fietkau e1c9c1cb50 mt76: mt7921: Let PCI core handle power state and use pm_sleep_ptr()
PCI power state and wakeup are already handled by PCI core, so it's not
necessary to handle them in the driver.

Also switch to use pm_sleep_ptr() to remove #ifdef guard.

Signed-off-by: Kai-Heng Feng <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:12:33 +01:00
Felix Fietkau 09c6147348 Revert "wifi: mt76: mt7996: rely on mt76_connac2_mac_decode_he_radiotap"
This reverts commit fbf986dbd4.
2023-02-03 14:52:20 +01:00
Deren WuandFelix Fietkau 99d13130b5 wifi: mt76: support ww power config in dts node
support new node for WW regulatory domain

Tested-by: Michael Lo <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-03 14:52:11 +01:00
Lorenzo BianconiandFelix Fietkau 71d84bfb34 wifi: mt76: mt76x0u: report firmware version through ethtool
Run mt76x02_set_ethtool_fwver utility routine in mt76x0u_load_firmware()
in order to report firmware version through ethtool

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-03 14:52:11 +01:00
MeiChia ChiuandFelix Fietkau b2360d5974 wifi: mt76: mt7996: add EHT beamforming support
Add mt7996_mcu_sta_bfer_eht() and related capability checks.

Signed-off-by: MeiChia Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau 65bdfae299 wifi: mt76: mt7996: enable EHT support in firmware
Add sta_rec_eht command and extend phymode setting.

Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau ae71a1b829 wifi: mt76: mt7996: add support for EHT rate report
Currenly only EHT TX rate report is supported. EHT RX rate is temporally
reported with HE rate.

Co-developed-by: MeiChia Chiu <[email protected]>
Signed-off-by: MeiChia Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau 06b73c1556 wifi: mt76: mt7996: add EHT capability init
Add EHT mac and phy capability init for mt7996 chipsets.

Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Co-developed-by: MeiChia Chiu <[email protected]>
Signed-off-by: MeiChia Chiu <[email protected]>
Co-developed-by: Bo Jiao <[email protected]>
Signed-off-by: Bo Jiao <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau 4a5a9f4cdc wifi: mt76: mt7996: rework capability init
Rework and extract common code of capability init for the preparation of
adding EHT capability.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau eda8fd62c1 wifi: mt76: mt7996: add helpers for wtbl and interface limit
Add helpers to get the maximum wtbl size and interface num based
on hw caps.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau a171f672fd wifi: mt76: mt7996: add variants support
There are variants of mt7996 which are different from eht supported and
wtbl size limit. Get the hw caps with CHIP_CONFIG command.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau 5e85136c9b wifi: mt76: add EHT rate stats for ethtool
Add support to get EHT rate stats from ethtool.
This is the preliminary patch to add EHT support for mt7996.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau 9209294cd8 wifi: mt76: increase wcid size to 1088
Increase wcid size to support up to 1024 station hw entries and
64 bcast/mcast hw entries.
This is the preliminary patch to add EHT support for mt7996.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:09 +01:00
Shayne ChenandFelix Fietkau 02ec1f61b3 wifi: mt76: connac: add cmd id related to EHT support
This is the preliminary patch to add EHT support for mt7996.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:08 +01:00
Shayne ChenandFelix Fietkau 68b17a2433 wifi: mt76: connac: add helpers for EHT capability
Add helpers to get eht cap and phymode on different bands and vifs.
This is the preliminary patch to add EHT support for mt7996.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:08 +01:00
Shayne ChenandFelix Fietkau b375845abc wifi: mt76: connac: add CMD_CBW_320MHZ
Add CMD_CBW_320MHZ for setting bandwidth 320 MHz to firmware.
This is the preliminary patch to add EHT support for mt7996.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:08 +01:00
Shayne ChenandFelix Fietkau e7a61c5f70 wifi: mt76: add EHT phy type
Extend phy type and phymode bitfields for EHT support.
This is the preliminary patch to add EHT support for mt7996.

Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:05:08 +01:00
Lorenzo BianconiandFelix Fietkau 5eb4e2303b wifi: mt76: remove __mt76_mcu_restart macro
__mt76_mcu_restart is no longer used

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Lorenzo BianconiandFelix Fietkau adc556cbce wifi: mt76: mt7996: avoid mcu_restart function pointer
Run mt7996_mcu_restart routine directly and avoid mcu_restart function
pointer whenever it is possible.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Lorenzo BianconiandFelix Fietkau fbf986dbd4 wifi: mt76: mt7996: rely on mt76_connac2_mac_decode_he_radiotap
Rely on connac library for radiotap parsing and drop the following routines:
- mt7996_mac_decode_he_radiotap
- mt7996_mac_decode_he_mu_radiotap
- mt7996_mac_decode_he_radiotap_ru

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Lorenzo BianconiandFelix Fietkau 8688756305 wifi: mt76: mt7996: rely on mt76_connac_tx_complete_skb
Drop mt7996_tx_complete_skb routine since it is equivalent to
mt76_connac_tx_complete_skb().

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00
Lorenzo BianconiandFelix Fietkau bdb7dc38a6 wifi: mt76: mt7996: rely on mt76_connac_txp_skb_unmap
Drop mt7996_txp_skb_unmap routine since it is equivalent to
mt76_connac_txp_skb_unmap().

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-02 11:03:57 +01:00