]> git.baikalelectronics.ru Git - kernel.git/commit
wlcore: fix bug reading fwlog
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 3 Jun 2021 11:54:24 +0000 (12:54 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 14 Jun 2021 15:49:42 +0000 (18:49 +0300)
commit4c15d993a189edac88f9052142b403efe29cf5fe
tree71084e0427c9e70d55482c69bff84044bcbcb915
parent05646a9b2c1e22e6262b944c71fda5f087b7e0ae
wlcore: fix bug reading fwlog

With logging enabled, it has been observed that the driver spews
messages such as:

wlcore: ERROR Calculate of clear addr Clear = 204025b0, write = 204015b0

The problem occurs because 204025b0 is the end of the buffer, and
204015b0 is the beginning, and the calculation for "clear"ing the
buffer does not take into account that if we read to the very end
of the ring buffer, we are actually at the beginning of the buffer.

Fix this.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/E1lolvc-0003RM-VE@rmk-PC.armlinux.org.uk
drivers/net/wireless/ti/wlcore/event.c