Author: adrian
Date: Tue Feb 28 21:43:29 2012
New Revision: 232270
URL: http://svn.freebsd.org/changeset/base/232270

Log:
  Only increment is_beacon_bad if we're not scanning.
  
  Otherwise things such as off-channel probe responses and beacons are also
  silently discarded and logged against this error counter.

Modified:
  head/sys/net80211/ieee80211_sta.c

Modified: head/sys/net80211/ieee80211_sta.c
==============================================================================
--- head/sys/net80211/ieee80211_sta.c   Tue Feb 28 21:41:47 2012        
(r232269)
+++ head/sys/net80211/ieee80211_sta.c   Tue Feb 28 21:43:29 2012        
(r232270)
@@ -1306,7 +1306,8 @@ sta_recv_mgmt(struct ieee80211_node *ni,
                }
                /* XXX probe response in sta mode when !scanning? */
                if (ieee80211_parse_beacon(ni, m0, &scan) != 0) {
-                       vap->iv_stats.is_beacon_bad++;
+                       if (! (ic->ic_flags & IEEE80211_F_SCAN))
+                               vap->iv_stats.is_beacon_bad++;
                        return;
                }
                /*
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to