linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guido Gavilanes <gavilanes@ismb.it>
To: Grazvydas Ignotas <notasas@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Luciano Coelho <coelho@ti.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] wl1251: fix TSF calculation
Date: Wed, 20 Jun 2012 11:23:29 +0200	[thread overview]
Message-ID: <1340184209.2915.2.camel@MacGyver> (raw)
In-Reply-To: <1339874808-9991-2-git-send-email-notasas@gmail.com>

Hello all,

Regarding the TSF, is there a way to read from an outside program the
TSF to help stations or programs have a "synchronization" low level
reference time?

Any ideas would be appreciated!
Thank you!
Guido

On Sat, 2012-06-16 at 22:26 +0300, Grazvydas Ignotas wrote:
> Cast MSB part of current TSF to u64 to prevent loss of most
> significant bits. MSB should also be shifted by 32.
> 
> Patch based on old maemo patch by:
> Yuri Kululin <ext-yuri.kululin@nokia.com>
> Yuri Ershov <ext-yuri.ershov@nokia.com>
> 
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
>  drivers/net/wireless/ti/wl1251/acx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/ti/wl1251/acx.c b/drivers/net/wireless/ti/wl1251/acx.c
> index ad87a1a..db6430c 100644
> --- a/drivers/net/wireless/ti/wl1251/acx.c
> +++ b/drivers/net/wireless/ti/wl1251/acx.c
> @@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime)
>  	}
>  
>  	*mactime = tsf_info->current_tsf_lsb |
> -		(tsf_info->current_tsf_msb << 31);
> +		((u64)tsf_info->current_tsf_msb << 32);
>  
>  out:
>  	kfree(tsf_info);




  reply	other threads:[~2012-06-20  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 19:26 [PATCH 0/3] wl1251: maemo fixes Grazvydas Ignotas
2012-06-16 19:26 ` [PATCH 1/3] wl1251: fix TSF calculation Grazvydas Ignotas
2012-06-20  9:23   ` Guido Gavilanes [this message]
2012-06-16 19:26 ` [PATCH 2/3] wl1251: always report beacon loss to the stack Grazvydas Ignotas
2012-06-16 19:26 ` [PATCH 3/3] wl1251: Fix memory leaks in SPI initialization Grazvydas Ignotas
2012-07-05  9:45 ` [PATCH 0/3] wl1251: maemo fixes Grazvydas Ignotas
2012-07-05  9:55   ` Grazvydas Ignotas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340184209.2915.2.camel@MacGyver \
    --to=gavilanes@ismb.it \
    --cc=coelho@ti.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=notasas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).