ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode
commit 2f38c3c01d
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: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
[bwh: This just adds the part that was left out of the previous backport,
commit b88fb9ea475a.]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9958026578
commit
8d33a08bd4
@ -1166,6 +1166,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;
|
||||||
@ -1182,8 +1183,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)
|
||||||
|
Reference in New Issue
Block a user