@@ -107,7 +107,7 @@ static int __mt7921_init_hardware(struct mt792x_dev *dev)
* which should be set before firmware download stage.
*/
mt76_wr(dev, MT_SWDEF_MODE, MT_SWDEF_NORMAL_MODE);
- ret = mt7921_mcu_init(dev);
+ ret = mt792x_mcu_init(dev);
if (ret)
goto out;
@@ -133,7 +133,7 @@ static int mt7921_init_hardware(struct mt792x_dev *dev)
if (!ret)
break;
- mt7921_init_reset(dev);
+ mt792x_init_reset(dev);
}
if (i == MT7921_MCU_INIT_RETRY_COUNT) {
@@ -672,7 +672,7 @@ void mt7921_mac_reset_work(struct work_struct *work)
for (i = 0; i < 10; i++) {
mutex_lock(&dev->mt76.mutex);
- ret = mt7921_dev_reset(dev);
+ ret = mt792x_dev_reset(dev);
mutex_unlock(&dev->mt76.mutex);
if (!ret)
@@ -482,9 +482,9 @@ static int mt7921_load_firmware(struct mt792x_dev *dev)
if (mt76_is_sdio(&dev->mt76)) {
/* activate again */
- ret = __mt7921_mcu_fw_pmctrl(dev);
+ ret = __mt792x_mcu_fw_pmctrl(dev);
if (!ret)
- ret = __mt7921_mcu_drv_pmctrl(dev);
+ ret = __mt792x_mcu_drv_pmctrl(dev);
}
ret = mt76_connac2_load_ram(&dev->mt76, mt7921_ram_name(dev), NULL);
@@ -953,7 +953,7 @@ int mt7921_mcu_drv_pmctrl(struct mt792x_dev *dev)
if (!test_bit(MT76_STATE_PM, &mphy->state))
goto out;
- err = __mt7921_mcu_drv_pmctrl(dev);
+ err = __mt792x_mcu_drv_pmctrl(dev);
out:
mutex_unlock(&pm->mutex);
@@ -975,7 +975,7 @@ int mt7921_mcu_fw_pmctrl(struct mt792x_dev *dev)
if (mt76_connac_skip_fw_pmctrl(mphy, pm))
goto out;
- err = __mt7921_mcu_fw_pmctrl(dev);
+ err = __mt792x_mcu_fw_pmctrl(dev);
out:
mutex_unlock(&pm->mutex);
@@ -159,12 +159,6 @@ enum mt7921_eeprom_field {
#define MT_EE_HW_TYPE_ENCAP BIT(0)
-#define mt7921_init_reset(dev) ((dev)->hif_ops->init_reset(dev))
-#define mt7921_dev_reset(dev) ((dev)->hif_ops->reset(dev))
-#define mt7921_mcu_init(dev) ((dev)->hif_ops->mcu_init(dev))
-#define __mt7921_mcu_drv_pmctrl(dev) ((dev)->hif_ops->drv_own(dev))
-#define __mt7921_mcu_fw_pmctrl(dev) ((dev)->hif_ops->fw_own(dev))
-
enum {
TXPWR_USER,
TXPWR_EEPROM,
@@ -46,7 +46,7 @@ static void mt7921e_unregister_device(struct mt792x_dev *dev)
cancel_work_sync(&dev->reset_work);
mt76_connac2_tx_token_put(&dev->mt76);
- __mt7921_mcu_drv_pmctrl(dev);
+ __mt792x_mcu_drv_pmctrl(dev);
mt792x_dma_cleanup(dev);
mt792x_wfsys_reset(dev);
skb_queue_purge(&dev->mt76.mcu.res_q);
@@ -57,7 +57,7 @@ mt7921_tm_set(struct mt792x_dev *dev, struct mt7921_tm_cmd *req)
pm->enable = false;
cancel_delayed_work_sync(&pm->ps_work);
cancel_work_sync(&pm->wake_work);
- __mt7921_mcu_drv_pmctrl(dev);
+ __mt792x_mcu_drv_pmctrl(dev);
phy->test.state = MT76_TM_STATE_ON;
}
@@ -127,6 +127,12 @@ struct mt792x_irq_map {
} rx;
};
+#define mt792x_init_reset(dev) ((dev)->hif_ops->init_reset(dev))
+#define mt792x_dev_reset(dev) ((dev)->hif_ops->reset(dev))
+#define mt792x_mcu_init(dev) ((dev)->hif_ops->mcu_init(dev))
+#define __mt792x_mcu_drv_pmctrl(dev) ((dev)->hif_ops->drv_own(dev))
+#define __mt792x_mcu_fw_pmctrl(dev) ((dev)->hif_ops->fw_own(dev))
+
struct mt792x_hif_ops {
int (*init_reset)(struct mt792x_dev *dev);
int (*reset)(struct mt792x_dev *dev);