From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 09/11] mt76: mt7915: fix queue/tid mapping for airtime reporting
Date: Tue, 8 Sep 2020 23:17:54 +0200 [thread overview]
Message-ID: <20200908211756.15998-9-nbd@nbd.name> (raw)
In-Reply-To: <20200908211756.15998-1-nbd@nbd.name>
Unlike 7615, 7915 uses the same AC index for rx and tx, which matches the
LMAC queue mapping
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 54088d8e151f..defd0a98f7e2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -105,12 +105,6 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
[IEEE80211_AC_VI] = 4,
[IEEE80211_AC_VO] = 6
};
- static const u8 hw_queue_map[] = {
- [IEEE80211_AC_BK] = 0,
- [IEEE80211_AC_BE] = 1,
- [IEEE80211_AC_VI] = 2,
- [IEEE80211_AC_VO] = 3,
- };
struct ieee80211_sta *sta;
struct mt7915_sta *msta;
u32 tx_time[IEEE80211_NUM_ACS], rx_time[IEEE80211_NUM_ACS];
@@ -169,8 +163,9 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
sta = container_of((void *)msta, struct ieee80211_sta,
drv_priv);
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
- u32 tx_cur = tx_time[i];
- u32 rx_cur = rx_time[hw_queue_map[i]];
+ u8 q = mt7915_lmac_mapping(dev, i);
+ u32 tx_cur = tx_time[q];
+ u32 rx_cur = rx_time[q];
u8 tid = ac_to_tid[i];
if (!tx_cur && !rx_cur)
--
2.28.0
next prev parent reply other threads:[~2020-09-08 21:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 21:17 [PATCH 01/11] mt76: mt7615: fix MT_ANT_SWITCH_CON register definition Felix Fietkau
2020-09-08 21:17 ` [PATCH 02/11] mt76: mt7615: fix antenna selection for testmode tx_frames Felix Fietkau
2020-09-08 21:17 ` [PATCH 03/11] mt76: testmode: add a limit for queued tx_frames packets Felix Fietkau
2020-09-08 21:17 ` [PATCH 04/11] mt76: add utility functions for deferring work to a kernel thread Felix Fietkau
2020-09-11 8:15 ` Kalle Valo
[not found] ` <010101747c3b747d-09af9fc1-2e74-400f-89f5-fae71b7d163b-000000@us-west-2.amazonses.com>
2020-09-12 5:05 ` Felix Fietkau
2020-09-14 7:55 ` Kalle Valo
2020-09-15 9:09 ` [PATCH v2 4/11] " Felix Fietkau
2020-09-08 21:17 ` [PATCH 05/11] mt76: convert from tx tasklet to tx worker thread Felix Fietkau
2020-09-08 21:17 ` [PATCH 06/11] mt76: mt7915: fix HE BSS info Felix Fietkau
2020-09-08 21:17 ` [PATCH 07/11] mt76: dma: cache dma map address/len in struct mt76_queue_entry Felix Fietkau
2020-09-08 21:17 ` [PATCH 08/11] mt76: mt7915: simplify mt7915_lmac_mapping Felix Fietkau
2020-09-08 21:17 ` Felix Fietkau [this message]
2020-09-08 21:17 ` [PATCH 10/11] mt76: move txwi handling code to dma.c, since it is mmio specific Felix Fietkau
2020-09-08 21:17 ` [PATCH 11/11] mt76: remove retry_q from struct mt76_txq and related code Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200908211756.15998-9-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).