Re: [Madwifi-devel] beacon generation in adhoc mode [patch]
Status: Beta
Brought to you by:
otaku
From: Benoit P. <ben...@fr...> - 2007-02-18 23:28:33
|
Hello, Here is a patch against revision 2128 that tries to improve things. If people having more knowledge could review (or improve!) it before applying to svn, that would be perfect. Best regards, Benoit Benoit PAPILLAULT wrote: > > First experiment: STA A creates an IBSS, another card is used for > monitoring. > > Results : STA A sends beacons immediately and the TSF is initialized to > 0 (using the HAL_BEACON_RESET_TSF flag in ath_beacon_config). After 2 > secs and 4 secs, ath_beacon_config() is called once again from > ath_reset() and the TSF is restarted from 0. This is clearly a bug that > could lead to strange behaviour in an IBSS. This is fixed by using the ni_tstamp.tsf as a "first time only" variable. TSF is only reset the first time now. > Third experiment: STA B is started first, several minutes before STA A. > When STA A is started, a new IBSS is created, and TSF reset and a beacon > with the MAC addr of STA A is sent (only one!). This is not the expected > behaviour but should not matter so much since the TSF is lower than STA > B. However, no beacons are sent from STA A for a least 78 seconds and > then, STA A resumes sending beacon with STA B mac addr (which is > expected). This is clearly a bug than could lead to slow synchronisation > of the IBSS. It can now be lower than 78 seconds. The first beacon is not always sent. Sometimes the first beacon is sent 15 seconds after the interface has been up. Very strange. Doing experiment here, i saw that the hardware TSF is updated, but it is not yet updated when ath_beacon_config() is called. Instead of computing a wrong "nexttbtt", we just return from the function in such situation. |