From: Grazvydas Ignotas Date: Sat, 16 Jun 2012 19:26:46 +0000 (+0300) Subject: wl1251: fix TSF calculation X-Git-Tag: v3.5-rc5~17^2~26^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cae6247db0b93673d170bc0e02aff85f53bc422c;p=karo-tx-linux.git wl1251: fix TSF calculation 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 Yuri Ershov Signed-off-by: Grazvydas Ignotas Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ti/wl1251/acx.c b/drivers/net/wireless/ti/wl1251/acx.c index ad87a1ac6462..db6430c1a084 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);