Commit a9eb5ace authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by Stefan Bader

ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode

BugLink: https://bugs.launchpad.net/bugs/1784409

commit 2f38c3c0 upstream.

Chipset from QCA99X0 onwards (QCA99X0, QCA9984, QCA4019 & future)
rx_hdr_status is not padded to align in 4-byte boundary. Define a
new hw_params field to handle different alignment behaviour between
different hw. This patch fixes improper retrieval of rfc1042 header
with QCA4019. This patch along with "ath10k: Properly remove padding
from the start of rx payload" will fix traffic failure in ethernet
decap mode for QCA4019.
Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
[bwh: This just adds the part that was left out of the previous backport,
 commit b88fb9ea.]
Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 2e4d9655
...@@ -1179,6 +1179,7 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar, ...@@ -1179,6 +1179,7 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar,
size_t hdr_len, crypto_len; size_t hdr_len, crypto_len;
void *rfc1042; void *rfc1042;
bool is_first, is_last, is_amsdu; bool is_first, is_last, is_amsdu;
int bytes_aligned = ar->hw_params.decap_align_bytes;
rxd = (void *)msdu->data - sizeof(*rxd); rxd = (void *)msdu->data - sizeof(*rxd);
hdr = (void *)rxd->rx_hdr_status; hdr = (void *)rxd->rx_hdr_status;
...@@ -1195,8 +1196,8 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar, ...@@ -1195,8 +1196,8 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar,
hdr_len = ieee80211_hdrlen(hdr->frame_control); hdr_len = ieee80211_hdrlen(hdr->frame_control);
crypto_len = ath10k_htt_rx_crypto_param_len(ar, enctype); crypto_len = ath10k_htt_rx_crypto_param_len(ar, enctype);
rfc1042 += round_up(hdr_len, 4) + rfc1042 += round_up(hdr_len, bytes_aligned) +
round_up(crypto_len, 4); round_up(crypto_len, bytes_aligned);
} }
if (is_amsdu) if (is_amsdu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment