Commit 5d461321 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt7921: honor mt76_connac_mcu_set_rate_txpower return value in mt7921_config

Check return code from mt76_connac_mcu_set_rate_txpower() in mt7921_config
routine.
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 0a57d636
...@@ -468,7 +468,7 @@ static int mt7921_config(struct ieee80211_hw *hw, u32 changed) ...@@ -468,7 +468,7 @@ static int mt7921_config(struct ieee80211_hw *hw, u32 changed)
{ {
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 ret; int ret = 0;
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
ieee80211_stop_queues(hw); ieee80211_stop_queues(hw);
...@@ -480,8 +480,11 @@ static int mt7921_config(struct ieee80211_hw *hw, u32 changed) ...@@ -480,8 +480,11 @@ static int mt7921_config(struct ieee80211_hw *hw, u32 changed)
mt7921_mutex_acquire(dev); mt7921_mutex_acquire(dev);
if (changed & IEEE80211_CONF_CHANGE_POWER) if (changed & IEEE80211_CONF_CHANGE_POWER) {
mt76_connac_mcu_set_rate_txpower(phy->mt76); ret = mt76_connac_mcu_set_rate_txpower(phy->mt76);
if (ret)
goto out;
}
if (changed & IEEE80211_CONF_CHANGE_MONITOR) { if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
bool enabled = !!(hw->conf.flags & IEEE80211_CONF_MONITOR); bool enabled = !!(hw->conf.flags & IEEE80211_CONF_MONITOR);
...@@ -496,9 +499,10 @@ static int mt7921_config(struct ieee80211_hw *hw, u32 changed) ...@@ -496,9 +499,10 @@ static int mt7921_config(struct ieee80211_hw *hw, u32 changed)
mt76_wr(dev, MT_WF_RFCR(0), phy->rxfilter); mt76_wr(dev, MT_WF_RFCR(0), phy->rxfilter);
} }
out:
mt7921_mutex_release(dev); mt7921_mutex_release(dev);
return 0; return ret;
} }
static int static int
......
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