File tree 3 files changed +8
-7
lines changed
drivers/net/wireless/mediatek/mt76/mt7921 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ mt7921_mac_init_band(struct mt7921_dev *dev, u8 band)
108
108
mt76_clear (dev , MT_DMA_DCR0 (band ), MT_DMA_DCR0_RXD_G5_EN );
109
109
}
110
110
111
- void mt7921_mac_init (struct mt7921_dev * dev )
111
+ int mt7921_mac_init (struct mt7921_dev * dev )
112
112
{
113
113
int i ;
114
114
@@ -124,7 +124,7 @@ void mt7921_mac_init(struct mt7921_dev *dev)
124
124
for (i = 0 ; i < 2 ; i ++ )
125
125
mt7921_mac_init_band (dev , i );
126
126
127
- mt76_connac_mcu_set_rts_thresh (& dev -> mt76 , 0x92b , 0 );
127
+ return mt76_connac_mcu_set_rts_thresh (& dev -> mt76 , 0x92b , 0 );
128
128
}
129
129
130
130
static int mt7921_init_hardware (struct mt7921_dev * dev )
@@ -164,9 +164,7 @@ static int mt7921_init_hardware(struct mt7921_dev *dev)
164
164
dev -> mt76 .global_wcid .tx_info |= MT_WCID_TX_INFO_SET ;
165
165
rcu_assign_pointer (dev -> mt76 .wcid [idx ], & dev -> mt76 .global_wcid );
166
166
167
- mt7921_mac_init (dev );
168
-
169
- return 0 ;
167
+ return mt7921_mac_init (dev );
170
168
}
171
169
172
170
int mt7921_register_device (struct mt7921_dev * dev )
Original file line number Diff line number Diff line change @@ -1298,7 +1298,10 @@ mt7921_mac_reset(struct mt7921_dev *dev)
1298
1298
if (err )
1299
1299
return err ;
1300
1300
1301
- mt7921_mac_init (dev );
1301
+ err = mt7921_mac_init (dev );
1302
+ if (err )
1303
+ return err ;
1304
+
1302
1305
return __mt7921_start (& dev -> phy );
1303
1306
}
1304
1307
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ static inline bool mt7921_dma_need_reinit(struct mt7921_dev *dev)
319
319
return !mt76_get_field (dev , MT_WFDMA_DUMMY_CR , MT_WFDMA_NEED_REINIT );
320
320
}
321
321
322
- void mt7921_mac_init (struct mt7921_dev * dev );
322
+ int mt7921_mac_init (struct mt7921_dev * dev );
323
323
bool mt7921_mac_wtbl_update (struct mt7921_dev * dev , int idx , u32 mask );
324
324
void mt7921_mac_reset_counters (struct mt7921_phy * phy );
325
325
void mt7921_mac_write_txwi (struct mt7921_dev * dev , __le32 * txwi ,
You can’t perform that action at this time.
0 commit comments