wifi: mt76: mt7915: cleanup mt7915_get_power_bound

Refactor for making use of mt76_get_power_bound instead of the specific
mt7915_get_power_bound, since we need this for other chipsets as well
when calculating txpower

Signed-off-by: Razvan Grigore <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Razvan Grigore
2025-03-10 13:24:28 +01:00
committed by Felix Fietkau
parent 687e2fdfbf
commit 43aaa62fbc
3 changed files with 6 additions and 18 deletions
+4 -4
View File
@@ -1085,13 +1085,13 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf,
return -EINVAL;
if (pwr160)
pwr160 = mt7915_get_power_bound(phy, pwr160);
pwr160 = mt76_get_power_bound(mphy, pwr160);
if (pwr80)
pwr80 = mt7915_get_power_bound(phy, pwr80);
pwr80 = mt76_get_power_bound(mphy, pwr80);
if (pwr40)
pwr40 = mt7915_get_power_bound(phy, pwr40);
pwr40 = mt76_get_power_bound(mphy, pwr40);
if (pwr20)
pwr20 = mt7915_get_power_bound(phy, pwr20);
pwr20 = mt76_get_power_bound(mphy, pwr20);
if (pwr160 < 0 || pwr80 < 0 || pwr40 < 0 || pwr20 < 0)
return -EINVAL;