]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
staging: wfx: fix counter overflow
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 17 Dec 2019 16:14:30 +0000 (16:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2019 14:51:03 +0000 (15:51 +0100)
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 <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-4-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/data_tx.h

index a0f9ae69baf58aeb20de1d2c41215071176cc404..f63e5d8cf929b4eff0e4609bf2f5c75ece139883 100644 (file)
@@ -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;
 };