From: Thiraviyam Mariyappan <quic_tmariyap@xxxxxxxxxxx> Currently, we are getting NULL value for fast_rx because fast_rx is not assigned in case of TKIP cipher and hence packets are dropped in fast path. Fix this issue by handling the rx decap for TKIP so frames will be handled in normal rx path. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@xxxxxxxxxxx> Signed-off-by: Aaradhana Sahu <quic_aarasahu@xxxxxxxxxxx> --- drivers/net/wireless/ath/ath11k/core.h | 2 +- drivers/net/wireless/ath/ath11k/dp_rx.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 0830276e5028..bb9acdda5aa8 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -122,7 +122,7 @@ struct ath11k_skb_rxcb { bool is_last_msdu; bool is_continuation; bool is_mcbc; - bool is_eapol; + bool skip_decap; struct hal_rx_desc *rx_desc; u8 err_rel_src; u8 err_code; diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 99859b59138e..03eeb3dfbb15 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2168,9 +2168,14 @@ static void ath11k_dp_rx_h_undecap(struct ath11k *ar, struct sk_buff *msdu, case DP_RX_DECAP_TYPE_ETHERNET2_DIX: ehdr = (struct ethhdr *)msdu->data; - /* mac80211 allows fast path only for authorized STA */ - if (ehdr->h_proto == cpu_to_be16(ETH_P_PAE)) { - ATH11K_SKB_RXCB(msdu)->is_eapol = true; + /* Fast_rx expects the STA to be authorized and + * its not assigned for TKIP cipher. Hence, set + * this flag to handle the EAPOL and TKIP packets + * in the normal path. + */ + if (ehdr->h_proto == cpu_to_be16(ETH_P_PAE) || + enctype == HAL_ENCRYPT_TYPE_TKIP_MIC) { + ATH11K_SKB_RXCB(msdu)->skip_decap = true; ath11k_dp_rx_h_undecap_eth(ar, msdu, first_hdr, enctype, status); break; @@ -2423,7 +2428,7 @@ static void ath11k_dp_rx_deliver_msdu(struct ath11k *ar, struct napi_struct *nap struct ath11k_skb_rxcb *rxcb = ATH11K_SKB_RXCB(msdu); u8 decap = DP_RX_DECAP_TYPE_RAW; bool is_mcbc = rxcb->is_mcbc; - bool is_eapol = rxcb->is_eapol; + bool skip_decap = rxcb->skip_decap; if (status->encoding == RX_ENC_HE && !(status->flag & RX_FLAG_RADIOTAP_HE) && @@ -2479,7 +2484,7 @@ static void ath11k_dp_rx_deliver_msdu(struct ath11k *ar, struct napi_struct *nap * Also, fast_rx expects the STA to be authorized, hence * eapol packets are sent in slow path. */ - if (decap == DP_RX_DECAP_TYPE_ETHERNET2_DIX && !is_eapol && + if (decap == DP_RX_DECAP_TYPE_ETHERNET2_DIX && !skip_decap && !(is_mcbc && rx_status->flag & RX_FLAG_DECRYPTED)) rx_status->flag |= RX_FLAG_8023; -- 2.17.1