The purpose of this note is to propose an alternative method for the ipw2200 driver to report the iwconfig 'Missed beacon' statistic. The iwconfig man page states the following.
Missed beacon
Number of periodic beacons from the Cell or the Access Point we have missed. Beacons are sent
at regular intervals to maintain the cell coordination, failure to receive them usually indi-
cates that the card is out of range.
The ipw2200 driver currently displays the percentage of missed beacons. This has caused a great deal of confusion among users. The purpose of the proposed change is to make the driver complaint with the man page and to make it easy for a user to see if the driver is close to roaming.
Typical iwconfig output follows.
iwconfig eth1 IEEE 802.11b ESSID:"mosswap" Mode:Managed Frequency:2.437 GHz Access Point: 00:01:24:F0:40:5A Bit Rate:54 Mb/s Tx-Power=20 dBm Sensitivity=8/0 Retry limit:7 RTS thr:off Fragment thr:off Encryption key:****-****-****-****-****-****-** Security mode:open Power Management:off Link Quality=69/100 Signal level=-55 dBm Noise level=-82 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:1
The ipw2200 driver processes missed beacons from an associated access point in two ways.
Every 2 seconds, the driver's ipw_gather_stats function computes the percentage of missed beacons (missed_beacons_percent) over the previous 2 second time interval. The percentages for the 8 most recent 2 second time intervals are averaged and this result is reported by iwconfig in the 'Missed beacon' field.
The driver's rx_notification function also counts the number of consecutive missed beacons (missed_count). Once this value exceeds the threshold 8, the driver begins to roam for a better access point. The roaming threshold is reported by iwconfig in the 'Sensitivity' field.
I have patched the ipw2200 driver so that every 2 seconds the ipw_gather_stats function computes the maximum of missed_count (max_missed_beacons) over the previous 2 second time interval.
Here is typical missed beacons data for a weak wireless signal. Note that the access point produces about 10 beacons per second.
11:07:48 kernel: ipw2200: total missed beacons 8 11:07:48 kernel: ipw2200: missed_beacons_percent 40 11:07:48 kernel: ipw2200: max_missed_beacons 5 11:07:50 kernel: ipw2200: total missed beacons 5 11:07:50 kernel: ipw2200: missed_beacons_percent 25 11:07:50 kernel: ipw2200: max_missed_beacons 4
The max_missed_beacons values are much better indicators of 'nearness to roaming' than the missed_beacons_percent values which have a wide swing. If for example, every other beacon is missed, max_missed_beacons is 1, while missed_beacons_percent is 50.
The patched ipw_gather_stats function produces a data stream of max_missed_beacon values with a period of 2 seconds. The value returned in the iwconfig 'Missed beacon' field is an exponential average of this data stream.
A user can now directly compare the roaming threshold in the iwconfig Sensitivity field with the averaged max_missed_beacons value. A value above 8 is a clear indicator that roaming has occurred.
The following patch implements the above change in the method for computing the missed beacon statistic reported by iwconfig.
ipw2200-1.1.3-missed-beacons.patch