Commit Graph
23 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau ff306af07e wifi: mt76: mt7921: move mt792x_hw_dev in mt792x.h
This is a preliminary patch to introduce WiFi7 chipset support

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-07-26 11:40:51 +02:00
Lorenzo BianconiandFelix Fietkau c6fd7cde77 wifi: mt76: mt7921: rename mt7921_hif_ops in mt792x_hif_ops
This is a preliminary patch to introduce WiFi7 chipset support

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-07-26 11:40:51 +02:00
Lorenzo BianconiandFelix Fietkau 2485b4222d wifi: mt76: mt7921: rename mt7921_dev in mt792x_dev
This is a preliminary patch to introduce WiFi7 chipset support

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-07-26 11:40:51 +02:00
Reese RussellandFelix Fietkau 540adbb382 wifi: mt76: mt7921: add Netgear AXE3000 (A8000) support
Issue: Though the Netgear AXE3000 (A8000) is based on the mt7921
chipset because of the unique USB VID:PID combination this device
does not initialize/register. Thus making it not plug and play.

Fix: Adds support for the Netgear AXE3000 (A8000) based on the Mediatek
mt7921au chipset. The method of action is adding the USD VID/PID
pair to the mt7921u_device_table[] array.

Notes: A retail sample of the Netgear AXE3000 (A8000) yeilds the following
from lsusb D 0846:9060 NetGear, Inc. Wireless_Device. This pair
0846:9060 VID:PID has been reported by other users on Github.

Signed-off-by: Reese Russell <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-06-22 17:48:20 +02:00
Lorenzo BianconiandFelix Fietkau db5a8f70ff wifi: mt76: move shared mac definitions in mt76_connac2_mac.h
Move some mac shared definitions between mt7996, mt7921 and mt7915 in
mt76_connac2_mac.h.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-18 11:44:46 +02:00
Lorenzo BianconiandFelix Fietkau 28ea992ce8 wifi: mt76: get rid of unused sta_ps callbacks
sta_ps callback is just an empty stub for most of the drivers,
so get rid of them.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-18 11:37:59 +02:00
Jiefeng LiandFelix Fietkau c9fa8d64fc wifi: mt76: mt7921: fix missing unwind goto in mt7921u_probe
`mt7921u_dma_init` can only return zero or negative number according to its
definition. When it returns non-zero number, there exists an error and this
function should handle this error rather than return directly.

Fixes: 0d2afe09fad5 ("mt76: mt7921: add mt7921u driver")
Signed-off-by: Jiefeng Li <[email protected]>
Reviewed-by: Dongliang Mu <[email protected]>
Reviewed-by: Sridhar Samudrala <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 17:36:20 +02:00
Lorenzo BianconiandFelix Fietkau c66e7a1a69 wifi: mt76: mt7921: introduce mt7921_get_mac80211_ops utility routine
Since the fw offload capability check is shared between pci,usb and sdio
devices, move it in common init code and reduce code duplication.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-04-17 16:10:14 +02:00
Chuanhong GuoandFelix Fietkau 0d8057dbd5 wifi: mt76: mt7921u: add support for Comfast CF-952AX
Comfast CF-952AX is a MT7921 based USB WiFi dongle with custom
VID/PID. Add an entry for it.

Signed-off-by: Chuanhong Guo <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-23 10:50:59 +01:00
Lorenzo BianconiandFelix Fietkau 6fe2c2383d wifi: mt76: mt7921: avoid mcu_restart function pointer
Avoid mcu_restart function pointer whenever it is possible.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-23 10:32:49 +01:00
Sean WangandFelix Fietkau 2575de3aea wifi: mt76: mt7921: introduce chanctx support
The firmware can have the capability to manage the channel context
scheduling on multiple roles running on the device including Station,
AP and P2P GC/GO mode (will be extended based on the future patchset)
to help users sharing the network with others on a single device.

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

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

