diff options
author | sam <sam@FreeBSD.org> | 2006-08-10 16:31:37 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-08-10 16:31:37 +0000 |
commit | 622bd681b43fe56187a8ccb010b5ef42e7e15848 (patch) | |
tree | 1f791fe2b6b8d4d271907b9f9d8ca95f0b4d2a12 | |
parent | cf1c43abeb758715c075d14cecff730eeba644d1 (diff) | |
download | FreeBSD-src-622bd681b43fe56187a8ccb010b5ef42e7e15848.zip FreeBSD-src-622bd681b43fe56187a8ccb010b5ef42e7e15848.tar.gz |
o add noise floor to stats
o include current tx rate in stats so athstats gets a consistent
snapshot and doesn't have to make an extra ioctl
o record tx rate for raw frames
MFC after: 3 weeks
-rw-r--r-- | sys/dev/ath/if_ath.c | 4 | ||||
-rw-r--r-- | sys/dev/ath/if_athioctl.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index cd51f53..0e121cc 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -5152,6 +5152,9 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sc->sc_stats.ast_tx_packets = ifp->if_opackets; sc->sc_stats.ast_rx_packets = ifp->if_ipackets; sc->sc_stats.ast_rx_rssi = ieee80211_getrssi(ic); + sc->sc_stats.ast_rx_noise = + ath_hal_getchannoise(sc->sc_ah, &sc->sc_curchan); + sc->sc_stats.ast_tx_rate = sc->sc_hwmap[sc->sc_txrate].ieeerate; ATH_UNLOCK(sc); /* * NB: Drop the softc lock in case of a page fault; @@ -5562,6 +5565,7 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni, txrate = rt->info[rix].rateCode; if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) txrate |= rt->info[rix].shortPreamble; + sc->sc_txrate = txrate; try0 = params->ibp_try0; ismrr = (params->ibp_try1 != 0); txantenna = params->ibp_pri >> 2; diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h index 6a03e22..193cf78 100644 --- a/sys/dev/ath/if_athioctl.h +++ b/sys/dev/ath/if_athioctl.h @@ -94,6 +94,8 @@ struct ath_stats { u_int32_t ast_rx_ctl; /* rx discarded 'cuz ctl frame */ int8_t ast_tx_rssi; /* tx rssi of last ack */ int8_t ast_rx_rssi; /* rx rssi from histogram */ + int8_t ast_rx_noise; /* rx noise floor */ + u_int8_t ast_tx_rate; /* IEEE rate of last unicast tx */ u_int32_t ast_be_xmit; /* beacons transmitted */ u_int32_t ast_be_nombuf; /* beacon setup failed 'cuz no mbuf */ u_int32_t ast_per_cal; /* periodic calibration calls */ |