I was trying to figure out why bgscan isn't working in some instances. What's happening is this: * the bgscan is triggered via sta_recv_mgmt(), on a valid beacon frame * but if the beacon frame isn't valid, it fails an earlier check, so the ieee80211_bg_scan() call is never made. Fix: * Fix ieee80211_parse_beacon() if it needs to be fixed * potentially ignore the beacon contents _but_ still trigger a background scan if possible. How-To-Repeat: Find an AP whose beacons fail the check.
Responsible Changed From-To: freebsd-bugs->freebsd-wireless Reassign
Author: adrian Date: Tue Feb 28 04:05:35 2012 New Revision: 232244 URL: http://svn.freebsd.org/changeset/base/232244 Log: Track the number of bad beacons received. PR: kern/165517 Modified: head/sys/net80211/ieee80211_ioctl.h head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_ioctl.h ============================================================================== --- head/sys/net80211/ieee80211_ioctl.h Tue Feb 28 03:11:02 2012 (r232243) +++ head/sys/net80211/ieee80211_ioctl.h Tue Feb 28 04:05:35 2012 (r232244) @@ -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]; }; /* Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Tue Feb 28 03:11:02 2012 (r232243) +++ head/sys/net80211/ieee80211_sta.c Tue Feb 28 04:05:35 2012 (r232244) @@ -1305,8 +1305,10 @@ sta_recv_mgmt(struct ieee80211_node *ni, 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. */ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Author: adrian Date: Tue Feb 28 04:06:42 2012 New Revision: 232245 URL: http://svn.freebsd.org/changeset/base/232245 Log: Add is_beacon_bad. PR: kern/165517 Modified: head/tools/tools/net80211/wlanstats/wlanstats.c Modified: head/tools/tools/net80211/wlanstats/wlanstats.c ============================================================================== --- head/tools/tools/net80211/wlanstats/wlanstats.c Tue Feb 28 04:05:35 2012 (r232244) +++ head/tools/tools/net80211/wlanstats/wlanstats.c Tue Feb 28 04:06:42 2012 (r232245) @@ -370,6 +370,8 @@ static const struct fmt wlanstats[] = { { 5, "noise", "noise", "current noise floor (dBm)" }, #define S_SIGNAL AFTER(S_NOISE) { 5, "signal", "sig", "current signal (dBm)" }, +#define S_BEACON_BAD AFTER(S_SIGNAL) + { 9, "beacon_bad", "beaconbad", "bad beacons received" }, }; struct wlanstatfoo_p { @@ -814,6 +816,7 @@ wlan_get_curstat(struct statfoo *sf, int case S_RX_MCAST: NSTAT(rx_mcast); case S_TX_UCAST: NSTAT(tx_ucast); case S_TX_MCAST: NSTAT(tx_mcast); + case S_BEACON_BAD: STAT(beacon_bad); } return wlan_getinfo(wf, s, b, bs); #undef NSTAT @@ -972,6 +975,7 @@ wlan_get_totstat(struct statfoo *sf, int case S_RX_MCAST: NSTAT(rx_mcast); case S_TX_UCAST: NSTAT(tx_ucast); case S_TX_MCAST: NSTAT(tx_mcast); + case S_BEACON_BAD: STAT(beacon_bad); } return wlan_getinfo(wf, s, b, bs); #undef NSTAT _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
There was a commit referencing this bug, but it's still not closed and has been inactive for some time. Closing as fixed. Please re-open it if the issue hasn't been completely resolved.