Commit Graph
13 Commits
Author SHA1 Message Date
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 0abf682a3d mt76: mt7921: move mt7921_usb_sdio_tx_status_data in mac common code.
This is a preliminary patch to add mt7921u driver support.

Tested-by: Sean Wang <[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 056b7f4ebc mt76: mt7921: move mt7921_usb_sdio_tx_complete_skb in common mac code.
This is a preliminary patch to add mt7921u driver support.

Tested-by: Sean Wang <[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 e700aba6ba mt76: mt7921: move mt7921_usb_sdio_tx_prepare_skb in common mac code
This is a preliminary patch to add mt7921u driver support.

Tested-by: Sean Wang <[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 41085cdcd7 mt76: mt7921: update mt7921_skb_add_usb_sdio_hdr to support usb
This is a preliminary patch to add mt7921u driver support.

Tested-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-03-15 10:41:43 +01:00
Ryder LeeandFelix Fietkau e49af7036b mt76: use le32/16_get_bits() whenever possible
Switch to use le32/16_get_bits() to simplfy codes and specify
the size explicitly to avoid potential issues.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-03-14 15:53:26 +01:00
YN ChenandFelix Fietkau 944545855e mt76: mt7921s: update mt7921s_wfsys_reset sequence
MT7921S firmware expects driver to clear out the firmware download state
before FW is downloaded again in WiFi reset procedure.

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: YN Chen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-22 20:35:40 +01:00
Sean WangandFelix Fietkau 4669882aa5 mt76: mt7921s: clear MT76_STATE_MCU_RUNNING immediately after reset
clear the flag MT76_STATE_MCU_RUNNING immediately after reset to indicate
the MCU has already stopped working at the point. That is a preliminary
patch for the following patch to perform the register access in the
remaining reset handler using SDIO mailbox way instead of MCU command
because the RAM firmware is cleared out.

Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-12-22 20:35:40 +01:00
Lorenzo BianconiandFelix Fietkau 6fad970893 mt76: fix key pointer overwrite in mt7921s_write_txwi/mt7663_usb_sdio_write_txwi
Fix pointer overwrite in mt7921s_tx_prepare_skb and
mt7663_usb_sdio_tx_prepare_skb routines since in
commit '2a9e9857473b ("mt76: fix possible pktid leak")
mt76_tx_status_skb_add() has been moved out of
mt7921s_write_txwi()/mt7663_usb_sdio_write_txwi() overwriting
hw key pointer in ieee80211_tx_info structure. Fix the issue saving
key pointer before running mt76_tx_status_skb_add().

Fixes: 2a9e9857473b ("mt76: fix possible pktid leak")
Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-29 15:09:54 +01:00
Changcheng DengandFelix Fietkau 1463cb4c6a mt76: mt7921: fix boolreturn.cocci warning
./drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c: 223: 8-9: WARNING:
return of 0/1 in function 'mt7921s_tx_status_data' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Changcheng Deng <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-28 22:20:34 +01:00
Lorenzo BianconiandFelix Fietkau 46261d4bbf mt76: fix possible pktid leak
Fix a possible idr pkt-id leak if the packet is dropped on tx side

Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-11-23 13:20:47 +01:00
Sean WangandFelix Fietkau 3143118baf mt76: mt7921s: add reset support
Introduce wifi chip reset support for mt7921 device to recover
mcu hangs or abnormal wifi system.

Tested-by: Deren Wu <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
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]>
2021-10-19 12:15:59 +02:00
Sean WangandFelix Fietkau ce3706a65c mt76: mt7921: introduce mt7921s support
Introduce support for mt7921s 802.11ax (Wi-Fi 6) 2x2:2SS chipset.

Tested-by: Deren Wu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2021-10-19 12:15:59 +02:00