@@ -594,9 +594,15 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
txs = le32_to_cpu(txs_data[0]);
+ mphy = mt76_dev_phy(dev, wcid->phy_idx);
+
/* PPDU based reporting */
if (mtk_wed_device_active(&dev->mmio.wed) &&
FIELD_GET(MT_TXS0_TXS_FORMAT, txs) > 1) {
+ __ieee80211_tpt_led_trig_trx(mphy->hw,
+ le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE) -
+ le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_BYTE), 0);
+
stats->tx_bytes +=
le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE) -
le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_BYTE);
@@ -637,10 +643,6 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
cck = true;
fallthrough;
case MT_PHY_TYPE_OFDM:
- mphy = &dev->phy;
- if (wcid->phy_idx == MT_BAND1 && dev->phys[MT_BAND1])
- mphy = dev->phys[MT_BAND1];
-
if (mphy->chandef.chan->band == NL80211_BAND_5GHZ)
sband = &mphy->sband_5g.sband;
else if (mphy->chandef.chan->band == NL80211_BAND_6GHZ)
@@ -657,6 +657,11 @@ static void mt7915_mmio_wed_update_rx_stats(struct mtk_wed_device *wed,
wcid = rcu_dereference(dev->mt76.wcid[idx]);
if (wcid) {
+ struct mt76_phy *mphy = mt76_dev_phy(&dev->mt76, wcid->phy_idx);
+
+ __ieee80211_tpt_led_trig_trx(mphy->hw, 0
+ le32_to_cpu(stats->rx_byte_cnt));
+
wcid->stats.rx_bytes += le32_to_cpu(stats->rx_byte_cnt);
wcid->stats.rx_packets += le32_to_cpu(stats->rx_pkt_cnt);
wcid->stats.rx_errors += le32_to_cpu(stats->rx_err_cnt);
@@ -463,6 +463,8 @@ mt7996_mcu_rx_all_sta_info_event(struct mt7996_dev *dev, struct sk_buff *skb)
u8 ac;
u16 wlan_idx;
struct mt76_wcid *wcid;
+ struct mt76_phy *mphy;
+ u32 tx_bytes, rx_bytes;
switch (le16_to_cpu(res->tag)) {
case UNI_ALL_STA_TXRX_ADM_STAT:
@@ -472,11 +474,16 @@ mt7996_mcu_rx_all_sta_info_event(struct mt7996_dev *dev, struct sk_buff *skb)
if (!wcid)
break;
+ mphy = mt76_dev_phy(&dev->mt76, wcid->phy_idx);
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
- wcid->stats.tx_bytes +=
- le32_to_cpu(res->adm_stat[i].tx_bytes[ac]);
- wcid->stats.rx_bytes +=
- le32_to_cpu(res->adm_stat[i].rx_bytes[ac]);
+ tx_bytes = le32_to_cpu(res->adm_stat[i].tx_bytes[ac]);
+ rx_bytes = le32_to_cpu(res->adm_stat[i].rx_bytes[ac]);
+
+ wcid->stats.tx_bytes += tx_bytes;
+ wcid->stats.rx_bytes += rx_bytes;
+
+ __ieee80211_tpt_led_trig_trx(mphy->hw,
+ tx_bytes, rx_bytes);
}
break;
case UNI_ALL_STA_TXRX_MSDU_COUNT: