* [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid.
@ 2022-07-27 23:01 greearb
2022-07-27 23:01 ` [PATCH 02/12] wifi: mt76: mt7915: allow processing TXS for 'NO_SKB' pkt-ids greearb
` (10 more replies)
0 siblings, 11 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
Explicitly cache short_gi and he_gi in wcid, don't try to store
it in the wcid.rate object. Slightly less confusing and less fragile
when TXS starts parsing lots of frames.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
These patches have mostly been posted before. They are now rebased on
top of latest 5.19 upstream kernel. Checkpatch has been run on them,
some patches have been merged, a few dropped per previous requests.
Lightly tested on 5.19, similar code was well tested on 5.17.
drivers/net/wireless/mediatek/mt76/mt76.h | 5 +++++
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 15 +++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 4e8997c45c1b..f994d1e18ac6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -272,7 +272,12 @@ struct mt76_wcid {
struct ewma_signal rssi;
int inactive_count;
+ /* cached rate, updated from mac_sta_poll() and from TXS callback logic,
+ * in 7915 at least.
+ */
struct rate_info rate;
+ bool rate_short_gi; /* cached HT/VHT short_gi, from mac_sta_poll() */
+ u8 rate_he_gi; /* cached HE GI, from mac_sta_poll() */
u16 idx;
u8 hw_key_idx;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 46fc07877b7d..62a2dc47938e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -206,12 +206,16 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
u8 offs = 24 + 2 * bw;
rate->he_gi = (val & (0x3 << offs)) >> offs;
+ msta->wcid.rate_he_gi = rate->he_gi; /* cache for later */
} else if (rate->flags &
(RATE_INFO_FLAGS_VHT_MCS | RATE_INFO_FLAGS_MCS)) {
- if (val & BIT(12 + bw))
+ if (val & BIT(12 + bw)) {
rate->flags |= RATE_INFO_FLAGS_SHORT_GI;
- else
+ msta->wcid.rate_short_gi = 1;
+ } else {
rate->flags &= ~RATE_INFO_FLAGS_SHORT_GI;
+ msta->wcid.rate_short_gi = 0;
+ }
}
}
@@ -1667,7 +1671,7 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
goto out;
rate.flags = RATE_INFO_FLAGS_MCS;
- if (wcid->rate.flags & RATE_INFO_FLAGS_SHORT_GI)
+ if (wcid->rate_short_gi)
rate.flags |= RATE_INFO_FLAGS_SHORT_GI;
break;
case MT_PHY_TYPE_VHT:
@@ -1675,6 +1679,8 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
goto out;
rate.flags = RATE_INFO_FLAGS_VHT_MCS;
+ if (wcid->rate_short_gi)
+ rate.flags |= RATE_INFO_FLAGS_SHORT_GI;
break;
case MT_PHY_TYPE_HE_SU:
case MT_PHY_TYPE_HE_EXT_SU:
@@ -1683,11 +1689,12 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
if (rate.mcs > 11)
goto out;
- rate.he_gi = wcid->rate.he_gi;
+ rate.he_gi = wcid->rate_he_gi;
rate.he_dcm = FIELD_GET(MT_TX_RATE_DCM, txrate);
rate.flags = RATE_INFO_FLAGS_HE_MCS;
break;
default:
+ WARN_ON_ONCE(true);
goto out;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 02/12] wifi: mt76: mt7915: allow processing TXS for 'NO_SKB' pkt-ids
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 03/12] wifi: mt76: mt7915: debugfs hook to enable TXS for NO_SKB pkt-ids greearb
` (9 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
This will let us update stats and wcid.rate for every TXS
callback we receive for a particular wcid.
For now, the TXS is not requested for NO_SKB frames, however.
That will be allowed in next patch.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
.../net/wireless/mediatek/mt76/mt7915/mac.c | 38 +++++++++++--------
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 62a2dc47938e..2d1a8d8b04fb 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1614,26 +1614,31 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
struct ieee80211_tx_info *info;
struct sk_buff_head list;
struct rate_info rate = {};
- struct sk_buff *skb;
+ struct sk_buff *skb = NULL;
+ bool check_status;
bool cck = false;
u32 txrate, txs, mode;
- mt76_tx_status_lock(mdev, &list);
- skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
- if (!skb)
- goto out_no_skb;
+ check_status = (pid >= MT_PACKET_ID_FIRST);
+
+ if (check_status) {
+ mt76_tx_status_lock(mdev, &list);
+ skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
+ }
txs = le32_to_cpu(txs_data[0]);
- info = IEEE80211_SKB_CB(skb);
- if (!(txs & MT_TXS0_ACK_ERROR_MASK))
- info->flags |= IEEE80211_TX_STAT_ACK;
+ if (skb) {
+ info = IEEE80211_SKB_CB(skb);
+ if (!(txs & MT_TXS0_ACK_ERROR_MASK))
+ info->flags |= IEEE80211_TX_STAT_ACK;
- info->status.ampdu_len = 1;
- info->status.ampdu_ack_len = !!(info->flags &
- IEEE80211_TX_STAT_ACK);
+ info->status.ampdu_len = 1;
+ info->status.ampdu_ack_len = !!(info->flags &
+ IEEE80211_TX_STAT_ACK);
- info->status.rates[0].idx = -1;
+ info->status.rates[0].idx = -1;
+ }
txrate = FIELD_GET(MT_TXS0_TX_RATE, txs);
@@ -1721,10 +1726,11 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
wcid->rate = rate;
out:
- mt76_tx_status_skb_done(mdev, skb, &list);
+ if (skb)
+ mt76_tx_status_skb_done(mdev, skb, &list);
-out_no_skb:
- mt76_tx_status_unlock(mdev, &list);
+ if (check_status)
+ mt76_tx_status_unlock(mdev, &list);
return !!skb;
}
@@ -1743,7 +1749,7 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
wcidx = le32_get_bits(txs_data[2], MT_TXS2_WCID);
pid = le32_get_bits(txs_data[3], MT_TXS3_PID);
- if (pid < MT_PACKET_ID_FIRST)
+ if (pid < MT_PACKET_ID_NO_SKB)
return;
if (wcidx >= mt7915_wtbl_size(dev))
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 03/12] wifi: mt76: mt7915: debugfs hook to enable TXS for NO_SKB pkt-ids
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
2022-07-27 23:01 ` [PATCH 02/12] wifi: mt76: mt7915: allow processing TXS for 'NO_SKB' pkt-ids greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 04/12] wifi: mt76: mt7915: txfree status to show txcount instead of latency greearb
` (8 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
This lets user turn on/off this feature. Enabling gives better
tx-rate related stats, but will cause extra driver and (maybe)
firmware work. Not sure if it actually affects performance or
not.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
.../wireless/mediatek/mt76/mt7915/debugfs.c | 24 +++++++++++++++++++
.../net/wireless/mediatek/mt76/mt7915/mac.c | 3 ++-
.../wireless/mediatek/mt76/mt7915/mt7915.h | 5 ++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
index cab6e02e1f8c..f71d80cd4002 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
@@ -633,6 +633,29 @@ mt7915_fw_util_wa_show(struct seq_file *file, void *data)
DEFINE_SHOW_ATTRIBUTE(mt7915_fw_util_wa);
+static int
+mt7915_txs_for_no_skb_set(void *data, u64 val)
+{
+ struct mt7915_dev *dev = data;
+
+ dev->txs_for_no_skb_enabled = !!val;
+
+ return 0;
+}
+
+static int
+mt7915_txs_for_no_skb_get(void *data, u64 *val)
+{
+ struct mt7915_dev *dev = data;
+
+ *val = dev->txs_for_no_skb_enabled;
+
+ return 0;
+}
+
+DEFINE_DEBUGFS_ATTRIBUTE(fops_txs_for_no_skb, mt7915_txs_for_no_skb_get,
+ mt7915_txs_for_no_skb_set, "%lld\n");
+
static void
mt7915_ampdu_stat_read_phy(struct mt7915_phy *phy,
struct seq_file *file)
@@ -1017,6 +1040,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
&mt7915_fw_util_wm_fops);
debugfs_create_file("fw_util_wa", 0400, dir, dev,
&mt7915_fw_util_wa_fops);
+ debugfs_create_file("force_txs", 0600, dir, dev, &fops_txs_for_no_skb);
debugfs_create_file("implicit_txbf", 0600, dir, dev,
&fops_implicit_txbf);
debugfs_create_file("txpower_sku", 0400, dir, phy,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 2d1a8d8b04fb..cf4d11c0a88d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1257,7 +1257,8 @@ void mt7915_mac_write_txwi(struct mt7915_dev *dev, __le32 *txwi,
txwi[4] = 0;
val = FIELD_PREP(MT_TXD5_PID, pid);
- if (pid >= MT_PACKET_ID_FIRST)
+ if (pid >= MT_PACKET_ID_FIRST ||
+ (pid == MT_PACKET_ID_NO_SKB && dev->txs_for_no_skb_enabled))
val |= MT_TXD5_TX_STATUS_HOST;
txwi[5] = cpu_to_le32(val);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index 4dcae6991669..fa755bfa223f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -294,6 +294,11 @@ struct mt7915_dev {
u16 chainmask;
u16 chainshift;
u32 hif_idx;
+ /* Should we request TXS for MT_PACKET_ID_NO_SKB? Doing so gives better
+ * costs but causes a great deal more TXS packet processing by driver and
+ * creation by firmware, so may be a performance drag.
+ */
+ bool txs_for_no_skb_enabled;
struct work_struct init_work;
struct work_struct rc_work;
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 04/12] wifi: mt76: mt7915: txfree status to show txcount instead of latency
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
2022-07-27 23:01 ` [PATCH 02/12] wifi: mt76: mt7915: allow processing TXS for 'NO_SKB' pkt-ids greearb
2022-07-27 23:01 ` [PATCH 03/12] wifi: mt76: mt7915: debugfs hook to enable TXS for NO_SKB pkt-ids greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 05/12] wifi: mt76: mt7915: report tx-retries greearb
` (7 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
Latency is not obviously that useful, but txcount can let us deduce
retries, which may be more interesting.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 6 +++++-
drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 4 ++++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 91a31b9d52f2..b4ceb78c6745 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -460,6 +460,9 @@ static void mt7915_mac_init(struct mt7915_dev *dev)
/* enable hardware de-agg */
mt76_set(dev, MT_MDP_DCR0, MT_MDP_DCR0_DAMSDU_EN);
+ /* disable Tx latency report to enable Tx count in txfree path */
+ mt76_clear(dev, MT_PLE_HOST_RPT0, MT_PLE_HOST_RPT0_TX_LATENCY);
+
for (i = 0; i < mt7915_wtbl_size(dev); i++)
mt7915_mac_wtbl_update(dev, i,
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.h b/drivers/net/wireless/mediatek/mt76/mt7915/mac.h
index 2e6c574ae2dd..503a4b90ad11 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.h
@@ -314,8 +314,12 @@ struct mt7915_tx_free {
#define MT_TX_FREE_MSDU_CNT GENMASK(9, 0)
#define MT_TX_FREE_MSDU_CNT_V0 GENMASK(6, 0)
#define MT_TX_FREE_WLAN_ID GENMASK(23, 14)
+/* when configured for txfree latency mode. See MT_PLE_HOST_RPT0_TX_LATENCY
+ * Not enabled by default now.
+ */
#define MT_TX_FREE_LATENCY GENMASK(12, 0)
-/* 0: success, others: dropped */
+/* when configured for txcount mode. See MT_PLE_HOST_RPT0_TX_LATENCY. */
+#define MT_TX_FREE_TXCNT GENMASK(12, 0)
#define MT_TX_FREE_MSDU_ID GENMASK(30, 16)
#define MT_TX_FREE_PAIR BIT(31)
#define MT_TX_FREE_MPDU_HEADER BIT(30)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
index 4953be208c5e..8bbc9a0ae699 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
@@ -132,6 +132,10 @@ enum offs_rev {
#define MT_PLE_BASE 0x820c0000
#define MT_PLE(ofs) (MT_PLE_BASE + (ofs))
+/* Modify whether txfree struct returns latency or txcount. */
+#define MT_PLE_HOST_RPT0 MT_PLE(0x030)
+#define MT_PLE_HOST_RPT0_TX_LATENCY BIT(3)
+
#define MT_FL_Q_EMPTY MT_PLE(__OFFS(PLE_FL_Q_EMPTY))
#define MT_FL_Q0_CTRL MT_PLE(__OFFS(PLE_FL_Q_CTRL))
#define MT_FL_Q2_CTRL MT_PLE(__OFFS(PLE_FL_Q_CTRL) + 0x8)
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 05/12] wifi: mt76: mt7915: report tx-retries
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (2 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 04/12] wifi: mt76: mt7915: txfree status to show txcount instead of latency greearb
@ 2022-07-27 23:01 ` greearb
2022-07-28 3:20 ` Ryder Lee
2022-07-27 23:01 ` [PATCH 06/12] wifi: mt76: mt7915: add support for tx-overrides greearb
` (6 subsequent siblings)
10 siblings, 1 reply; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
mac80211 stack will only report tx-status for skb claiming to be
ampdu heads, so lie a bit in mt7915 and set the flag so that mac80211
will record status for each skb.
mt7915 appears to report retry status on an individual per-skb manner,
so that method above seems to work.
Re-constitute the txinfo status rate info so that the rix and flags
is also at least close to correct. No direct way to report HE
rates that way, so mac80211 might could use some tweaking in
the ieee80211_tx_status_ext to take both info and status->rate
into account.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +
drivers/net/wireless/mediatek/mt76/mt76.h | 5 +
.../net/wireless/mediatek/mt76/mt7915/init.c | 1 +
.../net/wireless/mediatek/mt76/mt7915/mac.c | 95 ++++++++++++++++++-
.../net/wireless/mediatek/mt76/mt7915/mac.h | 6 +-
.../net/wireless/mediatek/mt76/mt7915/main.c | 4 +
.../net/wireless/mediatek/mt76/mt7921/main.c | 4 +
drivers/net/wireless/mediatek/mt76/tx.c | 18 +++-
8 files changed, 129 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 18b5de55334c..242e055fa475 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -1628,6 +1628,10 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
wi->sta_count++;
+ data[ei++] += stats->tx_mpdu_attempts;
+ data[ei++] += stats->tx_mpdu_fail;
+ data[ei++] += stats->tx_mpdu_retry;
+ data[ei++] += stats->tx_mpdu_ok;
data[ei++] += stats->tx_mode[MT_PHY_TYPE_CCK];
data[ei++] += stats->tx_mode[MT_PHY_TYPE_OFDM];
data[ei++] += stats->tx_mode[MT_PHY_TYPE_HT];
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index f994d1e18ac6..62a5e2ad6764 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -826,6 +826,11 @@ enum mt76_phy_type {
};
struct mt76_sta_stats {
+ unsigned long tx_mpdu_attempts; /* counting any retries */
+ unsigned long tx_mpdu_fail; /* frames that failed even after retry */
+ /* frames that succeeded, perhaps after retry */
+ unsigned long tx_mpdu_ok;
+ unsigned long tx_mpdu_retry; /* number of times frames were retried */
u64 tx_mode[__MT_PHY_TYPE_HE_MAX];
u64 tx_bw[4]; /* 20, 40, 80, 160 */
u64 tx_nss[4]; /* 1, 2, 3, 4 */
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index b4ceb78c6745..5af9fade3a17 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -329,6 +329,7 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
struct mt7915_dev *dev = phy->dev;
hw->queues = 4;
+ hw->max_report_rates = 1;
hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
hw->netdev_features = NETIF_F_RXCSUM;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index cf4d11c0a88d..800028a713a0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1428,18 +1428,23 @@ mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t)
static void
mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
- struct ieee80211_sta *sta, struct list_head *free_list)
+ struct ieee80211_sta *sta, struct list_head *free_list,
+ u32 tx_cnt, u32 tx_status, u32 ampdu)
{
struct mt76_dev *mdev = &dev->mt76;
struct mt7915_sta *msta;
struct mt76_wcid *wcid;
__le32 *txwi;
u16 wcid_idx;
+ struct ieee80211_tx_info *info;
+ struct ieee80211_tx_rate *rate;
mt7915_txp_skb_unmap(mdev, t);
if (!t->skb)
goto out;
+ rcu_read_lock(); /* protect wcid access */
+
txwi = (__le32 *)mt76_get_txwi_ptr(mdev, t);
if (sta) {
wcid = (struct mt76_wcid *)sta->drv_priv;
@@ -1462,6 +1467,74 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
if (sta && likely(t->skb->protocol != cpu_to_be16(ETH_P_PAE)))
mt7915_tx_check_aggr(sta, txwi);
+ info = IEEE80211_SKB_CB(t->skb);
+
+ /* Cannot clear all of info->status, we need the driver private
+ * status intact.
+ */
+ info->status.flags = 0;
+
+ rate = &info->status.rates[0];
+ rate->idx = -1; /* will over-write below if we found wcid */
+ info->status.rates[1].idx = -1; /* terminate rate list */
+
+ /* force TX_STAT_AMPDU to be set, or mac80211 will ignore status */
+ if (ampdu || (info->flags & IEEE80211_TX_CTL_AMPDU)) {
+ info->flags |= IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_CTL_AMPDU;
+ info->status.ampdu_len = 1;
+ }
+
+ /* update info status based on cached wcid rate info since
+ * txfree path doesn't give us a lot of info.
+ */
+ if (wcid) {
+ struct mt7915_sta *msta = container_of(wcid, struct mt7915_sta, wcid);
+ struct mt76_sta_stats *stats = &msta->stats;
+
+ if (wcid->rate.flags & RATE_INFO_FLAGS_MCS) {
+ rate->flags |= IEEE80211_TX_RC_MCS;
+ rate->idx = wcid->rate.mcs + wcid->rate.nss * 8;
+ } else if (wcid->rate.flags & RATE_INFO_FLAGS_VHT_MCS) {
+ rate->flags |= IEEE80211_TX_RC_VHT_MCS;
+ rate->idx = (wcid->rate.nss << 4) | wcid->rate.mcs;
+ } else if (wcid->rate.flags & RATE_INFO_FLAGS_HE_MCS) {
+ rate->idx = (wcid->rate.nss << 4) | wcid->rate.mcs;
+ } else {
+ rate->idx = wcid->rate.mcs;
+ }
+
+ switch (wcid->rate.bw) {
+ case RATE_INFO_BW_160:
+ rate->flags |= IEEE80211_TX_RC_160_MHZ_WIDTH;
+ break;
+ case RATE_INFO_BW_80:
+ rate->flags |= IEEE80211_TX_RC_80_MHZ_WIDTH;
+ break;
+ case RATE_INFO_BW_40:
+ rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
+ break;
+ }
+
+ stats->tx_mpdu_attempts += tx_cnt;
+ stats->tx_mpdu_retry += tx_cnt - 1;
+
+ if (tx_status == 0)
+ stats->tx_mpdu_ok++;
+ else
+ stats->tx_mpdu_fail++;
+ }
+
+ rcu_read_unlock();
+
+ /* Apply the values that this txfree path reports */
+ rate->count = tx_cnt;
+ if (tx_status == 0) {
+ info->flags |= IEEE80211_TX_STAT_ACK;
+ info->status.ampdu_ack_len = 1;
+ } else {
+ info->flags &= ~IEEE80211_TX_STAT_ACK;
+ }
+
__mt76_tx_complete_skb(mdev, wcid_idx, t->skb, free_list);
out:
@@ -1527,6 +1600,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
for (cur_info = &free->info[0]; count < total; cur_info++) {
u32 msdu, info = le32_to_cpu(*cur_info);
u8 i;
+ u32 tx_cnt, tx_status, ampdu;
/*
* 1'b1: new wcid pair.
@@ -1559,15 +1633,25 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
msdu = (info >> (15 * i)) & MT_TX_FREE_MSDU_ID_V3;
if (msdu == MT_TX_FREE_MSDU_ID_V3)
continue;
+
+ /* TODO: How to get tx_cnt, tx_status, ampdu*/
+ tx_status = 0;
+ tx_cnt = 1;
+ ampdu = 1;
} else {
msdu = FIELD_GET(MT_TX_FREE_MSDU_ID, info);
+
+ tx_cnt = FIELD_GET(MT_TX_FREE_TXCNT, info);
+ /* 0 = success, 1 dropped-by-hw, 2 dropped-by-cpu */
+ tx_status = FIELD_GET(MT_TX_FREE_STATUS_V1, info);
+ ampdu = FIELD_GET(MT_TX_FREE_HEAD_OF_PAGE, info);
}
count++;
txwi = mt76_token_release(mdev, msdu, &wake);
if (!txwi)
continue;
- mt7915_txwi_free(dev, txwi, sta, &free_list);
+ mt7915_txwi_free(dev, txwi, sta, &free_list, tx_cnt, tx_status, ampdu);
}
}
@@ -1599,7 +1683,10 @@ mt7915_mac_tx_free_v0(struct mt7915_dev *dev, void *data, int len)
if (!txwi)
continue;
- mt7915_txwi_free(dev, txwi, NULL, &free_list);
+ /* TODO: Can we report tx_cnt, status, ampdu in this path? */
+ mt7915_txwi_free(dev, txwi, NULL, &free_list,
+ 1 /* tx_cnt */, 0 /* tx-status-ok */,
+ 0/* ampdu */);
}
mt7915_mac_tx_free_done(dev, &free_list, wake);
@@ -2132,7 +2219,7 @@ void mt7915_tx_token_put(struct mt7915_dev *dev)
spin_lock_bh(&dev->mt76.token_lock);
idr_for_each_entry(&dev->mt76.token, txwi, id) {
- mt7915_txwi_free(dev, txwi, NULL, NULL);
+ mt7915_txwi_free(dev, txwi, NULL, NULL, 0, 1, 0);
dev->mt76.token_count--;
}
spin_unlock_bh(&dev->mt76.token_lock);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.h b/drivers/net/wireless/mediatek/mt76/mt7915/mac.h
index 503a4b90ad11..a3774df64e8b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.h
@@ -307,7 +307,7 @@ struct mt7915_tx_free {
__le16 rx_byte_cnt;
__le16 ctrl;
__le32 txd;
- __le32 info[];
+ __le32 info[]; /* DW3+ */
} __packed __aligned(4);
#define MT_TX_FREE_VER GENMASK(18, 16)
@@ -320,6 +320,10 @@ struct mt7915_tx_free {
#define MT_TX_FREE_LATENCY GENMASK(12, 0)
/* when configured for txcount mode. See MT_PLE_HOST_RPT0_TX_LATENCY. */
#define MT_TX_FREE_TXCNT GENMASK(12, 0)
+/* 0: success, others: dropped */
+#define MT_TX_FREE_STATUS_V1 GENMASK(14, 13)
+/* 0: not MPDU, 1: MSDU is head pkt of TXD page (MPDU) */
+#define MT_TX_FREE_HEAD_OF_PAGE BIT(15)
#define MT_TX_FREE_MSDU_ID GENMASK(30, 16)
#define MT_TX_FREE_PAIR BIT(31)
#define MT_TX_FREE_MPDU_HEADER BIT(30)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 710ca757fb52..910dc36bacc3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1158,6 +1158,10 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_ba_cnt",
/* per vif counters */
+ "v_tx_mpdu_attempts", /* counting any retries */
+ "v_tx_mpdu_fail", /* frames that failed even after retry */
+ "v_tx_mpdu_retry", /* number of times frames were retried */
+ "v_tx_mpdu_ok", /* frames that succeeded, perhaps after retry */
"v_tx_mode_cck",
"v_tx_mode_ofdm",
"v_tx_mode_ht",
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 80279f342109..ac78fcf285bf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -987,6 +987,10 @@ static const char mt7921_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_ampdu_bytes_cnt",
"rx_ba_cnt",
/* per vif counters */
+ "v_tx_mpdu_attempts", /* counting any retries */
+ "v_tx_mpdu_fail", /* frames that failed even after retry */
+ "v_tx_mpdu_retry", /* number of times frames were retried */
+ "v_tx_mpdu_ok", /* frames that succeeded, perhaps after retry */
"v_tx_mode_cck",
"v_tx_mode_ofdm",
"v_tx_mode_ht",
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index 1d08d99e298c..4e24116abc14 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -62,12 +62,15 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
};
struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
struct mt76_wcid *wcid;
+ struct ieee80211_rate_status status_rate = { 0 };
wcid = rcu_dereference(dev->wcid[cb->wcid]);
if (wcid) {
status.sta = wcid_to_sta(wcid);
- status.rates = NULL;
- status.n_rates = 0;
+ status.rates = &status_rate;
+ status.n_rates = 1;
+ status_rate.rate_idx = wcid->rate;
+ status_rate.try_count = 1;
}
hw = mt76_tx_status_get_hw(dev, skb);
@@ -228,15 +231,24 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
struct ieee80211_tx_status status = {
.skb = skb,
.free_list = free_list,
+ .info = IEEE80211_SKB_CB(skb),
};
struct mt76_wcid *wcid = NULL;
struct ieee80211_hw *hw;
struct sk_buff_head list;
+ struct ieee80211_rate_status status_rate = { 0 };
rcu_read_lock();
- if (wcid_idx < ARRAY_SIZE(dev->wcid))
+ if (wcid_idx < ARRAY_SIZE(dev->wcid)) {
wcid = rcu_dereference(dev->wcid[wcid_idx]);
+ if (wcid) {
+ status.rates = &status_rate;
+ status.n_rates = 1;
+ status_rate.rate_idx = wcid->rate;
+ status_rate.try_count = 1;
+ }
+ }
mt76_tx_check_non_aql(dev, wcid, skb);
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 06/12] wifi: mt76: mt7915: add support for tx-overrides
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (3 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 05/12] wifi: mt76: mt7915: report tx-retries greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 07/12] wifi: mt76: mt7915: support enabling rx group-5 status greearb
` (5 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
Allow setting fixied rate on transmit without using full testmode
logic.
The goal of tx-overrides is to allow receiver sensitivity and other
types of testing. Assumption is that the packets we care about
are larger data frames, so exclude smaller packets and non
data packets.
Setting transmit count to '0' means transmit once, but flag
the packet as no-ack.
Allows adjusting the tx power from default value, from -8 to +8
dbm. Adjusting above 0 is probably not a good idea.
The station wtbl logic to read rate-ctrl settings does not work when
fixed rates are used. So, read sgi settings from the txo configuration
in this case.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 4 +
.../wireless/mediatek/mt76/mt7915/debugfs.c | 225 ++++++++++++++++++
.../net/wireless/mediatek/mt76/mt7915/mac.c | 149 +++++++++---
.../wireless/mediatek/mt76/mt7915/mt7915.h | 2 +
4 files changed, 350 insertions(+), 30 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 62a5e2ad6764..682b554fbcb7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -611,6 +611,7 @@ struct mt76_testmode_ops {
struct mt76_testmode_data {
enum mt76_testmode_state state;
+ u8 txo_active; /* tx overrides are active */
u32 param_set[DIV_ROUND_UP(NUM_MT76_TM_ATTRS, 32)];
struct sk_buff *tx_skb;
@@ -625,6 +626,9 @@ struct mt76_testmode_data {
u8 tx_rate_ldpc;
u8 tx_rate_stbc;
u8 tx_ltf;
+ u8 txbw; /* specify TX bandwidth: 0 20Mhz, 1 40Mhz, 2 80Mhz, 3 160Mhz */
+ u8 tx_xmit_count; /* 0 means no-ack, 1 means one transmit, etc */
+ u8 tx_dynbw; /* 0: dynamic bw disabled, 1: dynamic bw enabled */
u8 tx_antenna_mask;
u8 tx_spe_idx;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
index f71d80cd4002..6ff1ce6e4cfc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
@@ -633,6 +633,229 @@ mt7915_fw_util_wa_show(struct seq_file *file, void *data)
DEFINE_SHOW_ATTRIBUTE(mt7915_fw_util_wa);
+struct mt7915_txo_worker_info {
+ char *buf;
+ int sofar;
+ int size;
+};
+
+static void mt7915_txo_worker(void *wi_data, struct ieee80211_sta *sta)
+{
+ struct mt7915_txo_worker_info *wi = wi_data;
+ struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
+ struct mt76_testmode_data *td = &msta->test;
+ struct ieee80211_vif *vif;
+ struct wireless_dev *wdev;
+
+ if (wi->sofar >= wi->size)
+ return; /* buffer is full */
+
+ vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
+ wdev = ieee80211_vif_to_wdev(vif);
+
+ wi->sofar += scnprintf(wi->buf + wi->sofar, wi->size - wi->sofar,
+ "vdev (%s) active=%d tpc=%d sgi=%d mcs=%d nss=%d"
+ " pream=%d retries=%d dynbw=%d bw=%d\n",
+ wdev->netdev->name,
+ td->txo_active, td->tx_power[0],
+ td->tx_rate_sgi, td->tx_rate_idx,
+ td->tx_rate_nss, td->tx_rate_mode,
+ td->tx_xmit_count, td->tx_dynbw,
+ td->txbw);
+}
+
+static ssize_t mt7915_read_set_rate_override(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct mt7915_dev *dev = file->private_data;
+ struct ieee80211_hw *hw = dev->mphy.hw;
+ char *buf2;
+ int size = 8000;
+ int rv, sofar;
+ struct mt7915_txo_worker_info wi;
+ const char buf[] =
+ "This allows specify specif tx rate parameters for all DATA"
+ " frames on a vdev\n"
+ "To set a value, you specify the dev-name and key-value pairs:\n"
+ "tpc=10 sgi=1 mcs=x nss=x pream=x retries=x dynbw=0|1 bw=x enable=0|1\n"
+ "pream: 0=cck, 1=ofdm, 2=HT, 3=VHT, 4=HE_SU\n"
+ "cck-mcs: 0=1Mbps, 1=2Mbps, 3=5.5Mbps, 3=11Mbps\n"
+ "ofdm-mcs: 0=6Mbps, 1=9Mbps, 2=12Mbps, 3=18Mbps, 4=24Mbps, 5=36Mbps,"
+ " 6=48Mbps, 7=54Mbps\n"
+ "tpc: adjust power from defaults, in 1/2 db units 0 - 31, 16 is default\n"
+ "bw is 0-3 for 20-160\n"
+ " For example, wlan0:\n"
+ "echo \"wlan0 tpc=255 sgi=1 mcs=0 nss=1 pream=3 retries=1 dynbw=0 bw=0"
+ " active=1\" > ...mt76/set_rate_override\n";
+
+ buf2 = kzalloc(size, GFP_KERNEL);
+ if (!buf2)
+ return -ENOMEM;
+ strcpy(buf2, buf);
+ sofar = strlen(buf2);
+
+ wi.sofar = sofar;
+ wi.buf = buf2;
+ wi.size = size;
+
+ ieee80211_iterate_stations_atomic(hw, mt7915_txo_worker, &wi);
+
+ rv = simple_read_from_buffer(user_buf, count, ppos, buf2, wi.sofar);
+ kfree(buf2);
+ return rv;
+}
+
+/* Set the rates for specific types of traffic.
+ */
+static ssize_t mt7915_write_set_rate_override(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct mt7915_dev *dev = file->private_data;
+ struct mt7915_sta *msta;
+ struct ieee80211_vif *vif;
+ struct mt76_testmode_data *td = NULL;
+ struct wireless_dev *wdev;
+ struct mt76_wcid *wcid;
+ struct mt76_phy *mphy = &dev->mt76.phy;
+ char buf[180];
+ char tmp[20];
+ char *tok;
+ int ret, i, j;
+ unsigned int vdev_id = 0xFFFF;
+ char *bufptr = buf;
+ long rc;
+ char dev_name_match[IFNAMSIZ + 2];
+
+ memset(buf, 0, sizeof(buf));
+
+ simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+
+ /* make sure that buf is null terminated */
+ buf[sizeof(buf) - 1] = 0;
+
+ /* drop the possible '\n' from the end */
+ if (buf[count - 1] == '\n')
+ buf[count - 1] = 0;
+
+ mutex_lock(&mphy->dev->mutex);
+
+ /* Ignore empty lines, 'echo' appends them sometimes at least. */
+ if (buf[0] == 0) {
+ ret = count;
+ goto exit;
+ }
+
+ /* String starts with vdev name, ie 'wlan0' Find the proper vif that
+ * matches the name.
+ */
+ for (i = 0; i < ARRAY_SIZE(dev->mt76.wcid_mask); i++) {
+ u32 mask = dev->mt76.wcid_mask[i];
+ u32 phy_mask = dev->mt76.wcid_phy_mask[i];
+
+ if (!mask)
+ continue;
+
+ for (j = i * 32; mask; j++, mask >>= 1, phy_mask >>= 1) {
+ if (!(mask & 1))
+ continue;
+
+ wcid = rcu_dereference(dev->mt76.wcid[j]);
+ if (!wcid)
+ continue;
+
+ msta = container_of(wcid, struct mt7915_sta, wcid);
+
+ vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
+
+ wdev = ieee80211_vif_to_wdev(vif);
+
+ if (!wdev)
+ continue;
+
+ snprintf(dev_name_match, sizeof(dev_name_match) - 1, "%s ",
+ wdev->netdev->name);
+
+ if (strncmp(dev_name_match, buf, strlen(dev_name_match)) == 0) {
+ vdev_id = j;
+ td = &msta->test;
+ bufptr = buf + strlen(dev_name_match) - 1;
+ break;
+ }
+ }
+ }
+
+ if (vdev_id == 0xFFFF) {
+ if (strstr(buf, "active=0")) {
+ /* Ignore, we are disabling it anyway */
+ ret = count;
+ goto exit;
+ } else {
+ dev_info(dev->mt76.dev,
+ "mt7915: set-rate-override, unknown netdev name: %s\n", buf);
+ }
+ ret = -EINVAL;
+ goto exit;
+ }
+
+#define MT7915_PARSE_LTOK(a, b) \
+ do { \
+ tok = strstr(bufptr, " " #a "="); \
+ if (tok) { \
+ char *tspace; \
+ tok += 1; /* move past initial space */ \
+ strncpy(tmp, tok + strlen(#a "="), sizeof(tmp) - 1); \
+ tmp[sizeof(tmp) - 1] = 0; \
+ tspace = strstr(tmp, " "); \
+ if (tspace) \
+ *tspace = 0; \
+ if (kstrtol(tmp, 0, &rc) != 0) \
+ dev_info(dev->mt76.dev, \
+ "mt7915: set-rate-override: " #a \
+ "= could not be parsed, tmp: %s\n", \
+ tmp); \
+ else \
+ td->b = rc; \
+ } \
+ } while (0)
+
+ /* TODO: Allow configuring LTF? */
+ td->tx_ltf = 1; /* 0: HTLTF 3.2us, 1: HELTF, 6.4us, 2 HELTF 12,8us */
+
+ MT7915_PARSE_LTOK(tpc, tx_power[0]);
+ MT7915_PARSE_LTOK(sgi, tx_rate_sgi);
+ MT7915_PARSE_LTOK(mcs, tx_rate_idx);
+ MT7915_PARSE_LTOK(nss, tx_rate_nss);
+ MT7915_PARSE_LTOK(pream, tx_rate_mode);
+ MT7915_PARSE_LTOK(retries, tx_xmit_count);
+ MT7915_PARSE_LTOK(dynbw, tx_dynbw);
+ MT7915_PARSE_LTOK(bw, txbw);
+ MT7915_PARSE_LTOK(active, txo_active);
+
+ dev_info(dev->mt76.dev,
+ "mt7915: set-rate-overrides, vdev %i(%s) active=%d tpc=%d sgi=%d mcs=%d"
+ " nss=%d pream=%d retries=%d dynbw=%d bw=%d\n",
+ vdev_id, dev_name_match,
+ td->txo_active, td->tx_power[0], td->tx_rate_sgi, td->tx_rate_idx,
+ td->tx_rate_nss, td->tx_rate_mode, td->tx_xmit_count, td->tx_dynbw,
+ td->txbw);
+
+ ret = count;
+
+exit:
+ mutex_unlock(&mphy->dev->mutex);
+ return ret;
+}
+
+static const struct file_operations fops_set_rate_override = {
+ .read = mt7915_read_set_rate_override,
+ .write = mt7915_write_set_rate_override,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
static int
mt7915_txs_for_no_skb_set(void *data, u64 val)
{
@@ -1057,6 +1280,8 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
debugfs_create_devm_seqfile(dev->mt76.dev, "rdd_monitor", dir,
mt7915_rdd_monitor);
}
+ debugfs_create_file("set_rate_override", 0600, dir,
+ dev, &fops_set_rate_override);
if (!ext_phy)
dev->debugfs_dir = dir;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 800028a713a0..17bc64960f04 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -177,6 +177,15 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
rx_cur);
}
+ /* If we are in tx-override mode, then wtbl doesn't provide useful report
+ * for the SGI/LGI stuff, so just get it from the override struct.
+ */
+ if (msta->test.txo_active) {
+ msta->wcid.rate_he_gi = msta->test.tx_rate_sgi;
+ msta->wcid.rate_short_gi = msta->test.tx_rate_sgi;
+ continue;
+ }
+
/*
* We don't support reading GI info from txs packets.
* For accurate tx status reporting and AQL improvement,
@@ -906,21 +915,32 @@ mt7915_mac_fill_rx_vector(struct mt7915_dev *dev, struct sk_buff *skb)
}
static void
-mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, struct mt76_wcid *wcid, __le32 *txwi,
struct sk_buff *skb)
{
-#ifdef CONFIG_NL80211_TESTMODE
- struct mt76_testmode_data *td = &phy->mt76->test;
+ struct mt76_testmode_data *td;
const struct ieee80211_rate *r;
- u8 bw, mode, nss = td->tx_rate_nss;
- u8 rate_idx = td->tx_rate_idx;
+ struct mt7915_sta *msta;
+ u8 bw, mode, nss;
+ u8 rate_idx;
u16 rateval = 0;
u32 val;
bool cck = false;
int band;
+ int xmit_count = 1;
- if (skb != phy->mt76->test.tx_skb)
- return;
+ msta = container_of(wcid, struct mt7915_sta, wcid);
+
+ if (msta->test.txo_active) {
+ td = &msta->test;
+ } else {
+ if (skb != phy->mt76->test.tx_skb)
+ return;
+ td = &phy->mt76->test;
+ }
+
+ nss = td->tx_rate_nss;
+ rate_idx = td->tx_rate_idx;
switch (td->tx_rate_mode) {
case MT76_TM_TX_MODE_HT:
@@ -961,20 +981,24 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
break;
}
- switch (phy->mt76->chandef.width) {
- case NL80211_CHAN_WIDTH_40:
- bw = 1;
- break;
- case NL80211_CHAN_WIDTH_80:
- bw = 2;
- break;
- case NL80211_CHAN_WIDTH_80P80:
- case NL80211_CHAN_WIDTH_160:
- bw = 3;
- break;
- default:
- bw = 0;
- break;
+ if (msta->test.txo_active) {
+ bw = td->txbw;
+ } else {
+ switch (phy->mt76->chandef.width) {
+ case NL80211_CHAN_WIDTH_40:
+ bw = 1;
+ break;
+ case NL80211_CHAN_WIDTH_80:
+ bw = 2;
+ break;
+ case NL80211_CHAN_WIDTH_80P80:
+ case NL80211_CHAN_WIDTH_160:
+ bw = 3;
+ break;
+ default:
+ bw = 0;
+ break;
+ }
}
if (td->tx_rate_stbc && nss == 1) {
@@ -988,10 +1012,24 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
txwi[2] |= cpu_to_le32(MT_TXD2_FIX_RATE);
- le32p_replace_bits(&txwi[3], 1, MT_TXD3_REM_TX_COUNT);
+ if (msta->test.txo_active) {
+ s8 txp = td->tx_power[0] - 16;
+
+ /* Support per-skb txpower, p.15 of tx doc, DW2 29:24. */
+ le32p_replace_bits(&txwi[2], txp, MT_TXD2_POWER_OFFSET);
+
+ xmit_count = td->tx_xmit_count;
+ if (xmit_count == 0) {
+ xmit_count = 1;
+ txwi[3] |= cpu_to_le32(MT_TXD3_NO_ACK);
+ }
+ }
+
+ le32p_replace_bits(&txwi[3], xmit_count, MT_TXD3_REM_TX_COUNT);
if (td->tx_rate_mode < MT76_TM_TX_MODE_HT)
txwi[3] |= cpu_to_le32(MT_TXD3_BA_DISABLE);
+ /* TODO: Take tx_dynbw into account in txo mode. */
val = MT_TXD6_FIXED_BW |
FIELD_PREP(MT_TXD6_BW, bw) |
FIELD_PREP(MT_TXD6_TX_RATE, rateval) |
@@ -1015,9 +1053,29 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
txwi[3] &= ~cpu_to_le32(MT_TXD3_SN_VALID);
txwi[6] |= cpu_to_le32(val);
- txwi[7] |= cpu_to_le32(FIELD_PREP(MT_TXD7_SPE_IDX,
- phy->test.spe_idx));
-#endif
+
+ if (msta->test.txo_active) {
+ /* see mt7915_tm_set_tx_frames */
+ static const u8 spe_idx_map[] = {0, 0, 1, 0, 3, 2, 4, 0,
+ 9, 8, 6, 10, 16, 12, 18, 0};
+ u32 spe_idx;
+
+ if (td->tx_spe_idx) {
+ spe_idx = td->tx_spe_idx;
+ } else {
+ u8 tx_ant = td->tx_antenna_mask;
+
+ if (!tx_ant) {
+ /* use antenna mask that matches our nss */
+ tx_ant = GENMASK(nss - 1, 0);
+ }
+ spe_idx = spe_idx_map[tx_ant];
+ }
+ txwi[7] |= cpu_to_le32(FIELD_PREP(MT_TXD7_SPE_IDX, spe_idx));
+ } else {
+ txwi[7] |= cpu_to_le32(FIELD_PREP(MT_TXD7_SPE_IDX,
+ phy->test.spe_idx));
+ }
}
static void
@@ -1282,8 +1340,29 @@ void mt7915_mac_write_txwi(struct mt7915_dev *dev, __le32 *txwi,
txwi[3] |= cpu_to_le32(MT_TXD3_BA_DISABLE);
}
- if (mt76_testmode_enabled(mphy))
- mt7915_mac_write_txwi_tm(mphy->priv, txwi, skb);
+#ifdef CONFIG_NL80211_TESTMODE
+ {
+ struct mt7915_sta *msta;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+ __le16 fc;
+
+ if (!is_8023)
+ fc = hdr->frame_control;
+
+ msta = container_of(wcid, struct mt7915_sta, wcid);
+ if (mt76_testmode_enabled(mphy) ||
+ (msta->test.txo_active &&
+ /* Only do txo overrides for (larger) data frames, this
+ * generally allows connection mgt frames to pass but still
+ * lets us force the data packets we care about.
+ */
+ skb->len >= 400 &&
+ (is_8023 ||
+ ((ieee80211_is_data_qos(fc) || ieee80211_is_data(fc)) &&
+ (!(ieee80211_is_qos_nullfunc(fc) || ieee80211_is_nullfunc(fc)))))))
+ mt7915_mac_write_txwi_tm(mphy->priv, wcid, txwi, skb);
+ }
+#endif
}
int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
@@ -1699,7 +1778,7 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
struct ieee80211_supported_band *sband;
struct mt76_dev *mdev = &dev->mt76;
struct mt76_phy *mphy;
- struct ieee80211_tx_info *info;
+ struct ieee80211_tx_info *info = NULL;
struct sk_buff_head list;
struct rate_info rate = {};
struct sk_buff *skb = NULL;
@@ -1724,8 +1803,6 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
info->status.ampdu_len = 1;
info->status.ampdu_ack_len = !!(info->flags &
IEEE80211_TX_STAT_ACK);
-
- info->status.rates[0].idx = -1;
}
txrate = FIELD_GET(MT_TXS0_TX_RATE, txs);
@@ -1757,6 +1834,8 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
rate.mcs = mt76_get_rate(mphy->dev, sband, rate.mcs, cck);
rate.legacy = sband->bitrates[rate.mcs].bitrate;
+ if (info)
+ info->status.rates[0].idx = rate.mcs;
break;
case MT_PHY_TYPE_HT:
case MT_PHY_TYPE_HT_GF:
@@ -1766,6 +1845,10 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
rate.flags = RATE_INFO_FLAGS_MCS;
if (wcid->rate_short_gi)
rate.flags |= RATE_INFO_FLAGS_SHORT_GI;
+ if (info) {
+ info->status.rates[0].idx = rate.mcs + rate.nss * 8;
+ info->status.rates[0].flags |= IEEE80211_TX_RC_MCS;
+ }
break;
case MT_PHY_TYPE_VHT:
if (rate.mcs > 9)
@@ -1774,6 +1857,10 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
rate.flags = RATE_INFO_FLAGS_VHT_MCS;
if (wcid->rate_short_gi)
rate.flags |= RATE_INFO_FLAGS_SHORT_GI;
+ if (info) {
+ info->status.rates[0].idx = (rate.nss << 4) | rate.mcs;
+ info->status.rates[0].flags |= IEEE80211_TX_RC_VHT_MCS;
+ }
break;
case MT_PHY_TYPE_HE_SU:
case MT_PHY_TYPE_HE_EXT_SU:
@@ -1785,6 +1872,8 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
rate.he_gi = wcid->rate_he_gi;
rate.he_dcm = FIELD_GET(MT_TX_RATE_DCM, txrate);
rate.flags = RATE_INFO_FLAGS_HE_MCS;
+ if (info)
+ info->status.rates[0].idx = (rate.nss << 4) | rate.mcs;
break;
default:
WARN_ON_ONCE(true);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index fa755bfa223f..e5008190472f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -132,6 +132,8 @@ struct mt7915_sta {
struct mt76_connac_sta_key_conf bip;
+ struct mt76_testmode_data test;
+
struct {
u8 flowid_mask;
struct mt7915_twt_flow flow[MT7915_MAX_STA_TWT_AGRT];
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 07/12] wifi: mt76: mt7915: support enabling rx group-5 status
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (4 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 06/12] wifi: mt76: mt7915: add support for tx-overrides greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 08/12] wifi: mt76: mt7915: use nss for calculating rx-chains greearb
` (4 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
When enabled, this allows per-skb rx rate reporting.
Enabling this may degrade RX performance, so it remains
disabled by default.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
.../wireless/mediatek/mt76/mt7915/debugfs.c | 33 +++++++++++++++++++
.../net/wireless/mediatek/mt76/mt7915/init.c | 3 +-
.../net/wireless/mediatek/mt76/mt7915/main.c | 2 +-
.../wireless/mediatek/mt76/mt7915/mt7915.h | 4 +++
4 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
index 6ff1ce6e4cfc..628d0f1f95be 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
@@ -879,6 +879,38 @@ mt7915_txs_for_no_skb_get(void *data, u64 *val)
DEFINE_DEBUGFS_ATTRIBUTE(fops_txs_for_no_skb, mt7915_txs_for_no_skb_get,
mt7915_txs_for_no_skb_set, "%lld\n");
+static int
+mt7915_rx_group_5_enable_set(void *data, u64 val)
+{
+ struct mt7915_dev *dev = data;
+
+ mutex_lock(&dev->mt76.mutex);
+
+ dev->rx_group_5_enable = !!val;
+
+ /* Enabled if we requested enabled OR if monitor mode is enabled. */
+ mt76_rmw_field(dev, MT_DMA_DCR0(0), MT_DMA_DCR0_RXD_G5_EN,
+ dev->rx_group_5_enable);
+ mt76_testmode_reset(dev->phy.mt76, true);
+
+ mutex_unlock(&dev->mt76.mutex);
+
+ return 0;
+}
+
+static int
+mt7915_rx_group_5_enable_get(void *data, u64 *val)
+{
+ struct mt7915_dev *dev = data;
+
+ *val = dev->rx_group_5_enable;
+
+ return 0;
+}
+
+DEFINE_DEBUGFS_ATTRIBUTE(fops_rx_group_5_enable, mt7915_rx_group_5_enable_get,
+ mt7915_rx_group_5_enable_set, "%lld\n");
+
static void
mt7915_ampdu_stat_read_phy(struct mt7915_phy *phy,
struct seq_file *file)
@@ -1264,6 +1296,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
debugfs_create_file("fw_util_wa", 0400, dir, dev,
&mt7915_fw_util_wa_fops);
debugfs_create_file("force_txs", 0600, dir, dev, &fops_txs_for_no_skb);
+ debugfs_create_file("rx_group_5_enable", 0600, dir, dev, &fops_rx_group_5_enable);
debugfs_create_file("implicit_txbf", 0600, dir, dev,
&fops_implicit_txbf);
debugfs_create_file("txpower_sku", 0400, dir, phy,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 5af9fade3a17..64ccba635113 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -440,7 +440,8 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_MAX_RX_LEN, 0x680);
/* mt7915: disable rx rate report by default due to hw issues */
- mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN);
+ mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN,
+ dev->rx_group_5_enable);
}
static void mt7915_mac_init(struct mt7915_dev *dev)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 910dc36bacc3..1e8f525fa669 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -467,7 +467,7 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
phy->rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN,
- enabled);
+ dev->rx_group_5_enable);
mt76_testmode_reset(phy->mt76, true);
mt76_wr(dev, MT_WF_RFCR(band), phy->rxfilter);
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index e5008190472f..39757e7f00e7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -301,6 +301,10 @@ struct mt7915_dev {
* creation by firmware, so may be a performance drag.
*/
bool txs_for_no_skb_enabled;
+ /* Should we enable group-5 rx descriptor logic? This may decrease RX
+ * throughput, but will give per skb rx rate information..
+ */
+ bool rx_group_5_enable;
struct work_struct init_work;
struct work_struct rc_work;
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 08/12] wifi: mt76: mt7915: use nss for calculating rx-chains
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (5 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 07/12] wifi: mt76: mt7915: support enabling rx group-5 status greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 09/12] wifi: mt76: mt7915: ethtool group-5 rx stats information greearb
` (3 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
When group-5 is enabled, we can find the actuall NSS used.
In that case, update the rx chains info so that the upper
stack can give better idea of actual antenna usage.
In case of stbc, the hardware already double nss, but rssi
is not reported properly (it is '17') for the secondary chains.
So, decrease nss in the status msg so that mac80211 does not try
to average the invalid RSSI.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
.../net/wireless/mediatek/mt76/mt7915/mac.c | 30 ++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 17bc64960f04..1d2909c0c04c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -487,10 +487,10 @@ static int
mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
struct mt76_rx_status *status,
struct ieee80211_supported_band *sband,
- __le32 *rxv, u8 *mode)
+ __le32 *rxv, u8 *mode, u8 *nss)
{
u32 v0, v2;
- u8 stbc, gi, bw, dcm, nss;
+ u8 stbc, gi, bw, dcm;
int i, idx;
bool cck = false;
@@ -498,7 +498,7 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
v2 = le32_to_cpu(rxv[2]);
idx = i = FIELD_GET(MT_PRXV_TX_RATE, v0);
- nss = FIELD_GET(MT_PRXV_NSTS, v0) + 1;
+ *nss = FIELD_GET(MT_PRXV_NSTS, v0) + 1;
if (!is_mt7915(&dev->mt76)) {
stbc = FIELD_GET(MT_PRXV_HT_STBC, v0);
@@ -530,7 +530,6 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
return -EINVAL;
break;
case MT_PHY_TYPE_VHT:
- status->nss = nss;
status->encoding = RX_ENC_VHT;
if (gi)
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
@@ -541,7 +540,6 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
case MT_PHY_TYPE_HE_SU:
case MT_PHY_TYPE_HE_EXT_SU:
case MT_PHY_TYPE_HE_TB:
- status->nss = nss;
status->encoding = RX_ENC_HE;
i &= GENMASK(3, 0);
@@ -582,6 +580,17 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
if (*mode < MT_PHY_TYPE_HE_SU && gi)
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
+ /* in case stbc is set, the nss value returned by hardware is already
+ * correct (ie, 2 instead of 1 for 1 spatial stream). But, at least in cases
+ * where we are configured for a single antenna, then the second chain RSSI is '17',
+ * which I take to mean 'not set'. To keep from adding this to the average rssi up in
+ * mac80211 rx logic, decrease nss here.
+ */
+ if (stbc)
+ *nss >>= 1;
+
+ status->nss = *nss;
+
return 0;
}
@@ -755,6 +764,8 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
if (rxd1 & MT_RXD1_NORMAL_GROUP_3) {
u32 v0, v1;
int ret;
+ int i;
+ u8 nss;
rxv = rxd; /* DW16 assuming group 1,2,3,4 */
rxd += 2;
@@ -771,11 +782,11 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
/* TODO: When group-5 is enabled, use nss (and stbc) to
* calculate chains properly for this particular skb.
*/
- status->chains = mphy->antenna_mask;
status->chain_signal[0] = to_rssi(MT_PRXV_RCPI0, v1);
status->chain_signal[1] = to_rssi(MT_PRXV_RCPI1, v1);
status->chain_signal[2] = to_rssi(MT_PRXV_RCPI2, v1);
status->chain_signal[3] = to_rssi(MT_PRXV_RCPI3, v1);
+ nss = hweight8(mphy->antenna_mask);
/* RXD Group 5 - C-RXV */
if (rxd1 & MT_RXD1_NORMAL_GROUP_5) {
@@ -786,10 +797,15 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
if (!is_mt7915(&dev->mt76) || (rxd1 & MT_RXD1_NORMAL_GROUP_5)) {
ret = mt7915_mac_fill_rx_rate(dev, status, sband, rxv,
- &mode);
+ &mode, &nss);
if (ret < 0)
return ret;
+ } else {
+ status->nss = nss;
}
+
+ for (i = 0; i < nss; i++)
+ status->chains |= BIT(i);
}
amsdu_info = FIELD_GET(MT_RXD4_NORMAL_PAYLOAD_FORMAT, rxd4);
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 09/12] wifi: mt76: mt7915: ethtool group-5 rx stats information
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (6 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 08/12] wifi: mt76: mt7915: use nss for calculating rx-chains greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 10/12] wifi: mt76: mt7915: ethtool counters for driver rx path greearb
` (2 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
Add ethtool support for rx-nss, rx-bw, rx-mode stats.
These are only valid when the group-5 rx stats are
enabled.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mac80211.c | 23 ++++++++++++++-
drivers/net/wireless/mediatek/mt76/mt76.h | 10 +++++++
.../net/wireless/mediatek/mt76/mt7915/mac.c | 29 +++++++++++++++++--
.../net/wireless/mediatek/mt76/mt7915/main.c | 21 ++++++++++++++
.../net/wireless/mediatek/mt76/mt7921/main.c | 21 ++++++++++++++
5 files changed, 101 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 242e055fa475..574e2c54637a 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -1623,7 +1623,7 @@ EXPORT_SYMBOL_GPL(mt76_calculate_default_rate);
void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
struct mt76_sta_stats *stats)
{
- int i, ei = wi->initial_stat_idx;
+ int i, q, ei = wi->initial_stat_idx;
u64 *data = wi->data;
wi->sta_count++;
@@ -1648,6 +1648,27 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
for (i = 0; i < 12; i++)
data[ei++] += stats->tx_mcs[i];
+ /* rx stats */
+ for (q = 0; q < ARRAY_SIZE(stats->rx_nss); q++)
+ data[ei++] += stats->rx_nss[q];
+
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_CCK];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_OFDM];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_HT];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_HT_GF];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_VHT];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_HE_SU];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_HE_EXT_SU];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_HE_TB];
+ data[ei++] += stats->rx_mode[MT_PHY_TYPE_HE_MU];
+
+ data[ei++] += stats->rx_bw_20;
+ data[ei++] += stats->rx_bw_40;
+ data[ei++] += stats->rx_bw_80;
+ data[ei++] += stats->rx_bw_160;
+ data[ei++] += stats->rx_bw_he_ru;
+ data[ei++] += stats->rx_ru_106;
+
wi->worker_stat_count = ei - wi->initial_stat_idx;
}
EXPORT_SYMBOL_GPL(mt76_ethtool_worker);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 682b554fbcb7..cbf1a30d3cc9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -839,6 +839,16 @@ struct mt76_sta_stats {
u64 tx_bw[4]; /* 20, 40, 80, 160 */
u64 tx_nss[4]; /* 1, 2, 3, 4 */
u64 tx_mcs[16]; /* mcs idx */
+
+ /* This section requires group-5 in rxd to be enabled for 7915. */
+ u32 rx_nss[4]; /* rx-nss histogram */
+ u32 rx_mode[__MT_PHY_TYPE_HE_MAX]; /* rx mode histogram */
+ u32 rx_bw_20;
+ u32 rx_bw_40;
+ u32 rx_bw_80;
+ u32 rx_bw_160;
+ u32 rx_bw_he_ru;
+ u32 rx_ru_106;
};
struct mt76_ethtool_worker_info {
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 1d2909c0c04c..ca6748d67ce0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -487,7 +487,8 @@ static int
mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
struct mt76_rx_status *status,
struct ieee80211_supported_band *sband,
- __le32 *rxv, u8 *mode, u8 *nss)
+ __le32 *rxv, u8 *mode, u8 *nss,
+ struct mt76_sta_stats *stats)
{
u32 v0, v2;
u8 stbc, gi, bw, dcm;
@@ -555,6 +556,8 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
switch (bw) {
case IEEE80211_STA_RX_BW_20:
+ if (stats)
+ stats->rx_bw_20++;
break;
case IEEE80211_STA_RX_BW_40:
if (*mode & MT_PHY_TYPE_HE_EXT_SU &&
@@ -562,15 +565,26 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
status->bw = RATE_INFO_BW_HE_RU;
status->he_ru =
NL80211_RATE_INFO_HE_RU_ALLOC_106;
+ if (stats) {
+ stats->rx_bw_he_ru++;
+ stats->rx_ru_106++;
+ }
} else {
status->bw = RATE_INFO_BW_40;
+ if (stats)
+ stats->rx_bw_40++;
}
break;
case IEEE80211_STA_RX_BW_80:
status->bw = RATE_INFO_BW_80;
+ if (stats)
+ stats->rx_bw_80++;
+
break;
case IEEE80211_STA_RX_BW_160:
status->bw = RATE_INFO_BW_160;
+ if (stats)
+ stats->rx_bw_160++;
break;
default:
return -EINVAL;
@@ -591,6 +605,15 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
status->nss = *nss;
+ if (stats) {
+ if (*nss > 3)
+ stats->rx_nss[3]++;
+ else
+ stats->rx_nss[*nss - 1]++;
+ if (*mode < __MT_PHY_TYPE_HE_MAX)
+ stats->rx_mode[*mode]++;
+ }
+
return 0;
}
@@ -618,6 +641,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
u16 seq_ctrl = 0;
__le16 fc = 0;
int idx;
+ struct mt76_sta_stats *stats = NULL;
memset(status, 0, sizeof(*status));
@@ -652,6 +676,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
struct mt7915_sta *msta;
msta = container_of(status->wcid, struct mt7915_sta, wcid);
+ stats = &msta->stats;
spin_lock_bh(&dev->sta_poll_lock);
if (list_empty(&msta->poll_list))
list_add_tail(&msta->poll_list, &dev->sta_poll_list);
@@ -797,7 +822,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
if (!is_mt7915(&dev->mt76) || (rxd1 & MT_RXD1_NORMAL_GROUP_5)) {
ret = mt7915_mac_fill_rx_rate(dev, status, sband, rxv,
- &mode, &nss);
+ &mode, &nss, stats);
if (ret < 0)
return ret;
} else {
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 1e8f525fa669..db3c32eebb04 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1187,6 +1187,27 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
"v_tx_mcs_9",
"v_tx_mcs_10",
"v_tx_mcs_11",
+
+ /* per-vif rx counters */
+ "v_rx_nss1",
+ "v_rx_nss2",
+ "v_rx_nss3",
+ "v_rx_nss4",
+ "v_rx_mode_cck",
+ "v_rx_mode_ofdm",
+ "v_rx_mode_ht",
+ "v_rx_mode_ht_gf",
+ "v_rx_mode_vht",
+ "v_rx_mode_he_su",
+ "v_rx_mode_he_ext_su",
+ "v_rx_mode_he_tb",
+ "v_rx_mode_he_mu",
+ "v_rx_bw_20",
+ "v_rx_bw_40",
+ "v_rx_bw_80",
+ "v_rx_bw_160",
+ "v_rx_bw_he_ru",
+ "v_rx_ru_106",
};
#define MT7915_SSTATS_LEN ARRAY_SIZE(mt7915_gstrings_stats)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index ac78fcf285bf..a23dd8f44e28 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -1016,6 +1016,27 @@ static const char mt7921_gstrings_stats[][ETH_GSTRING_LEN] = {
"v_tx_mcs_9",
"v_tx_mcs_10",
"v_tx_mcs_11",
+
+ /* per-vif rx counters */
+ "v_rx_nss1",
+ "v_rx_nss2",
+ "v_rx_nss3",
+ "v_rx_nss4",
+ "v_rx_mode_cck",
+ "v_rx_mode_ofdm",
+ "v_rx_mode_ht",
+ "v_rx_mode_ht_gf",
+ "v_rx_mode_vht",
+ "v_rx_mode_he_su",
+ "v_rx_mode_he_ext_su",
+ "v_rx_mode_he_tb",
+ "v_rx_mode_he_mu",
+ "v_rx_bw_20",
+ "v_rx_bw_40",
+ "v_rx_bw_80",
+ "v_rx_bw_160",
+ "v_rx_bw_he_ru",
+ "v_rx_ru_106",
};
static void
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 10/12] wifi: mt76: mt7915: ethtool counters for driver rx path
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (7 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 09/12] wifi: mt76: mt7915: ethtool group-5 rx stats information greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 11/12] wifi: mt76: mt7915: add ethtool tx/rx pkts/bytes greearb
2022-07-27 23:01 ` [PATCH 12/12] wifi: mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter greearb
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
Add some per-phy counters for rx errors in the driver.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
.../net/wireless/mediatek/mt76/mt7915/mac.c | 48 ++++++++++++++-----
.../net/wireless/mediatek/mt76/mt7915/main.c | 22 +++++++++
.../wireless/mediatek/mt76/mt7915/mt7915.h | 11 +++++
3 files changed, 70 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index ca6748d67ce0..408121c4260f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -488,6 +488,7 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
struct mt76_rx_status *status,
struct ieee80211_supported_band *sband,
__le32 *rxv, u8 *mode, u8 *nss,
+ struct mib_stats *mib,
struct mt76_sta_stats *stats)
{
u32 v0, v2;
@@ -527,15 +528,19 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
status->encoding = RX_ENC_HT;
if (gi)
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
- if (i > 31)
+ if (i > 31) {
+ mib->rx_d_bad_ht_rix++;
return -EINVAL;
+ }
break;
case MT_PHY_TYPE_VHT:
status->encoding = RX_ENC_VHT;
if (gi)
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
- if (i > 11)
+ if (i > 11) {
+ mib->rx_d_bad_vht_rix++;
return -EINVAL;
+ }
break;
case MT_PHY_TYPE_HE_MU:
case MT_PHY_TYPE_HE_SU:
@@ -550,6 +555,7 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
status->he_dcm = dcm;
break;
default:
+ mib->rx_d_bad_mode++;
return -EINVAL;
}
status->rate_idx = i;
@@ -587,6 +593,7 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
stats->rx_bw_160++;
break;
default:
+ mib->rx_d_bad_bw++;
return -EINVAL;
}
@@ -642,9 +649,12 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
__le16 fc = 0;
int idx;
struct mt76_sta_stats *stats = NULL;
+ struct mib_stats *mib = &phy->mib;
memset(status, 0, sizeof(*status));
+ mib->rx_d_skb++;
+
if ((rxd1 & MT_RXD1_NORMAL_BAND_IDX) && !phy->band_idx) {
mphy = dev->mt76.phy2;
if (!mphy)
@@ -657,8 +667,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
if (!test_bit(MT76_STATE_RUNNING, &mphy->state))
return -EINVAL;
- if (rxd2 & MT_RXD2_NORMAL_AMSDU_ERR)
+ if (rxd2 & MT_RXD2_NORMAL_AMSDU_ERR) {
+ mib->rx_d_rxd2_amsdu_err++;
return -EINVAL;
+ }
hdr_trans = rxd2 & MT_RXD2_NORMAL_HDR_TRANS;
if (hdr_trans && (rxd1 & MT_RXD1_NORMAL_CM))
@@ -692,8 +704,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
else
sband = &mphy->sband_2g.sband;
- if (!sband->channels)
+ if (!sband->channels) {
+ mib->rx_d_null_channels++;
return -EINVAL;
+ }
if ((rxd0 & csum_mask) == csum_mask)
skb->ip_summed = CHECKSUM_UNNECESSARY;
@@ -713,8 +727,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
remove_pad = FIELD_GET(MT_RXD2_NORMAL_HDR_OFFSET, rxd2);
- if (rxd2 & MT_RXD2_NORMAL_MAX_LEN_ERROR)
+ if (rxd2 & MT_RXD2_NORMAL_MAX_LEN_ERROR) {
+ mib->rx_d_max_len_err++;
return -EINVAL;
+ }
rxd += 6;
if (rxd1 & MT_RXD1_NORMAL_GROUP_4) {
@@ -726,8 +742,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
seq_ctrl = FIELD_GET(MT_RXD8_SEQ_CTRL, v2);
rxd += 4;
- if ((u8 *)rxd - skb->data >= skb->len)
+ if ((u8 *)rxd - skb->data >= skb->len) {
+ mib->rx_d_too_short++;
return -EINVAL;
+ }
}
if (rxd1 & MT_RXD1_NORMAL_GROUP_1) {
@@ -758,8 +776,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
}
}
rxd += 4;
- if ((u8 *)rxd - skb->data >= skb->len)
+ if ((u8 *)rxd - skb->data >= skb->len) {
+ mib->rx_d_too_short++;
return -EINVAL;
+ }
}
if (rxd1 & MT_RXD1_NORMAL_GROUP_2) {
@@ -781,8 +801,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
}
rxd += 2;
- if ((u8 *)rxd - skb->data >= skb->len)
+ if ((u8 *)rxd - skb->data >= skb->len) {
+ mib->rx_d_too_short++;
return -EINVAL;
+ }
}
/* RXD Group 3 - P-RXV */
@@ -794,8 +816,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
rxv = rxd; /* DW16 assuming group 1,2,3,4 */
rxd += 2;
- if ((u8 *)rxd - skb->data >= skb->len)
+ if ((u8 *)rxd - skb->data >= skb->len) {
+ mib->rx_d_too_short++;
return -EINVAL;
+ }
v0 = le32_to_cpu(rxv[0]); /* DW16, P-VEC1 31:0 */
/* DW17, RX_RCPI copied over P-VEC 64:32 Per RX Format doc. */
@@ -816,13 +840,15 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
/* RXD Group 5 - C-RXV */
if (rxd1 & MT_RXD1_NORMAL_GROUP_5) {
rxd += 18;
- if ((u8 *)rxd - skb->data >= skb->len)
+ if ((u8 *)rxd - skb->data >= skb->len) {
+ mib->rx_d_too_short++;
return -EINVAL;
+ }
}
if (!is_mt7915(&dev->mt76) || (rxd1 & MT_RXD1_NORMAL_GROUP_5)) {
ret = mt7915_mac_fill_rx_rate(dev, status, sband, rxv,
- &mode, &nss, stats);
+ &mode, &nss, mib, stats);
if (ret < 0)
return ret;
} else {
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index db3c32eebb04..b99a667ff251 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1157,6 +1157,17 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_vec_queue_overflow_drop_cnt",
"rx_ba_cnt",
+ /* driver rx counters */
+ "d_rx_skb",
+ "d_rx_rxd2_amsdu_err",
+ "d_rx_null_channels",
+ "d_rx_max_len_err",
+ "d_rx_too_short",
+ "d_rx_bad_ht_rix",
+ "d_rx_bad_vht_rix",
+ "d_rx_bad_mode",
+ "d_rx_bad_bw",
+
/* per vif counters */
"v_tx_mpdu_attempts", /* counting any retries */
"v_tx_mpdu_fail", /* frames that failed even after retry */
@@ -1323,6 +1334,17 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
data[ei++] = mib->rx_vec_queue_overflow_drop_cnt;
data[ei++] = mib->rx_ba_cnt;
+ /* rx stats from driver */
+ data[ei++] = mib->rx_d_skb;
+ data[ei++] = mib->rx_d_rxd2_amsdu_err;
+ data[ei++] = mib->rx_d_null_channels;
+ data[ei++] = mib->rx_d_max_len_err;
+ data[ei++] = mib->rx_d_too_short;
+ data[ei++] = mib->rx_d_bad_ht_rix;
+ data[ei++] = mib->rx_d_bad_vht_rix;
+ data[ei++] = mib->rx_d_bad_mode;
+ data[ei++] = mib->rx_d_bad_bw;
+
/* Add values for all stations owned by this vif */
wi.initial_stat_idx = ei;
ieee80211_iterate_stations_atomic(hw, mt7915_ethtool_worker, &wi);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index 39757e7f00e7..c5401e6e3cda 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -216,6 +216,17 @@ struct mib_stats {
u32 tx_amsdu[8];
u32 tx_amsdu_cnt;
+
+ /* rx stats from the driver */
+ u32 rx_d_skb; /* total skb received in rx path */
+ u32 rx_d_rxd2_amsdu_err;
+ u32 rx_d_null_channels;
+ u32 rx_d_max_len_err;
+ u32 rx_d_too_short;
+ u32 rx_d_bad_ht_rix;
+ u32 rx_d_bad_vht_rix;
+ u32 rx_d_bad_mode;
+ u32 rx_d_bad_bw;
};
struct mt7915_hif {
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 11/12] wifi: mt76: mt7915: add ethtool tx/rx pkts/bytes
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (8 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 10/12] wifi: mt76: mt7915: ethtool counters for driver rx path greearb
@ 2022-07-27 23:01 ` greearb
2022-07-27 23:01 ` [PATCH 12/12] wifi: mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter greearb
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
These stats are provided with same name by ath10k
and some intel wired NIC drivers. Add them to mt7915
as well to allow user-space code to more easily get some
basic stats out of the radio.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 7 +++++++
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 11 +++++++++++
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 7 +++++++
3 files changed, 25 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index 408121c4260f..afd480dd255b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -921,6 +921,9 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
if (rxv && mode >= MT_PHY_TYPE_HE_SU && !(status->flag & RX_FLAG_8023))
mt7915_mac_decode_he_radiotap(skb, rxv, mode);
+ mib->rx_pkts_nic++;
+ mib->rx_bytes_nic += skb->len;
+
if (!status->wcid || !ieee80211_is_data_qos(fc))
return 0;
@@ -1584,6 +1587,8 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
u16 wcid_idx;
struct ieee80211_tx_info *info;
struct ieee80211_tx_rate *rate;
+ struct mt7915_phy *phy = &dev->phy;
+ struct mib_stats *mib = &phy->mib;
mt7915_txp_skb_unmap(mdev, t);
if (!t->skb)
@@ -1675,6 +1680,8 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
/* Apply the values that this txfree path reports */
rate->count = tx_cnt;
if (tx_status == 0) {
+ mib->tx_pkts_nic++;
+ mib->tx_bytes_nic += t->skb->len;
info->flags |= IEEE80211_TX_STAT_ACK;
info->status.ampdu_ack_len = 1;
} else {
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index b99a667ff251..f2e215468a38 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1094,6 +1094,10 @@ static void mt7915_sta_set_decap_offload(struct ieee80211_hw *hw,
}
static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
+ "tx_pkts_nic", /* from driver, phy tx-ok skb */
+ "tx_bytes_nic", /* from driver, phy tx-ok bytes */
+ "rx_pkts_nic", /* from driver, phy rx OK skb */
+ "rx_bytes_nic", /* from driver, phy rx OK bytes */
"tx_ampdu_cnt",
"tx_stop_q_empty_cnt",
"tx_mpdu_attempts",
@@ -1275,6 +1279,13 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
mt7915_mac_update_stats(phy);
+ /* driver phy-wide stats */
+ data[ei++] = mib->tx_pkts_nic;
+ data[ei++] = mib->tx_bytes_nic;
+ data[ei++] = mib->rx_pkts_nic;
+ data[ei++] = mib->rx_bytes_nic;
+
+ /* MIB stats from FW/HW */
data[ei++] = mib->tx_ampdu_cnt;
data[ei++] = mib->tx_stop_q_empty_cnt;
data[ei++] = mib->tx_mpdu_attempts_cnt;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index c5401e6e3cda..c0bb87bf2a2c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -166,6 +166,13 @@ struct mt7915_vif {
/* per-phy stats. */
struct mib_stats {
+ /* phy wide driver stats */
+ u32 tx_pkts_nic; /* tx OK skb */
+ u32 tx_bytes_nic; /* tx OK bytes */
+ u32 rx_pkts_nic; /* rx OK skb */
+ u32 rx_bytes_nic; /* rx OK bytes */
+
+ /* MIB counters from FW/HW */
u32 ack_fail_cnt;
u32 fcs_err_cnt;
u32 rts_cnt;
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 12/12] wifi: mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
` (9 preceding siblings ...)
2022-07-27 23:01 ` [PATCH 11/12] wifi: mt76: mt7915: add ethtool tx/rx pkts/bytes greearb
@ 2022-07-27 23:01 ` greearb
10 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2022-07-27 23:01 UTC (permalink / raw)
To: linux-wireless; +Cc: nbd, Ben Greear
From: Ben Greear <greearb@candelatech.com>
Support this additional MIB counter, it shares register with
the rx-fifo-overflow counter.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 1 +
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 4 +++-
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index afd480dd255b..921fad4a3873 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -2490,6 +2490,7 @@ void mt7915_mac_update_stats(struct mt7915_phy *phy)
cnt = mt76_rr(dev, MT_MIB_SDR4(phy->band_idx));
mib->rx_fifo_full_cnt += FIELD_GET(MT_MIB_SDR4_RX_FIFO_FULL_MASK, cnt);
+ mib->rx_oor_cnt += FIELD_GET(MT_MIB_SDR4_RX_OOR_MASK, cnt);
cnt = mt76_rr(dev, MT_MIB_SDR5(phy->band_idx));
mib->rx_mpdu_cnt += cnt;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index f2e215468a38..4c847aac6de8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1148,6 +1148,7 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
/* rx counters */
"rx_fifo_full_cnt",
+ "rx_oor_cnt", /* rx ppdu length is bad */
"rx_mpdu_cnt",
"channel_idle_cnt",
"rx_vector_mismatch_cnt",
@@ -1331,7 +1332,8 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
data[ei++] = mib->tx_amsdu[i];
/* rx counters */
- data[ei++] = mib->rx_fifo_full_cnt;
+ data[ei++] = mib->rx_fifo_full_cnt; /* group-5 might exacerbate this */
+ data[ei++] = mib->rx_oor_cnt;
data[ei++] = mib->rx_mpdu_cnt;
data[ei++] = mib->channel_idle_cnt;
data[ei++] = mib->rx_vector_mismatch_cnt;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
index c0bb87bf2a2c..895dff9d053c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
@@ -208,6 +208,7 @@ struct mib_stats {
/* rx stats */
u32 rx_fifo_full_cnt;
+ u32 rx_oor_cnt;
u32 channel_idle_cnt;
u32 rx_vector_mismatch_cnt;
u32 rx_delimiter_fail_cnt;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
index 8bbc9a0ae699..d8c0caa71122 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
@@ -292,6 +292,7 @@ enum offs_rev {
#define MT_MIB_SDR4(_band) MT_WF_MIB(_band, __OFFS(MIB_SDR4))
#define MT_MIB_SDR4_RX_FIFO_FULL_MASK GENMASK(15, 0)
+#define MT_MIB_SDR4_RX_OOR_MASK GENMASK(23, 16)
/* rx mpdu counter, full 32 bits */
#define MT_MIB_SDR5(_band) MT_WF_MIB(_band, __OFFS(MIB_SDR5))
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 05/12] wifi: mt76: mt7915: report tx-retries
2022-07-27 23:01 ` [PATCH 05/12] wifi: mt76: mt7915: report tx-retries greearb
@ 2022-07-28 3:20 ` Ryder Lee
2022-07-28 4:11 ` Ben Greear
0 siblings, 1 reply; 16+ messages in thread
From: Ryder Lee @ 2022-07-28 3:20 UTC (permalink / raw)
To: greearb, linux-wireless; +Cc: nbd
On Wed, 2022-07-27 at 16:01 -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> mac80211 stack will only report tx-status for skb claiming to be
> ampdu heads, so lie a bit in mt7915 and set the flag so that mac80211
> will record status for each skb.
>
> mt7915 appears to report retry status on an individual per-skb
> manner,
> so that method above seems to work.
>
> Re-constitute the txinfo status rate info so that the rix and flags
> is also at least close to correct. No direct way to report HE
> rates that way, so mac80211 might could use some tweaking in
> the ieee80211_tx_status_ext to take both info and status->rate
> into account.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +
> drivers/net/wireless/mediatek/mt76/mt76.h | 5 +
> .../net/wireless/mediatek/mt76/mt7915/init.c | 1 +
> .../net/wireless/mediatek/mt76/mt7915/mac.c | 95
> ++++++++++++++++++-
> .../net/wireless/mediatek/mt76/mt7915/mac.h | 6 +-
> .../net/wireless/mediatek/mt76/mt7915/main.c | 4 +
> .../net/wireless/mediatek/mt76/mt7921/main.c | 4 +
> drivers/net/wireless/mediatek/mt76/tx.c | 18 +++-
> 8 files changed, 129 insertions(+), 8 deletions(-)
Hi Ben,
Looks like we have a similar goal but I don't use txs_for_no_skb.
What about directly switching to PPDU bases reporting (it should
include MPDUs total/failed/retries counts/bytes) and using
.sta_statistics? I think this might simplify the codes and can use
mac80211 ethtool as is.
I made these changes for .net_fill_forward_path (WED) cases. We're
doing some throughput tests.
https://pastebin.com/raw/qCzNNDzw
https://pastebin.com/raw/25Vsk2xs
Ryder
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 05/12] wifi: mt76: mt7915: report tx-retries
2022-07-28 3:20 ` Ryder Lee
@ 2022-07-28 4:11 ` Ben Greear
2022-07-28 4:22 ` Ryder Lee
0 siblings, 1 reply; 16+ messages in thread
From: Ben Greear @ 2022-07-28 4:11 UTC (permalink / raw)
To: Ryder Lee, linux-wireless; +Cc: nbd
On 7/27/22 8:20 PM, Ryder Lee wrote:
> On Wed, 2022-07-27 at 16:01 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> mac80211 stack will only report tx-status for skb claiming to be
>> ampdu heads, so lie a bit in mt7915 and set the flag so that mac80211
>> will record status for each skb.
>>
>> mt7915 appears to report retry status on an individual per-skb
>> manner,
>> so that method above seems to work.
>>
>> Re-constitute the txinfo status rate info so that the rix and flags
>> is also at least close to correct. No direct way to report HE
>> rates that way, so mac80211 might could use some tweaking in
>> the ieee80211_tx_status_ext to take both info and status->rate
>> into account.
>>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>> drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +
>> drivers/net/wireless/mediatek/mt76/mt76.h | 5 +
>> .../net/wireless/mediatek/mt76/mt7915/init.c | 1 +
>> .../net/wireless/mediatek/mt76/mt7915/mac.c | 95
>> ++++++++++++++++++-
>> .../net/wireless/mediatek/mt76/mt7915/mac.h | 6 +-
>> .../net/wireless/mediatek/mt76/mt7915/main.c | 4 +
>> .../net/wireless/mediatek/mt76/mt7921/main.c | 4 +
>> drivers/net/wireless/mediatek/mt76/tx.c | 18 +++-
>> 8 files changed, 129 insertions(+), 8 deletions(-)
>
> Hi Ben,
>
> Looks like we have a similar goal but I don't use txs_for_no_skb.
>
> What about directly switching to PPDU bases reporting (it should
> include MPDUs total/failed/retries counts/bytes) and using
> .sta_statistics? I think this might simplify the codes and can use
> mac80211 ethtool as is.
I like per-packet tx-status because then I can do histograms up in mac80211
(and the driver) to show distributions of nss, mcs, encoding types, etc.
I have not actually coded against the histograms I put in mac80211, but instead I'm using ethtool
to get the histograms directly out of mt76 driver.
At least for 7915, I think you have to enable txs-for-no-skb logic to get
details on mcs, nss and similar rate info?
Thanks,
Ben
>
> I made these changes for .net_fill_forward_path (WED) cases. We're
> doing some throughput tests.
> https://pastebin.com/raw/qCzNNDzw
> https://pastebin.com/raw/25Vsk2xs
>
>
> Ryder
>
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 05/12] wifi: mt76: mt7915: report tx-retries
2022-07-28 4:11 ` Ben Greear
@ 2022-07-28 4:22 ` Ryder Lee
0 siblings, 0 replies; 16+ messages in thread
From: Ryder Lee @ 2022-07-28 4:22 UTC (permalink / raw)
To: Ben Greear, linux-wireless; +Cc: nbd
On Wed, 2022-07-27 at 21:11 -0700, Ben Greear wrote:
> On 7/27/22 8:20 PM, Ryder Lee wrote:
> > On Wed, 2022-07-27 at 16:01 -0700, greearb@candelatech.com wrote:
> > > From: Ben Greear <greearb@candelatech.com>
> > >
> > > mac80211 stack will only report tx-status for skb claiming to be
> > > ampdu heads, so lie a bit in mt7915 and set the flag so that
> > > mac80211
> > > will record status for each skb.
> > >
> > > mt7915 appears to report retry status on an individual per-skb
> > > manner,
> > > so that method above seems to work.
> > >
> > > Re-constitute the txinfo status rate info so that the rix and
> > > flags
> > > is also at least close to correct. No direct way to report HE
> > > rates that way, so mac80211 might could use some tweaking in
> > > the ieee80211_tx_status_ext to take both info and status->rate
> > > into account.
> > >
> > > Signed-off-by: Ben Greear <greearb@candelatech.com>
> > > ---
> > > drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +
> > > drivers/net/wireless/mediatek/mt76/mt76.h | 5 +
> > > .../net/wireless/mediatek/mt76/mt7915/init.c | 1 +
> > > .../net/wireless/mediatek/mt76/mt7915/mac.c | 95
> > > ++++++++++++++++++-
> > > .../net/wireless/mediatek/mt76/mt7915/mac.h | 6 +-
> > > .../net/wireless/mediatek/mt76/mt7915/main.c | 4 +
> > > .../net/wireless/mediatek/mt76/mt7921/main.c | 4 +
> > > drivers/net/wireless/mediatek/mt76/tx.c | 18 +++-
> > > 8 files changed, 129 insertions(+), 8 deletions(-)
> >
> > Hi Ben,
> >
> > Looks like we have a similar goal but I don't use txs_for_no_skb.
> >
> > What about directly switching to PPDU bases reporting (it should
> > include MPDUs total/failed/retries counts/bytes) and using
> > .sta_statistics? I think this might simplify the codes and can use
> > mac80211 ethtool as is.
>
> I like per-packet tx-status because then I can do histograms up in
> mac80211
> (and the driver) to show distributions of nss, mcs, encoding types,
> etc.
>
> I have not actually coded against the histograms I put in mac80211,
> but instead I'm using ethtool
> to get the histograms directly out of mt76 driver.
>
> At least for 7915, I think you have to enable txs-for-no-skb logic to
> get
> details on mcs, nss and similar rate info?
>
> Thanks,
> Ben
>
Per PPDU txs provides mcs, nss and rate info as well, then we can use
.sta_statistics to report all sinfo we need. This is the way we use
for .net_fill_forward_path (WED) since it bypasses entire mac80211 data
path. We can also use iw station dump or ethtool to get histograms.
Ryder
> >
> > I made these changes for .net_fill_forward_path (WED) cases. We're
> > doing some throughput tests.
> >
https://urldefense.com/v3/__https://pastebin.com/raw/qCzNNDzw__;!!CTRNKA9wMg0ARbw!2EM8sO1SfUIboAp28ohdNT0OLwvCmyr-EuYoE-W1-IGsWn2RN8LI5LFNRjLBk3JM$
> >
> >
https://urldefense.com/v3/__https://pastebin.com/raw/25Vsk2xs__;!!CTRNKA9wMg0ARbw!2EM8sO1SfUIboAp28ohdNT0OLwvCmyr-EuYoE-W1-IGsWn2RN8LI5LFNRrLTxq5e$
> >
> >
> >
> > Ryder
> >
> >
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 12/12] wifi: mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter
2023-10-25 19:09 [PATCH 10/12] wifi: mt76: mt7915: ethtool counters for driver rx path greearb
@ 2023-10-25 19:09 ` greearb
0 siblings, 0 replies; 16+ messages in thread
From: greearb @ 2023-10-25 19:09 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
Support this additional MIB counter, it shares register with
the rx-fifo-overflow counter.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 1 +
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 4 +++-
drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 9b5c1ee7951d..03ec0eedaa8f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -944,6 +944,7 @@ struct mt76_mib_stats {
/* rx stats */
u32 rx_fifo_full_cnt;
+ u32 rx_oor_cnt;
u32 channel_idle_cnt;
u32 primary_cca_busy_time;
u32 secondary_cca_busy_time;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index f6d8e08d7083..d6ec34dff090 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1829,6 +1829,7 @@ void mt7915_mac_update_stats(struct mt7915_phy *phy)
cnt = mt76_rr(dev, MT_MIB_SDR4(band));
mib->rx_fifo_full_cnt += FIELD_GET(MT_MIB_SDR4_RX_FIFO_FULL_MASK, cnt);
+ mib->rx_oor_cnt += FIELD_GET(MT_MIB_SDR4_RX_OOR_MASK, cnt);
cnt = mt76_rr(dev, MT_MIB_SDR5(band));
mib->rx_mpdu_cnt += cnt;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index e9b3b247c0d5..e9d3a47e7747 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1309,6 +1309,7 @@ static const char mt7915_gstrings_stats[][ETH_GSTRING_LEN] = {
/* rx counters */
"rx_fifo_full_cnt",
+ "rx_oor_cnt", /* rx ppdu length is bad */
"rx_mpdu_cnt",
"channel_idle_cnt",
"primary_cca_busy_time",
@@ -1537,7 +1538,8 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
data[ei++] = mib->tx_amsdu[i];
/* rx counters */
- data[ei++] = mib->rx_fifo_full_cnt;
+ data[ei++] = mib->rx_fifo_full_cnt; /* group-5 might exacerbate this */
+ data[ei++] = mib->rx_oor_cnt;
data[ei++] = mib->rx_mpdu_cnt;
data[ei++] = mib->channel_idle_cnt;
data[ei++] = mib->primary_cca_busy_time;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
index 89ac8e6707b8..a3070f07177b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h
@@ -313,6 +313,7 @@ enum offs_rev {
#define MT_MIB_SDR4(_band) MT_WF_MIB(_band, __OFFS(MIB_SDR4))
#define MT_MIB_SDR4_RX_FIFO_FULL_MASK GENMASK(15, 0)
+#define MT_MIB_SDR4_RX_OOR_MASK GENMASK(23, 16)
/* rx mpdu counter, full 32 bits */
#define MT_MIB_SDR5(_band) MT_WF_MIB(_band, __OFFS(MIB_SDR5))
--
2.40.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2023-10-25 19:09 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 23:01 [PATCH 01/12] wifi: mt76: mt7915: cache sgi in wcid greearb
2022-07-27 23:01 ` [PATCH 02/12] wifi: mt76: mt7915: allow processing TXS for 'NO_SKB' pkt-ids greearb
2022-07-27 23:01 ` [PATCH 03/12] wifi: mt76: mt7915: debugfs hook to enable TXS for NO_SKB pkt-ids greearb
2022-07-27 23:01 ` [PATCH 04/12] wifi: mt76: mt7915: txfree status to show txcount instead of latency greearb
2022-07-27 23:01 ` [PATCH 05/12] wifi: mt76: mt7915: report tx-retries greearb
2022-07-28 3:20 ` Ryder Lee
2022-07-28 4:11 ` Ben Greear
2022-07-28 4:22 ` Ryder Lee
2022-07-27 23:01 ` [PATCH 06/12] wifi: mt76: mt7915: add support for tx-overrides greearb
2022-07-27 23:01 ` [PATCH 07/12] wifi: mt76: mt7915: support enabling rx group-5 status greearb
2022-07-27 23:01 ` [PATCH 08/12] wifi: mt76: mt7915: use nss for calculating rx-chains greearb
2022-07-27 23:01 ` [PATCH 09/12] wifi: mt76: mt7915: ethtool group-5 rx stats information greearb
2022-07-27 23:01 ` [PATCH 10/12] wifi: mt76: mt7915: ethtool counters for driver rx path greearb
2022-07-27 23:01 ` [PATCH 11/12] wifi: mt76: mt7915: add ethtool tx/rx pkts/bytes greearb
2022-07-27 23:01 ` [PATCH 12/12] wifi: mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter greearb
2023-10-25 19:09 [PATCH 10/12] wifi: mt76: mt7915: ethtool counters for driver rx path greearb
2023-10-25 19:09 ` [PATCH 12/12] wifi: mt76: mt7915: add rx-ppdu-size-out-of-range ethtool counter greearb
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.