mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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:
committed by
Felix Fietkau
parent
687e2fdfbf
commit
43aaa62fbc
+4
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user