mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
wifi: mt76: mt7921: add MT7902 MCU support
Add MCU support for the MT7902 chipset. runtime pm is not yet supported by the driver, but normal mac80211 operation is unaffected. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260219004007.19733-8-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
9eef868b86
commit
6d32fb2576
|
|
@ -182,6 +182,11 @@ static inline bool is_mt7920(struct mt76_dev *dev)
|
|||
return mt76_chip(dev) == 0x7920;
|
||||
}
|
||||
|
||||
static inline bool is_mt7902(struct mt76_dev *dev)
|
||||
{
|
||||
return mt76_chip(dev) == 0x7902;
|
||||
}
|
||||
|
||||
static inline bool is_mt7922(struct mt76_dev *dev)
|
||||
{
|
||||
return mt76_chip(dev) == 0x7922;
|
||||
|
|
@ -189,7 +194,8 @@ static inline bool is_mt7922(struct mt76_dev *dev)
|
|||
|
||||
static inline bool is_connac2(struct mt76_dev *dev)
|
||||
{
|
||||
return mt76_chip(dev) == 0x7961 || is_mt7922(dev) || is_mt7920(dev);
|
||||
return mt76_chip(dev) == 0x7961 || is_mt7922(dev) || is_mt7920(dev) ||
|
||||
is_mt7902(dev);
|
||||
}
|
||||
|
||||
static inline bool is_mt7663(struct mt76_dev *dev)
|
||||
|
|
|
|||
|
|
@ -302,7 +302,9 @@ int mt7921_register_device(struct mt792x_dev *dev)
|
|||
dev->pm.idle_timeout = MT792x_PM_TIMEOUT;
|
||||
dev->pm.stats.last_wake_event = jiffies;
|
||||
dev->pm.stats.last_doze_event = jiffies;
|
||||
if (!mt76_is_usb(&dev->mt76)) {
|
||||
|
||||
if (!mt76_is_usb(&dev->mt76) &&
|
||||
!is_mt7902(&dev->mt76)) {
|
||||
dev->pm.enable_user = true;
|
||||
dev->pm.enable = true;
|
||||
dev->pm.ds_enable_user = true;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,13 @@
|
|||
#define MT792x_MCU_INIT_RETRY_COUNT 10
|
||||
#define MT792x_WFSYS_INIT_RETRY_COUNT 2
|
||||
|
||||
#define MT7902_FIRMWARE_WM "mediatek/WIFI_RAM_CODE_MT7902_1.bin"
|
||||
#define MT7920_FIRMWARE_WM "mediatek/WIFI_RAM_CODE_MT7961_1a.bin"
|
||||
#define MT7921_FIRMWARE_WM "mediatek/WIFI_RAM_CODE_MT7961_1.bin"
|
||||
#define MT7922_FIRMWARE_WM "mediatek/WIFI_RAM_CODE_MT7922_1.bin"
|
||||
#define MT7925_FIRMWARE_WM "mediatek/mt7925/WIFI_RAM_CODE_MT7925_1_1.bin"
|
||||
|
||||
#define MT7902_ROM_PATCH "mediatek/WIFI_MT7902_patch_mcu_1_1_hdr.bin"
|
||||
#define MT7920_ROM_PATCH "mediatek/WIFI_MT7961_patch_mcu_1a_2_hdr.bin"
|
||||
#define MT7921_ROM_PATCH "mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin"
|
||||
#define MT7922_ROM_PATCH "mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin"
|
||||
|
|
@ -448,6 +450,8 @@ void mt792x_config_mac_addr_list(struct mt792x_dev *dev);
|
|||
static inline char *mt792x_ram_name(struct mt792x_dev *dev)
|
||||
{
|
||||
switch (mt76_chip(&dev->mt76)) {
|
||||
case 0x7902:
|
||||
return MT7902_FIRMWARE_WM;
|
||||
case 0x7920:
|
||||
return MT7920_FIRMWARE_WM;
|
||||
case 0x7922:
|
||||
|
|
@ -462,6 +466,8 @@ static inline char *mt792x_ram_name(struct mt792x_dev *dev)
|
|||
static inline char *mt792x_patch_name(struct mt792x_dev *dev)
|
||||
{
|
||||
switch (mt76_chip(&dev->mt76)) {
|
||||
case 0x7902:
|
||||
return MT7902_ROM_PATCH;
|
||||
case 0x7920:
|
||||
return MT7920_ROM_PATCH;
|
||||
case 0x7922:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user