net: designware: Fix get_timer value overflow
authorJim Liu <jim.t90615@gmail.com>
Thu, 7 Aug 2025 05:28:32 +0000 (13:28 +0800)
committerJerome Forissier <jerome.forissier@linaro.org>
Mon, 18 Aug 2025 12:08:57 +0000 (14:08 +0200)
commit59ec495f6c645c80d934034ffe48adb2ea75839a
tree66d7365bfbb2805ab4b51d07b805347e96641142
parent2e9155cb9f366a6b9191af0850efad1948b4c785
net: designware: Fix get_timer value overflow

get_timer returns a ulong value representing system time in ms.
On a 64-bit system, this ulong value is 64 bits long. However,
the driver stores it in a 32-bit unsigned integer, which overflows
after 49 days up time, causing the driver to get an incorrect time.

Replace the unsigned int variable with a ulong type to properly store
the value returned by get_timer.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
drivers/net/designware.c