]> git.baikalelectronics.ru Git - kernel.git/commit
wlcore: fix read pointer update
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 3 Jun 2021 11:54:30 +0000 (12:54 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 14 Jun 2021 15:49:42 +0000 (18:49 +0300)
commitb65cc6a99e1424fc6a4acbe447ad49dbc1e762c7
treec3c340bf6198900cc61fe722ced56eb95325a344
parent8d2a83a3ec40b8e2d8e0f6a641301ab5524faf0f
wlcore: fix read pointer update

When reading the fw_log structure from the device's memory, we could
race with the firmware updating the actual_buff_size and buff_write_ptr
members of this structure. This would lead to bytes being dropped from
the log.

Fix this by writing back the actual - now fixed - clear_ptr which
reflects where we read up to in the buffer.

This also means that we must not check that the clear_ptr matches the
current write pointer, so remove that check.

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