@@ -1769,11 +1769,20 @@ int mt76_connac_mcu_set_rate_txpower(struct mt76_phy *phy)
{
int err;
- err = mt76_connac_mcu_rate_txpower_band(phy, NL80211_BAND_2GHZ);
- if (err < 0)
- return err;
+ if (phy->cap.has_2ghz) {
+ err = mt76_connac_mcu_rate_txpower_band(phy,
+ NL80211_BAND_2GHZ);
+ if (err < 0)
+ return err;
+ }
+ if (phy->cap.has_5ghz) {
+ err = mt76_connac_mcu_rate_txpower_band(phy,
+ NL80211_BAND_5GHZ);
+ if (err < 0)
+ return err;
+ }
- return mt76_connac_mcu_rate_txpower_band(phy, NL80211_BAND_5GHZ);
+ return 0;
}
EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_rate_txpower);
Check device band capabilities before configuring single-sku Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- .../wireless/mediatek/mt76/mt76_connac_mcu.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)