mt76: mt7921: return proper error value in mt7921_mac_init

Return possible error values in mt7921_mac_init routine

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2021-05-28 11:42:47 +02:00
committed by Felix Fietkau
parent 50fd8ce241
commit e29058c3c8
3 changed files with 8 additions and 7 deletions
+3 -5
View File
@@ -136,7 +136,7 @@ mt7921_mac_init_band(struct mt7921_dev *dev, u8 band)
mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN);
}
void mt7921_mac_init(struct mt7921_dev *dev)
int mt7921_mac_init(struct mt7921_dev *dev)
{
int i;
@@ -152,7 +152,7 @@ void mt7921_mac_init(struct mt7921_dev *dev)
for (i = 0; i < 2; i++)
mt7921_mac_init_band(dev, i);
mt76_connac_mcu_set_rts_thresh(&dev->mt76, 0x92b, 0);
return mt76_connac_mcu_set_rts_thresh(&dev->mt76, 0x92b, 0);
}
static int mt7921_init_hardware(struct mt7921_dev *dev)
@@ -192,9 +192,7 @@ static int mt7921_init_hardware(struct mt7921_dev *dev)
dev->mt76.global_wcid.tx_info |= MT_WCID_TX_INFO_SET;
rcu_assign_pointer(dev->mt76.wcid[idx], &dev->mt76.global_wcid);
mt7921_mac_init(dev);
return 0;
return mt7921_mac_init(dev);
}
int mt7921_register_device(struct mt7921_dev *dev)
+4 -1
View File
@@ -1298,7 +1298,10 @@ mt7921_mac_reset(struct mt7921_dev *dev)
if (err)
return err;
mt7921_mac_init(dev);
err = mt7921_mac_init(dev);
if (err)
return err;
return __mt7921_start(&dev->phy);
}
+1 -1
View File
@@ -319,7 +319,7 @@ static inline bool mt7921_dma_need_reinit(struct mt7921_dev *dev)
return !mt76_get_field(dev, MT_WFDMA_DUMMY_CR, MT_WFDMA_NEED_REINIT);
}
void mt7921_mac_init(struct mt7921_dev *dev);
int mt7921_mac_init(struct mt7921_dev *dev);
bool mt7921_mac_wtbl_update(struct mt7921_dev *dev, int idx, u32 mask);
void mt7921_mac_reset_counters(struct mt7921_phy *phy);
void mt7921_mac_write_txwi(struct mt7921_dev *dev, __le32 *txwi,