Skip to content

Commit

Permalink
wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only aft…
Browse files Browse the repository at this point in the history
…er init_work

Enable thermal management by default shall not be executed during mcu
init. This causes thermal configuration being reset to the firmware
default settings.

Fixes: 0063b86c9120 ("mt76: mt7915e: Enable thermal management by default")
Reviewed-by: Ryder Lee <[email protected]>
Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
haogroot authored and nbd168 committed Jan 23, 2023
1 parent 679254c commit 15b9dd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions mt7915/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ static int mt7915_thermal_init(struct mt7915_phy *phy)
phy->throttle_temp[0] = 110;
phy->throttle_temp[1] = 120;

return mt7915_mcu_set_thermal_throttling(phy,
MT7915_THERMAL_THROTTLE_MAX);
return 0;
}

static void mt7915_led_set_config(struct led_classdev *led_cdev,
Expand Down
6 changes: 6 additions & 0 deletions mt7915/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ int mt7915_run(struct ieee80211_hw *hw)
mt7915_mac_enable_nf(dev, phy->mt76->band_idx);
}

ret = mt7915_mcu_set_thermal_throttling(phy,
MT7915_THERMAL_THROTTLE_MAX);

if (ret)
goto out;

ret = mt76_connac_mcu_set_rts_thresh(&dev->mt76, 0x92b,
phy->mt76->band_idx);
if (ret)
Expand Down

0 comments on commit 15b9dd6

Please sign in to comment.