[PATCH] wcn36xx: Fix tx_status mechanism

Kalle Valo kvalo at codeaurora.org
Mon Oct 18 05:47:36 PDT 2021


Loic Poulain <loic.poulain at linaro.org> wrote:

> This change fix the TX ack mechanism in various ways:
> 
> - For NO_ACK tagged packets, we don't need to way for TX_ACK indication
> and so are not subject to the single packet ack limitation. So we don't
> have to stop the tx queue, and can call the tx status callback as soon
> as DMA transfer has completed.
> 
> - Fix skb ownership/reference. Only start status indication timeout
> once the DMA transfer has been completed. This avoids the skb to be
> both referenced in the DMA tx ring and by the tx_ack_skb pointer,
> preventing any use-after-free or double-free.
> 
> - This adds a sanity (paranoia?) check on the skb tx ack pointer.
> 
> - Resume TX queue if TX status tagged packet TX fails.
> 
> Cc: stable at vger.kernel.org
> Fixes: fdf21cc37149 ("wcn36xx: Add TX ack support")
> Signed-off-by: Loic Poulain <loic.poulain at linaro.org>

Fails to build:

drivers/net/wireless/ath/wcn36xx/txrx.c: In function 'wcn36xx_start_tx':
drivers/net/wireless/ath/wcn36xx/txrx.c:611:23: error: unused variable 'flags' [-Werror=unused-variable]
  611 |         unsigned long flags;
      |                       ^~~~~
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:277: drivers/net/wireless/ath/wcn36xx/txrx.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:540: drivers/net/wireless/ath/wcn36xx] Error 2
make[3]: *** [scripts/Makefile.build:540: drivers/net/wireless/ath] Error 2
make[2]: *** [scripts/Makefile.build:540: drivers/net/wireless] Error 2
make[1]: *** [scripts/Makefile.build:540: drivers/net] Error 2
make: *** [Makefile:1874: drivers] Error 2

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1634560260-15056-1-git-send-email-loic.poulain@linaro.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




More information about the wcn36xx mailing list