wil6210: reset buff id in status message after completion
authorMaya Erez <merez@codeaurora.org>
Thu, 28 Feb 2019 09:35:08 +0000 (11:35 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 3 Apr 2019 12:45:17 +0000 (15:45 +0300)
commitb4a967b7d0f5cee75cfa343b7498eb92a8735594
tree08facfcd93d77f0d3cdb47f97eb79cc63d1f224f
parent8454e72a3644c7f3617ed85be899291f344dba7f
wil6210: reset buff id in status message after completion

Since DR bit and buffer id are written in different dwords of
the status message, the DR bit can already be set to 1 while the
buffer id is not updated yet.
Resetting the buffer id in the status message will allow the driver
to identify such cases and re-read the status message until the buffer
id is written by HW.
In case DR bit is set but buffer id is zero, need to read the status
message again, until a valid id is identified.

In addition to that, move the completed buffer id to the tail of the
free list to prevent its immediate reuse in the upcoming refill.

Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wil6210/debugfs.c
drivers/net/wireless/ath/wil6210/txrx_edma.c
drivers/net/wireless/ath/wil6210/txrx_edma.h
drivers/net/wireless/ath/wil6210/wil6210.h