wl1251: Fix TSF calculation
authorYuri Ershov <ext-yuri.ershov@nokia.com>
Wed, 27 Oct 2010 10:44:18 +0000 (14:44 +0400)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 5 Mar 2011 21:18:01 +0000 (23:18 +0200)
Cast MSB part of current TSF to unsigned long long to prevent loss of
significant bits. MSB should be shifted on 32 bits.

Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
drivers/net/wireless/wl12xx/wl1251_acx.c

index 3c04c95..d22e6a4 100644 (file)
@@ -847,7 +847,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime)
        }
 
        *mactime = tsf_info->current_tsf_lsb |
        }
 
        *mactime = tsf_info->current_tsf_lsb |
-               (tsf_info->current_tsf_msb << 31);
+               ((unsigned long long) tsf_info->current_tsf_msb << 32);
 
 out:
        kfree(tsf_info);
 
 out:
        kfree(tsf_info);