Marek Lindner wrote: > On Thursday 17 September 2009 02:19:57 Felix Fietkau wrote: >> This part is actually wrong. It looks to me as if this 'fixes' a race >> condition by disabling calibration altogether. > > I appreciate the feedback but I'm not sure I can follow you here. > > The state of the calibration timer is modified in ath_set_beacon_cal(). > Seeing > this function I would say a value of 1 means disabled and a value of 0 means > enabled. Therefore, the spot my patches changes says now: Enable timer if > sc_beacon_cal is 0 (enabled) and the interval time is over. > > If ath_beacon_send() was meant to activate the timer (as you seem to imply) I > suggest calling ath_set_beacon_cal() instead of just starting the timer. > > Furthermore, all code sections enabling/disabling the timer in question check > whether the variable sc_beacon_cal is 0. The only exception to that was the > part my patch changed. > > What did I miss ? I reworked the code to fix some mistakes in the timer handling. The reason why there was a difference in the sc_beacon_cal checks is this: sc_beacon_cal == 1 means that the calibration timer is triggered from beacon context at the right point in time (only for modes where beacons are active), sc_beacon_cal == 0 means the timer is launched at init time once and then refreshed according to the calibration interval. This is preserved in the current code. Please test and let me know if you can still trigger any bugs
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel