--- if_iwi.c.ORI 2009-12-07 16:17:46.000000000 +0100 +++ if_iwi.c 2009-12-07 16:20:10.000000000 +0100 @@ -1508,9 +1508,9 @@ * 802.11 layer. * XXX try to roam, drop assoc only on much higher count */ - if (le32toh(beacon->number) >= ic->ic_bmissthreshold) { + if ((le32toh(beacon->number) & 0xFF) >= ic->ic_bmissthreshold) { DPRINTF(("Beacon miss: %u >= %u\n", - le32toh(beacon->number), + le32toh(beacon->number) & 0xFF, ic->ic_bmissthreshold)); ieee80211_beacon_miss(ic); }