Commit 5eee6147 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

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: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-4-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 89606bb3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
};