Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9acec059 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT



value uLowNextTBTT yields wrong value.

ULL is needed with qwTSF

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Cc: stable@vger.kernel.org # v3.9+
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98e54917
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval)

    uBeaconInterval = wBeaconInterval * 1024;
    // Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval
	uLowNextTBTT = ((qwTSF & 0xffffffffU) >> 10) << 10;
	uLowNextTBTT = ((qwTSF & 0xffffffffULL) >> 10) << 10;
	uLowRemain = (uLowNextTBTT) % uBeaconInterval;
	uHighRemain = ((0x80000000 % uBeaconInterval) * 2 * (u32)(qwTSF >> 32))
		% uBeaconInterval;