From: Grazvydas Ignotas <notasas@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Luciano Coelho <coelho@ti.com>,
linux-wireless@vger.kernel.org,
Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCH 1/3] wl1251: fix TSF calculation
Date: Sat, 16 Jun 2012 22:26:46 +0300 [thread overview]
Message-ID: <1339874808-9991-2-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <1339874808-9991-1-git-send-email-notasas@gmail.com>
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);
--
1.7.0.4
next prev parent reply other threads:[~2012-06-16 19:26 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 ` Grazvydas Ignotas [this message]
2012-06-20 9:23 ` [PATCH 1/3] wl1251: fix TSF calculation Guido Gavilanes
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=1339874808-9991-2-git-send-email-notasas@gmail.com \
--to=notasas@gmail.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).