summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-02-05 21:02:40 +0000
committersam <sam@FreeBSD.org>2009-02-05 21:02:40 +0000
commit18819a05622f02d386dbe621b181fbd0b6c9b5f7 (patch)
tree0e9fdb89c9c5c5abe85e2b37257b43649804d0e1 /sys/dev/ath
parent5b2183aa129073bdcb790e27b9d1f1262d6111f9 (diff)
downloadFreeBSD-src-18819a05622f02d386dbe621b181fbd0b6c9b5f7.zip
FreeBSD-src-18819a05622f02d386dbe621b181fbd0b6c9b5f7.tar.gz
Minor packet drop improvements:
o change tdma packet drop msg when ack required to ATH_DEBUG_TDMA (ATH_DEBUG_XMIT is too noisy) o add a debug msg for raw packet drop due to interface down/invalid o add stats for these two cases o explain how another drop case is handled
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c11
-rw-r--r--sys/dev/ath/if_athioctl.h4
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 686123b..0782a2f 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -4994,9 +4994,9 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
sc->sc_stats.ast_tx_noack++;
#ifdef ATH_SUPPORT_TDMA
if (sc->sc_tdma && (flags & HAL_TXDESC_NOACK) == 0) {
- DPRINTF(sc, ATH_DEBUG_XMIT, "%s: ACK required w/ TDMA\n",
- __func__);
- /* XXX statistic */
+ DPRINTF(sc, ATH_DEBUG_TDMA,
+ "%s: discard frame, ACK required w/ TDMA\n", __func__);
+ sc->sc_stats.ast_tdma_ack++;
ath_freetx(m0);
return EIO;
}
@@ -7198,6 +7198,10 @@ ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
struct ath_buf *bf;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) {
+ DPRINTF(sc, ATH_DEBUG_XMIT, "%s: discard frame, %s", __func__,
+ (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ?
+ "!running" : "invalid");
+ sc->sc_stats.ast_tx_raw_fail++;
ieee80211_free_node(ni);
m_freem(m);
return ENETDOWN;
@@ -7207,6 +7211,7 @@ ath_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
*/
bf = ath_getbuf(sc);
if (bf == NULL) {
+ /* NB: ath_getbuf handles stat+msg */
ieee80211_free_node(ni);
m_freem(m);
return ENOBUFS;
diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h
index 096f306..538c1a2 100644
--- a/sys/dev/ath/if_athioctl.h
+++ b/sys/dev/ath/if_athioctl.h
@@ -115,7 +115,9 @@ struct ath_stats {
u_int32_t ast_tdma_tsf; /* TDMA slot update set TSF */
u_int16_t ast_tdma_tsfadjp;/* TDMA slot adjust+ (usec, smoothed)*/
u_int16_t ast_tdma_tsfadjm;/* TDMA slot adjust- (usec, smoothed)*/
- u_int32_t ast_pad[17];
+ u_int32_t ast_tdma_ack; /* TDMA tx failed 'cuz ACK required */
+ u_int32_t ast_tx_raw_fail;/* raw tx failed 'cuz h/w down */
+ u_int32_t ast_pad[15];
};
#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)
OpenPOWER on IntegriCloud