Commit cae6247d authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by John W. Linville

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 <ext-yuri.kululin@nokia.com>
Yuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 69d4cfef
...@@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime) ...@@ -869,7 +869,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); ((u64)tsf_info->current_tsf_msb << 32);
out: out:
kfree(tsf_info); kfree(tsf_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment