Search Linux Wireless

Re: [PATCHv3 2/2] mac80211: Modify tsf via debugfs in mesh interfaces

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

 



On Fri, 2012-03-02 at 13:04 -0800, Javier Cardona wrote:

>  static __le64 __mac80211_hwsim_get_tsf(struct mac80211_hwsim_data *data)
>  {
> -	return cpu_to_le64(jiffies_to_msecs(jiffies)*1000/1024 +
> -			data->tsf_offset);
> +	struct timeval tv = ktime_to_timeval(ktime_get_real());
> +	u64 now = (u64) tv.tv_sec * MSEC_PER_SEC + tv.tv_usec / USEC_PER_MSEC;
> +	return cpu_to_le64(now + data->tsf_offset);
> +}

Oh.

But now you're giving it in MSEC, you want USEC.

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