mcu.c (311f121c240967ad4add9e4b00fbd5204e9b93f7) | mcu.c (5c041325cd0b1307b196c686f87f8531d4d3f105) |
---|---|
1// SPDX-License-Identifier: ISC 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#include <linux/fs.h> 5#include <linux/firmware.h> 6#include "mt7921.h" 7#include "mcu.h" 8#include "../mt76_connac2_mac.h" --- 468 unchanged lines hidden (view full) --- 477 int ret; 478 479 ret = mt76_connac2_load_patch(&dev->mt76, mt7921_patch_name(dev)); 480 if (ret) 481 return ret; 482 483 if (mt76_is_sdio(&dev->mt76)) { 484 /* activate again */ | 1// SPDX-License-Identifier: ISC 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#include <linux/fs.h> 5#include <linux/firmware.h> 6#include "mt7921.h" 7#include "mcu.h" 8#include "../mt76_connac2_mac.h" --- 468 unchanged lines hidden (view full) --- 477 int ret; 478 479 ret = mt76_connac2_load_patch(&dev->mt76, mt7921_patch_name(dev)); 480 if (ret) 481 return ret; 482 483 if (mt76_is_sdio(&dev->mt76)) { 484 /* activate again */ |
485 ret = __mt7921_mcu_fw_pmctrl(dev); | 485 ret = __mt792x_mcu_fw_pmctrl(dev); |
486 if (!ret) | 486 if (!ret) |
487 ret = __mt7921_mcu_drv_pmctrl(dev); | 487 ret = __mt792x_mcu_drv_pmctrl(dev); |
488 } 489 490 ret = mt76_connac2_load_ram(&dev->mt76, mt7921_ram_name(dev), NULL); 491 if (ret) 492 return ret; 493 494 if (!mt76_poll_msec(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY, 495 MT_TOP_MISC2_FW_N9_RDY, 1500)) { --- 452 unchanged lines hidden (view full) --- 948 struct mt76_connac_pm *pm = &dev->pm; 949 int err = 0; 950 951 mutex_lock(&pm->mutex); 952 953 if (!test_bit(MT76_STATE_PM, &mphy->state)) 954 goto out; 955 | 488 } 489 490 ret = mt76_connac2_load_ram(&dev->mt76, mt7921_ram_name(dev), NULL); 491 if (ret) 492 return ret; 493 494 if (!mt76_poll_msec(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY, 495 MT_TOP_MISC2_FW_N9_RDY, 1500)) { --- 452 unchanged lines hidden (view full) --- 948 struct mt76_connac_pm *pm = &dev->pm; 949 int err = 0; 950 951 mutex_lock(&pm->mutex); 952 953 if (!test_bit(MT76_STATE_PM, &mphy->state)) 954 goto out; 955 |
956 err = __mt7921_mcu_drv_pmctrl(dev); | 956 err = __mt792x_mcu_drv_pmctrl(dev); |
957out: 958 mutex_unlock(&pm->mutex); 959 960 if (err) 961 mt792x_reset(&dev->mt76); 962 963 return err; 964} --- 5 unchanged lines hidden (view full) --- 970 struct mt76_connac_pm *pm = &dev->pm; 971 int err = 0; 972 973 mutex_lock(&pm->mutex); 974 975 if (mt76_connac_skip_fw_pmctrl(mphy, pm)) 976 goto out; 977 | 957out: 958 mutex_unlock(&pm->mutex); 959 960 if (err) 961 mt792x_reset(&dev->mt76); 962 963 return err; 964} --- 5 unchanged lines hidden (view full) --- 970 struct mt76_connac_pm *pm = &dev->pm; 971 int err = 0; 972 973 mutex_lock(&pm->mutex); 974 975 if (mt76_connac_skip_fw_pmctrl(mphy, pm)) 976 goto out; 977 |
978 err = __mt7921_mcu_fw_pmctrl(dev); | 978 err = __mt792x_mcu_fw_pmctrl(dev); |
979out: 980 mutex_unlock(&pm->mutex); 981 982 if (err) 983 mt792x_reset(&dev->mt76); 984 985 return err; 986} --- 359 unchanged lines hidden --- | 979out: 980 mutex_unlock(&pm->mutex); 981 982 if (err) 983 mt792x_reset(&dev->mt76); 984 985 return err; 986} --- 359 unchanged lines hidden --- |