From: Jérôme Pouiller Date: Mon, 27 Apr 2020 13:40:23 +0000 (+0200) Subject: staging: wfx: fix overflow in frame counters X-Git-Tag: v5.7.6~336 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=79ae4a658a4a0a6f4a0562eb52973c2850202b99;p=users%2Fdwmw2%2Flinux.git staging: wfx: fix overflow in frame counters [ Upstream commit 87066173e34b0ca5d041d5519e6bb030b1958184 ] It has been reported that trying to send small packets of data could produce a "inconsistent notification" warning. It seems that in some circumstances, the number of frame queued in the driver could greatly increase and exceed UCHAR_MAX. So the field "buffered" from struct sta_priv can overflow. Just increase the size of "bueffered" to fix the problem. Fixes: 7d2d2bfdeb82 ("staging: wfx: relocate "buffered" information to sta_priv") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200427134031.323403-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index cf99a8a74a81b..ace845f9ed140 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -37,7 +37,7 @@ struct wfx_grp_addr_table { struct wfx_sta_priv { int link_id; int vif_id; - u8 buffered[IEEE80211_NUM_TIDS]; + int buffered[IEEE80211_NUM_TIDS]; // Ensure atomicity of "buffered" and calls to ieee80211_sta_set_buffered() spinlock_t lock; };