From 6ccc76d92c1badd407f515b7dd897bed884cbce2 Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Thu, 11 Feb 2010 10:35:00 +0100 Subject: [PATCH] Added Rx A-MSDU statistic counter --- rt2860.c | 18 +++++++++++++++++- rt2860_softc.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/rt2860.c b/rt2860.c index e4739c2..5eebab4 100644 --- a/rt2860.c +++ b/rt2860.c @@ -5040,6 +5040,19 @@ static int rt2860_rx_eof(struct rt2860_softc *sc, int limit) ampdu = 0; } + /* check for A-MSDU */ + + if (desc_flags & RT2860_RXDESC_FLAGS_AMSDU) + { + sc->rx_amsdu++; + + amsdu = 1; + } + else + { + amsdu = 0; + } + ant = rt2860_maxrssi_rxpath(sc, rxwi); rssi = rxwi->rssi[ant]; rssi_dbm = rt2860_rssi2dbm(sc, rssi, ant); @@ -5049,7 +5062,6 @@ static int rt2860_rx_eof(struct rt2860_softc *sc, int limit) shortgi = ((rxwi->phymode_stbc_shortgi >> RT2860_RXWI_SHORTGI_SHIFT) & RT2860_RXWI_SHORTGI_MASK); mcs = ((rxwi->bw_mcs >> RT2860_RXWI_MCS_SHIFT) & RT2860_RXWI_MCS_MASK); - amsdu = (desc_flags & RT2860_RXDESC_FLAGS_AMSDU) ? 1 : 0; if (ieee80211_radiotap_active(ic)) { @@ -6219,6 +6231,10 @@ static void rt2860_sysctl_attach(struct rt2860_softc *sc) "Rx A-MPDU"); SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, + "rx_amsdu", CTLFLAG_RD, &sc->rx_amsdu, 0, + "Rx A-MSDU"); + + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, "rx_crc_errors", CTLFLAG_RD, &sc->rx_crc_errors, 0, "Rx CRC errors"); diff --git a/rt2860_softc.h b/rt2860_softc.h index 6319ac7..e554123 100644 --- a/rt2860_softc.h +++ b/rt2860_softc.h @@ -340,6 +340,7 @@ struct rt2860_softc unsigned long rx_packets; unsigned long rx_ampdu; + unsigned long rx_amsdu; unsigned long rx_crc_errors; unsigned long rx_phy_errors; unsigned long rx_false_ccas; -- 2.11.4.GIT