wil6210: fix RX buffers release and unmap
authorMaya Erez <merez@codeaurora.org>
Thu, 23 Aug 2018 11:47:11 +0000 (14:47 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 28 Aug 2018 13:48:55 +0000 (16:48 +0300)
commit84f16fbb62384fb209cd35741d94eb00b5ca2746
treec423807f073a70e69770b45aaeccf367a119f09f
parentdf2b53884a5a454bf441ca78e5b57307262c73f4
wil6210: fix RX buffers release and unmap

RX SKBs are released in both wil6210 rmmod and RX handle.
As there is no lock to protect the buffers DMA unmap,
the SKB pointer in buff_arr is used to check if the buffer
memory was already released.
Setting wil->rx_buff_mgmt.buff_arr[buff_id].skb to NULL before the DMA
memory unmap will prevent duplicate unmapping of the same memory.
Move the buffer ID to the free list also in case the SKB is NULL.

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