Co-developed-by: Deren Wu <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:04 +01:00
Sean WangandFelix Fietkau 6ca31dc64d wifi: mt76: mt7921: introduce remain_on_channel support
Introduce remain_on_channel support. Additionally, we add
mt7921_check_offload_capability to disable .remain_on_channel and
.cancel_remain_on_channel and related configuration because those
operations would rely on the fundamental MCU commands that will be only
supported with newer firmware.

Co-developed-by: Deren Wu <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-11-19 17:54:20 +01:00
Felix Fietkau 8cc34bdc9e wifi: mt76: mt7921: set MT_DRV_AMSDU_OFFLOAD for USB/SDIO
Signed-off-by: Felix Fietkau <[email protected]>
2022-10-05 14:31:14 +02:00
Sean WangandFelix Fietkau d11f971a45 wifi: mt76: mt7921: get rid of the false positive reset
False positive reset would be possibly triggered by those commands we
applied in suspend with HZ MCU timeout, especially it happened when we
enabled kernel log in pm core to diagnose how much time we spend in each
driver during suspend procedure. So we enlarge the value and align the MCU
timeout as other commands we did to reduce the false positive reset.

Signed-off-by: Sean Wang <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-09-15 13:14:11 +02:00
Sean WangandFelix Fietkau 9706ccef54 wifi: mt76: mt7921u: remove unnecessary MT76_STATE_SUSPEND
remove unnecessary MT76_STATE_SUSPEND manipulation to be consistent
with the mt7921[e, s] driver.

Acked-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-09-15 13:12:37 +02:00
Sean WangandFelix Fietkau ee3eb0d6d5 wifi: mt76: mt7921u: fix race issue between reset and suspend/resume
It is unexpected that the reset work is running simultaneously with
the suspend or resume context and it is possible that reset work is still
running even after mt7921 is suspended if we don't fix the race issue.

Thus, the suspend procedure should be waiting until the reset is completed
at the beginning and ignore the subsequent the reset requests.

In case there is an error that happens during either suspend or resume
handler, we will schedule a reset task to recover the error before
returning the error code to ensure we can immediately fix the error there.

Fixes: df3e4143ba8a ("mt76: mt7921u: add suspend/resume support")
Co-developed-by: YN Chen <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-09-15 13:12:37 +02:00
Lorenzo BianconiandFelix Fietkau f8ece81000 wifi: mt76: add rx_check callback for usb devices
Introduce rx_check callback support for mt7663u and mt7921u drivers.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-09-15 13:12:23 +02:00
Lorenzo BianconiandFelix Fietkau 576c1b7c47 mt76: move mt76_connac2_mcu_fill_message in mt76_connac module
Move mt76_connac2_mcu_fill_message routine in shared module in order to
reuse it for mt7921 and mt7915e drivers. This is a preliminary patch to
add mt7990 driver support.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-06-21 20:51:30 +02:00
Lorenzo BianconiandFelix Fietkau 2065a79016 mt76: move mcu_txd/mcu_rxd structures in shared code
This is a preliminary patch to add mt7990 chipset support.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-06-21 20:51:30 +02:00
Lorenzo BianconiandFelix Fietkau 9aeca2a5ce mt76: mt7921: get rid of mt7921_mcu_exit
Run skb_queue_purge when needed.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-06-17 12:14:22 +02:00
Lorenzo BianconiandFelix Fietkau fd6541905a mt76: mt7921u: add suspend/resume support
Introduce suspend/resume callbacks for mt7921u driver.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-03-25 22:17:32 +01:00
Lorenzo BianconiandFelix Fietkau 053668acda mt76: mt7921: move mt7921_init_hw in a dedicated work
Firmware initialization can take a while. Move mt7921_init_hw routine in
a dedicated work in order to not slow down bootstrap process.

Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-03-15 10:41:43 +01:00
Lorenzo BianconiandFelix Fietkau b0c60d5252 mt76: mt7921: add mt7921u driver
Introduce support for MT7921U 802.11ax 2x2:2SS wireless devices.

Tested-by: Sean Wang <[email protected]>
Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-03-15 10:41:43 +01:00