Search Linux Wireless

Re: [PATCH v2 4/4] mac80211_hwsim: streamline beacon timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2013-01-02 at 14:55 -0800, Thomas Pedersen wrote:

> @@ -359,6 +359,8 @@ struct mac80211_hwsim_data {
>  	/* difference between this hw's clock and the real clock, in usecs */
>  	s64 tsf_offset;
>  	s64 bcn_delta;
> +	/* absolute beacon transmission time. Used to cover up "tx" delay. */
> +	u64 abs_bcn_tstamp;

This can't work if you have multiple interfaces, as far as I can tell.

> +		/*
> +		 * Account for delay from filling in the timestamp to mactime.
> +		 */
> +		now = mac80211_hwsim_get_tsf_raw();
> +		if (ieee80211_is_beacon(hdr->frame_control) ||
> +		    ieee80211_is_probe_resp(hdr->frame_control))
> +			now -= now - data->abs_bcn_tstamp;

Uhh. 
	now -= now - data->abs_bcn_tstamp;
<=>	now = now - now + data->abs_bcn_tstamp;
<=>	now = dat->abs_bcn_tstamp;

No? But it seems to me that you're trying to timestamp based on the
transmitter? This is weird anyway? 

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux