ath5k: work around wrong beacon rx timestamp in IBSS mode
authorBruno Randolf <bruno@thinktube.com>
Wed, 5 Mar 2008 09:36:26 +0000 (18:36 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 7 Mar 2008 21:07:50 +0000 (16:07 -0500)
commit6ba81c2c989291c5893014f84805ce9d196778b0
tree1b0c50597accf9c6a7fd7bd83358d587ffc119ed
parente14296cabac60806606b4ebc1a83ee4697876346
ath5k: work around wrong beacon rx timestamp in IBSS mode

atheros hardware has a problem with the rx timestamp of some IBSS beacons when
they caused a TSF update (they have the same BSSID).

the rx timestamp is wrong especially if the beacon frames get bigger than 78
byte (at least on AR5213 and AR5414 hardware). in that case ath5k_extend_tsf()
will assume a rs_tstamp overflow and give us a timestamp too far in the past
which will cause mac80211 to merge IBSS on every beacon (which is not necessary
since the BSSID already matches). but in this case we know that the HW must
have synced to the beacons TSF and the rx timestamp must be later than that so
we can adjust mactime accordingly.

also rename the function to ath5k_check_ibss_tsf() and change comments, since
"hw merge" is better described as a TSF update.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath5k/base.c