mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt76x02: simplify struct mt76x02_rate_power
- remove stbc, because mt76x0 doesn't support it and mt76x2 uses the same values as HT/VHT - reduce vht array to 2 elements, because VHT MCS0-7 are the same as HT Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+1
-13
@@ -324,22 +324,10 @@ void mt76x2_get_rate_power(struct mt76x02_dev *dev, struct mt76x02_rate_power *t
|
||||
t->ht[12] = t->ht[13] = mt76x02_rate_power_val(val);
|
||||
t->ht[14] = t->ht[15] = mt76x02_rate_power_val(val >> 8);
|
||||
|
||||
val = mt76x02_eeprom_get(dev, MT_EE_TX_POWER_VHT_MCS0);
|
||||
t->vht[0] = t->vht[1] = mt76x02_rate_power_val(val);
|
||||
t->vht[2] = t->vht[3] = mt76x02_rate_power_val(val >> 8);
|
||||
|
||||
val = mt76x02_eeprom_get(dev, MT_EE_TX_POWER_VHT_MCS4);
|
||||
t->vht[4] = t->vht[5] = mt76x02_rate_power_val(val);
|
||||
t->vht[6] = t->vht[7] = mt76x02_rate_power_val(val >> 8);
|
||||
|
||||
val = mt76x02_eeprom_get(dev, MT_EE_TX_POWER_VHT_MCS8);
|
||||
if (!is_5ghz)
|
||||
val >>= 8;
|
||||
t->vht[8] = t->vht[9] = mt76x02_rate_power_val(val >> 8);
|
||||
|
||||
memcpy(t->stbc, t->ht, sizeof(t->stbc[0]) * 8);
|
||||
t->stbc[8] = t->vht[8];
|
||||
t->stbc[9] = t->vht[9];
|
||||
t->vht[0] = t->vht[1] = mt76x02_rate_power_val(val >> 8);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x2_get_rate_power);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user