Skip to content

Commit

Permalink
wl1251: fix TSF calculation
Browse files Browse the repository at this point in the history
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Grazvydas Ignotas authored and John W. Linville committed Jun 20, 2012
1 parent 69d4cfe commit cae6247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wl1251/acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cae6247

Please sign in to comment.