mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: remove mt76_calculate_default_rate()
It is only used in mt76_connac2_mac_tx_rate_val, inline it there. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+13
-1
@@ -299,6 +299,7 @@ u16 mt76_connac2_mac_tx_rate_val(struct mt76_phy *mphy,
|
||||
&mvif->ctx->def : &mphy->chandef;
|
||||
u8 nss = 0, mode = 0, band = chandef->chan->band;
|
||||
int rateidx = 0, mcast_rate;
|
||||
int offset = 0;
|
||||
|
||||
if (!vif)
|
||||
goto legacy;
|
||||
@@ -330,7 +331,18 @@ u16 mt76_connac2_mac_tx_rate_val(struct mt76_phy *mphy,
|
||||
rateidx = ffs(vif->bss_conf.basic_rates) - 1;
|
||||
|
||||
legacy:
|
||||
rateidx = mt76_calculate_default_rate(mphy, vif, rateidx);
|
||||
if (band != NL80211_BAND_2GHZ)
|
||||
offset = 4;
|
||||
|
||||
/* pick the lowest rate for hidden nodes */
|
||||
if (rateidx < 0)
|
||||
rateidx = 0;
|
||||
|
||||
rateidx += offset;
|
||||
if (rateidx >= ARRAY_SIZE(mt76_rates))
|
||||
rateidx = offset;
|
||||
|
||||
rateidx = mt76_rates[rateidx].hw_value;
|
||||
mode = rateidx >> 8;
|
||||
rateidx &= GENMASK(7, 0);
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user