From: Malcolm Priestley Date: Wed, 1 Jan 2014 19:19:28 +0000 (+0000) Subject: staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9acec059c0cef0bf086c738f4c0b1f4447782a48;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT value uLowNextTBTT yields wrong value. ULL is needed with qwTSF Signed-off-by: Malcolm Priestley Cc: stable@vger.kernel.org # v3.9+ Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index bb91ffadbf5d..ce7ee45d3086 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -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;