staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 1 Jan 2014 19:19:28 +0000 (19:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2014 19:02:13 +0000 (11:02 -0800)
value uLowNextTBTT yields wrong value.

ULL is needed with qwTSF

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: stable@vger.kernel.org # v3.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/card.c

index bb91ffadbf5dfea466cecc69902a446321eb2a35..ce7ee45d3086dfa100be3030ae3579f8ba5a8c06 100644 (file)
@@ -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;