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:
-24
@@ -1800,30 +1800,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_init_queue);
|
||||
|
||||
u16 mt76_calculate_default_rate(struct mt76_phy *phy,
|
||||
struct ieee80211_vif *vif, int rateidx)
|
||||
{
|
||||
struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
|
||||
struct cfg80211_chan_def *chandef = mvif->ctx ?
|
||||
&mvif->ctx->def :
|
||||
&phy->chandef;
|
||||
int offset = 0;
|
||||
|
||||
if (chandef->chan->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;
|
||||
|
||||
return mt76_rates[rateidx].hw_value;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_calculate_default_rate);
|
||||
|
||||
void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
|
||||
struct mt76_sta_stats *stats, bool eht)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user