From 056d03857b74836195225ca4b0216f0d197477b7 Mon Sep 17 00:00:00 2001 From: adrian Date: Tue, 29 Mar 2011 15:59:07 +0000 Subject: [PATCH] According to ath9k recv.c, one shouldn't be doing self-linked descriptors in the RX path when doing 11n and block-ack'ed frames. Apparently, the MAC will loop over that self-linked descriptor and treat it as "good enough" for (incorrectly!) ACKing the frames in the block-ack. Until I figure out how to work around this issue in the future, this counter will tell me if packet RX processing ever gets to the point where it's touching the self-linked descriptor. If there's ever enough packets to get to that point, BA's will be invalid and likely very unhappy. --- sys/dev/ath/if_ath.c | 1 + sys/dev/ath/if_ath_sysctl.c | 2 ++ sys/dev/ath/if_athioctl.h | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 0c72a82b405e..a87a53c9f3a1 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -3338,6 +3338,7 @@ ath_rx_proc(void *arg, int npending) ds = bf->bf_desc; if (ds->ds_link == bf->bf_daddr) { /* NB: never process the self-linked entry at the end */ + sc->sc_stats.ast_rx_hitqueueend++; break; } /* XXX sync descriptor memory */ diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c index 0d1924a773e5..9339d186599d 100644 --- a/sys/dev/ath/if_ath_sysctl.c +++ b/sys/dev/ath/if_ath_sysctl.c @@ -703,6 +703,8 @@ ath_sysctl_stats_attach(struct ath_softc *sc) &sc->sc_stats.ast_rx_hi_rx_chain, 0, ""); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_htprotect", CTLFLAG_RD, &sc->sc_stats.ast_tx_htprotect, 0, "HT tx frames with protection"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_hitqueueend", CTLFLAG_RD, + &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end"); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h index 433fd1ee8ff8..6d99372f0c0e 100644 --- a/sys/dev/ath/if_athioctl.h +++ b/sys/dev/ath/if_athioctl.h @@ -128,7 +128,8 @@ struct ath_stats { u_int32_t ast_rx_decrypt_busy_err; u_int32_t ast_rx_hi_rx_chain; u_int32_t ast_tx_htprotect; /* HT tx frames with protection */ - u_int32_t ast_pad[3]; + u_int32_t ast_rx_hitqueueend; + u_int32_t ast_pad[2]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)