OSDN Git Service

wcn36xx: Add chained transfer support for AMSDU
authorLoic Poulain <loic.poulain@linaro.org>
Mon, 25 Oct 2021 13:26:10 +0000 (16:26 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Oct 2021 07:42:22 +0000 (10:42 +0300)
commita224b47ab36d7db5fb5d410622777fd10794f4cd
tree9139bf7d34ec718fb743e2e81d3f2d089453579c
parent2371b15f8eeb5fb2c5f323ad4d4ea221277ac21e
wcn36xx: Add chained transfer support for AMSDU

WCNSS RX DMA transfer support is limited to 3872 bytes, which is
enough for simple MPDUs (single MSDU), but not enough for cases
with A-MSDU (depending on max AMSDU size or max MPDU size).

In that case the MPDU is spread over multiple transfers, with the
first transfer containing the MPDU header and (at least) the first
A-MSDU subframe and additional transfer(s) containing the following
A-MSDUs. This can be handled with a series of flags to tagging the
first and last A-MSDU transfers.

In that case we have to bufferize and re-linearize the A-MSDU buffers
into a proper MPDU skb before forwarding to mac80211 (in the same way
as it is done in ath10k).

This change also includes sanity check of the buffer descriptor to
prevent skb overflow.

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