1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

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
This commit is contained in:
Sam Leffler 2009-02-05 21:02:40 +00:00
parent 5b1e30afaa
commit 3267a60cbd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188195
2 changed files with 11 additions and 4 deletions

View File

@ -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;

View File

@ -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)