From: Jérôme Pouiller Date: Tue, 17 Dec 2019 16:14:30 +0000 (+0000) Subject: staging: wfx: fix counter overflow X-Git-Tag: v5.10.7~3607^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5eee614700e0dc06760bcf5aff840565637cddfc;p=platform%2Fkernel%2Flinux-rpi.git staging: wfx: fix counter overflow Some weird behaviors were observed when connection is really good and packets are small. It appears that sometime, number of packets in queues can exceed 255 and generate an overflow in field usage_count. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index a0f9ae6..f63e5d8 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -39,8 +39,8 @@ struct wfx_link_entry { struct tx_policy { struct list_head link; + int usage_count; u8 rates[12]; - u8 usage_count; u8 uploaded; };