diff options
author | sam <sam@FreeBSD.org> | 2005-01-18 20:04:51 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-01-18 20:04:51 +0000 |
commit | 07d33c069ac26ddc075f990d772216a982bce037 (patch) | |
tree | ace5b4944dd1a7f8ebe50fccad1e2adb57060c41 /sys/net80211/ieee80211_input.c | |
parent | a8461d7621cd35ee85aa820dddf5d92d7477feee (diff) | |
download | FreeBSD-src-07d33c069ac26ddc075f990d772216a982bce037.zip FreeBSD-src-07d33c069ac26ddc075f990d772216a982bce037.tar.gz |
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)
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 1d258c5..3215ed9 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -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 @@ -1829,6 +1820,15 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, } /* + * 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 * background scan. We consider only 11g/WMM stuff right now. |