Date: Thu, 5 Feb 2009 21:02:40 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188195 - head/sys/dev/ath Message-ID: <200902052102.n15L2ejF038929@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Thu Feb 5 21:02:40 2009 New Revision: 188195 URL: http://svn.freebsd.org/changeset/base/188195 Log: 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 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Feb 5 20:56:33 2009 (r188194) +++ head/sys/dev/ath/if_ath.c Thu Feb 5 21:02:40 2009 (r188195) @@ -4994,9 +4994,9 @@ ath_tx_start(struct ath_softc *sc, struc 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 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, */ bf = ath_getbuf(sc); if (bf == NULL) { + /* NB: ath_getbuf handles stat+msg */ ieee80211_free_node(ni); m_freem(m); return ENOBUFS; Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Thu Feb 5 20:56:33 2009 (r188194) +++ head/sys/dev/ath/if_athioctl.h Thu Feb 5 21:02:40 2009 (r188195) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902052102.n15L2ejF038929>