mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: rely on mac80211 utility routines to compute airtime
Rely on mac80211 airitme utility routines and remove mt76 duplicated code to estimate tx/rx airtime Signed-off-by: Lorenzo Bianconi <[email protected]> Acked-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
c94afbe3d7
commit
29fec3a9b0
+9
-1
@@ -746,10 +746,18 @@ mt76_airtime_report(struct mt76_dev *dev, struct mt76_rx_status *status,
|
||||
int len)
|
||||
{
|
||||
struct mt76_wcid *wcid = status->wcid;
|
||||
struct ieee80211_rx_status info = {
|
||||
.enc_flags = status->enc_flags,
|
||||
.rate_idx = status->rate_idx,
|
||||
.encoding = status->encoding,
|
||||
.band = status->band,
|
||||
.nss = status->nss,
|
||||
.bw = status->bw,
|
||||
};
|
||||
struct ieee80211_sta *sta;
|
||||
u32 airtime;
|
||||
|
||||
airtime = mt76_calc_rx_airtime(dev, status, len);
|
||||
airtime = ieee80211_calc_rx_airtime(dev->hw, &info, len);
|
||||
spin_lock(&dev->cc_lock);
|
||||
dev->cur_cc_bss_rx += airtime;
|
||||
spin_unlock(&dev->cc_lock);
|
||||
|
||||
Reference in New Issue
Block a user