Commit f92f81d3 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt7921: check mcu returned values in mt7921_start

Properly check returned values from mcu utility routines in
mt7921_start.
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 53a8fb4a
...@@ -173,22 +173,31 @@ static int mt7921_start(struct ieee80211_hw *hw) ...@@ -173,22 +173,31 @@ static int mt7921_start(struct ieee80211_hw *hw)
{ {
struct mt7921_dev *dev = mt7921_hw_dev(hw); struct mt7921_dev *dev = mt7921_hw_dev(hw);
struct mt7921_phy *phy = mt7921_hw_phy(hw); struct mt7921_phy *phy = mt7921_hw_phy(hw);
int err;
mt7921_mutex_acquire(dev); mt7921_mutex_acquire(dev);
mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, true, false); err = mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, true, false);
mt76_connac_mcu_set_channel_domain(phy->mt76); if (err)
goto out;
err = mt76_connac_mcu_set_channel_domain(phy->mt76);
if (err)
goto out;
err = mt7921_mcu_set_chan_info(phy, MCU_EXT_CMD_SET_RX_PATH);
if (err)
goto out;
mt7921_mcu_set_chan_info(phy, MCU_EXT_CMD_SET_RX_PATH);
mt7921_mac_reset_counters(phy); mt7921_mac_reset_counters(phy);
set_bit(MT76_STATE_RUNNING, &phy->mt76->state); set_bit(MT76_STATE_RUNNING, &phy->mt76->state);
ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work, ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work,
MT7921_WATCHDOG_TIME); MT7921_WATCHDOG_TIME);
out:
mt7921_mutex_release(dev); mt7921_mutex_release(dev);
return 0; return err;
} }
static void mt7921_stop(struct ieee80211_hw *hw) static void mt7921_stop(struct ieee80211_hw *hw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment