wcn36xx: Add TX ack support
authorLoic Poulain <loic.poulain@linaro.org>
Fri, 24 Jul 2020 10:20:48 +0000 (12:20 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 14 Aug 2020 15:02:19 +0000 (18:02 +0300)
commitfdf21cc3714939dd4327f3d664fe5863d15ccb31
treeb293f02ddb3ba0c7d38af6b1f403092b2507acfa
parentffe835aa5bdb33572fceb0b14cba6a44c3371bdd
wcn36xx: Add TX ack support

The controller is capable of reporting TX indication which can be used
to report TX ack when IEEE80211_TX_CTL_REQ_TX_STATUS is set.
The support was only partially implemented.

The firmware can be configured for reporting event when a packet is
acked, without specifying which packet though. In order to send a
packet flagged with TX status callback, we need to stop the queue,
submit the packet and wait for the firmware ack event. Then the queue
can be restarted and mac80211 status callback called.

In case the packet is not acked, no ack event will be received,
therefore a timeout mechanism is introduced to restart the queue
and call the status cb in case no event is received after a 100ms.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1595586052-16081-3-git-send-email-loic.poulain@linaro.org
drivers/net/wireless/ath/wcn36xx/dxe.c
drivers/net/wireless/ath/wcn36xx/main.c
drivers/net/wireless/ath/wcn36xx/txrx.c
drivers/net/wireless/ath/wcn36xx/wcn36xx.h