From: Marco Porsch Date: Fri, 15 Feb 2013 14:31:30 +0100 Subject: [ath9k-devel] [PATCH 1/3] mac80211: move mesh sync beacon handler into neighbour_update In-Reply-To: <1360932381.15040.11.camel@jlt4.sipsolutions.net> References: <1360928446-543-1-git-send-email-marco@cozybit.com> (sfid-20130215_124056_325990_55BC105E) <1360930499.15040.7.camel@jlt4.sipsolutions.net> <3fance.mi9hwg.2rw1te-qmf@mx.google.com> (sfid-20130215_134116_713607_1FD8E99F) <1360932381.15040.11.camel@jlt4.sipsolutions.net> Message-ID: <511E38B2.40900@cozybit.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Hi, On 02/15/2013 01:46 PM, Johannes Berg wrote: > On Fri, 2013-02-15 at 12:40 +0000, marco at cozybit.com wrote: >> Please check again. The comment is split in two and placed on the respective new positions. > > Yeah, I see, the API is just total shit. First passing the TSF and then > calculating it to override? Why not do the calculation outside the API > always? The TBTT calculation does intentionally not use the mactime value. Synchronization uses the time in local TSF units and the exact same time point in peers TSF units at the time of sending/receiving (mactime field). The TBTT calculation uses the time of NOW, i.e. the current TSF after possible delays in firmware/driver/rx-handler which may have outdated the mactime field. --Marco