Add a temporary debugging statement in order to try and identify what's
going on with the occasional garbage rs_antenna field reported by AR9285 users. I've discovered that the 11n NICs only fill out the entire RX status descriptor on the final descriptor in an aggregate. Some of the fields (notably RSSI) are complete nonsense for A-MPDU subframes. This may be another example of this. The driver doesn't currently toss out statistics for non-final aggregate frames. It's likely that this should be done. If any users hit this particular debugging message they should report it immediately to freebsd-wireless@freebsd.org - please ensure you have ATH_DEBUG enabled so it prints out the full receive descriptor. PR: kern/163312
This commit is contained in:
parent
6890d15663
commit
197d53c565
@ -4111,6 +4111,35 @@ ath_rx_proc(struct ath_softc *sc, int resched)
|
||||
m->m_pkthdr.len = len;
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate rs->rs_antenna.
|
||||
*
|
||||
* Some users w/ AR9285 NICs have reported crashes
|
||||
* here because rs_antenna field is bogusly large.
|
||||
* Let's enforce the maximum antenna limit of 8
|
||||
* (and it shouldn't be hard coded, but that's a
|
||||
* separate problem) and if there's an issue, print
|
||||
* out an error and adjust rs_antenna to something
|
||||
* sensible.
|
||||
*
|
||||
* This code should be removed once the actual
|
||||
* root cause of the issue has been identified.
|
||||
* For example, it may be that the rs_antenna
|
||||
* field is only valid for the lsat frame of
|
||||
* an aggregate and it just happens that it is
|
||||
* "mostly" right. (This is a general statement -
|
||||
* the majority of the statistics are only valid
|
||||
* for the last frame in an aggregate.
|
||||
*/
|
||||
if (rs->rs_antenna > 7) {
|
||||
device_printf(sc->sc_dev, "%s: rs_antenna > 7 (%d)\n",
|
||||
__func__, rs->rs_antenna);
|
||||
#ifdef ATH_DEBUG
|
||||
ath_printrxbuf(sc, bf, 0, status == HAL_OK);
|
||||
#endif /* ATH_DEBUG */
|
||||
rs->rs_antenna = 0; /* XXX better than nothing */
|
||||
}
|
||||
|
||||
ifp->if_ipackets++;
|
||||
sc->sc_stats.ast_ant_rx[rs->rs_antenna]++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user