move beacon/probe response counting down to after we've decided whether or

not we're going to process the frame; this makes the counters reflect frames
actually processes instead of received (discarded frames were already counted)
This commit is contained in:
sam 2005-01-18 20:04:51 +00:00
parent 3ea3f1c4cc
commit f77550b56c

View File

@ -1683,15 +1683,6 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
u_int16_t capinfo, bintval, timoff;
u_int16_t fhdwell;
if (subtype == IEEE80211_FC0_SUBTYPE_BEACON) {
/*
* Count beacon frames specially, some drivers
* use this info to do things like update LED's.
*/
ic->ic_stats.is_rx_beacon++;
IEEE80211_NODE_STAT(ni, rx_beacons);
} else
IEEE80211_NODE_STAT(ni, rx_proberesp);
/*
* We process beacon/probe response frames:
* o when scanning, or
@ -1828,6 +1819,15 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
return;
}
/*
* Count frame now that we know it's to be processed.
*/
if (subtype == IEEE80211_FC0_SUBTYPE_BEACON) {
ic->ic_stats.is_rx_beacon++; /* XXX remove */
IEEE80211_NODE_STAT(ni, rx_beacons);
} else
IEEE80211_NODE_STAT(ni, rx_proberesp);
/*
* When operating in station mode, check for state updates.
* Be careful to ignore beacons received while doing a