diff options
author | adrian <adrian@FreeBSD.org> | 2012-02-28 04:05:35 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-02-28 04:05:35 +0000 |
commit | e8cdf79fdf06141713afcb90e25e1a79aae9b4ee (patch) | |
tree | dbdc6fdfdb0cbc61e3f2b69313113223927d877a /sys/net80211 | |
parent | fe4276cc143eb362b0065fce4556e6f54cd66fb2 (diff) | |
download | FreeBSD-src-e8cdf79fdf06141713afcb90e25e1a79aae9b4ee.zip FreeBSD-src-e8cdf79fdf06141713afcb90e25e1a79aae9b4ee.tar.gz |
Track the number of bad beacons received.
PR: kern/165517
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.h | 3 | ||||
-rw-r--r-- | sys/net80211/ieee80211_sta.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index 0f11bc6..0d51fe9 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -241,8 +241,9 @@ struct ieee80211_stats { uint32_t is_mesh_notproxy; /* dropped 'cuz not proxying */ uint32_t is_rx_badalign; /* dropped 'cuz misaligned */ uint32_t is_hwmp_proxy; /* PREP for proxy route */ + uint32_t is_beacon_bad; /* Number of bad beacons */ - uint32_t is_spare[11]; + uint32_t is_spare[10]; }; /* diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 89b1934..d8a7fe9 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1305,8 +1305,10 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, return; } /* XXX probe response in sta mode when !scanning? */ - if (ieee80211_parse_beacon(ni, m0, &scan) != 0) + if (ieee80211_parse_beacon(ni, m0, &scan) != 0) { + vap->iv_stats.is_beacon_bad++; return; + } /* * Count frame now that we know it's to be processed. */ |