From patchwork Thu Jun 8 07:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaradhana Sahu X-Patchwork-Id: 13271669 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F6EFC7EE23 for ; Thu, 8 Jun 2023 07:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235220AbjFHHIi (ORCPT ); Thu, 8 Jun 2023 03:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234667AbjFHHIh (ORCPT ); Thu, 8 Jun 2023 03:08:37 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 378C2137 for ; Thu, 8 Jun 2023 00:08:36 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3586UMjG018697; Thu, 8 Jun 2023 07:08:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=ezuaKV7Ru7fkEQ4TT3CPshNPRFEfkXnKNCJBLNuM5lI=; b=d+ORN5hlvLsFZiG/eDqmtt9TKit9nhvHqdpi/TcqWlbz5QbJEI1e6GdvjwK2rEANkJmw /slGAGKq9JCai1gPmEdvDtV0tvoY7BZM0F8OFkdjiD5S6FLKoIjf4KN2mQsmxa7jcVlW lEbORqecj39NEvRR28CFa1tMpc7TDc+YFs38uDAUa8nigDNUoqiqA9eMTQAhcI/CoSCb 9KEOZaAC8Lx74il/XY9tZM8+8FQxOb7TeaSCWBj5oVrNLNd+6D4ZxsQHu3ow3SIF2AcR iY0uZwTR4xVyQK9NvWTD6p6NXG2sZUTPpeYjICM/Lmjg1uBz/2FZAQ+w2//kVEYUh9Cd Ww== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r33uygk80-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 07:08:20 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35878J75015361 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Jun 2023 07:08:20 GMT Received: from aarasahu-linux.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 8 Jun 2023 00:08:18 -0700 From: Aaradhana Sahu To: CC: , Sathishkumar Muruganandam , Aaradhana Sahu Subject: [PATCH v2 1/3] wifi: mac80211: Fix tkip encrypted packet transmission path Date: Thu, 8 Jun 2023 12:37:52 +0530 Message-ID: <20230608070754.7161-2-quic_aarasahu@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230608070754.7161-1-quic_aarasahu@quicinc.com> References: <20230608070754.7161-1-quic_aarasahu@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: M0nGb7tR_An59GHohdb2QW0nvlelvm6m X-Proofpoint-ORIG-GUID: M0nGb7tR_An59GHohdb2QW0nvlelvm6m X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-08_03,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=991 priorityscore=1501 impostorscore=0 mlxscore=0 bulkscore=0 malwarescore=0 suspectscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080058 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sathishkumar Muruganandam Currently, TKIP encrypted packets are transmitting through fast path and fast_tx, fast_rx is not assigned in case of TKIP cipher so packet is dropped during ping. Fix this issue by sending TKIP encrypted packets through normal path Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Aaradhana Sahu --- net/mac80211/tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index dfe6b9c9b29e..2d9af96783f1 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -4681,8 +4681,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb, if (!key) key = rcu_dereference(sdata->default_unicast_key); - if (key && (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) || - key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)) + if (key && (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE))) goto skip_offload; sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); From patchwork Thu Jun 8 07:07:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaradhana Sahu X-Patchwork-Id: 13271670 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4268BC7EE45 for ; Thu, 8 Jun 2023 07:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235224AbjFHHIj (ORCPT ); Thu, 8 Jun 2023 03:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbjFHHIh (ORCPT ); Thu, 8 Jun 2023 03:08:37 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ED701FDA for ; Thu, 8 Jun 2023 00:08:36 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3586lTbK020861; Thu, 8 Jun 2023 07:08:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=etSRraY+YlwDG1Jy9nTdUcmr3fLuE/bD49cuaIRm+Xo=; b=dgA/VWMmbezyGQMVFBjoUp3KL+oEQHJj3fIhjECjQtYfZ5yJIR2u7o9BMrWAPOFtybni pQkAGS/W496pGZ+2W5YsDnT9XJEVRwnaLf9jvihgIVcwqDJ2XVpoCtrhWyEfGsnM9dEN I+PHu6WXw6wlvICdUs+0C8sCmwQpV2U+nLI41PNk1nHcpzfdNo7Hubm5terNsFlxr0WG 0G8Yr3yS1gzApbLgUKXLljlJJ1YXCmJtLaexZ2YmsXxTbLN2aWxfCl4dkgAWT1olY+qK LxqwpQP89oo/9J/jFJI0t2fmKz+9JXXO4zXBigin6FfsjQX86UtnwoLUwk45igmGqIYq ig== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r39ku82t5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 07:08:22 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35878MLO000304 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Jun 2023 07:08:22 GMT Received: from aarasahu-linux.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 8 Jun 2023 00:08:20 -0700 From: Aaradhana Sahu To: CC: , Thiraviyam Mariyappan , Aaradhana Sahu Subject: [PATCH v2 2/3] wifi: ath11k: Fix tkip encryption traffic failure Date: Thu, 8 Jun 2023 12:37:53 +0530 Message-ID: <20230608070754.7161-3-quic_aarasahu@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230608070754.7161-1-quic_aarasahu@quicinc.com> References: <20230608070754.7161-1-quic_aarasahu@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: tbwTBtmiEgZqrDOcX1zwehxogsB9AUjC X-Proofpoint-ORIG-GUID: tbwTBtmiEgZqrDOcX1zwehxogsB9AUjC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-08_03,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=974 lowpriorityscore=0 phishscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080058 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Thiraviyam Mariyappan 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 Signed-off-by: Aaradhana Sahu --- 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; From patchwork Thu Jun 8 07:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaradhana Sahu X-Patchwork-Id: 13271672 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4877C87FDC for ; Thu, 8 Jun 2023 07:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235239AbjFHHIk (ORCPT ); Thu, 8 Jun 2023 03:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbjFHHIj (ORCPT ); Thu, 8 Jun 2023 03:08:39 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 722C29E for ; Thu, 8 Jun 2023 00:08:38 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3584xTD8027888; Thu, 8 Jun 2023 07:08:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=BB3+lszmKQtAlx4U5sSVdW+Zu5pz4AUF2nLwLE014z4=; b=UjM8gulsTI7yVlJzxAifmiHnpWadWCBpiRwuhUtyp2HuvBZ8axjbvrk7+qpD9HKspois qvvhHTFYTIkYSTlxLe6t/CBExbYn2MApzGBx/QbzJ7xMXzdGgZ5NfUYbbiSLI2PvmLaf 4lT3PejGAf2qd8RahLZepxEr3GIMv5okj9RnI/d1779/HPkeAoYacD7nS6bDEedMACSI CZY3TOopwK3Wz4JkXj4ajUi/y3VNh4gtaT5XZQkB4BGQHrdM3TIbxz14v21SRXxVlP/Y H+oVeyOnolrlkt8RgyMwT9fBgQldo6MACoWgUNIQjXUfBp83RxvEE7cA/kcxepVSMI9y gQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r36pdrbns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 07:08:25 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35878OnE022291 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Jun 2023 07:08:24 GMT Received: from aarasahu-linux.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 8 Jun 2023 00:08:22 -0700 From: Aaradhana Sahu To: CC: , Sathishkumar Muruganandam , Aaradhana Sahu Subject: [PATCH v2 3/3] wifi: ath11k: add 802.3 undecap support to fix TKIP MIC error reporting Date: Thu, 8 Jun 2023 12:37:54 +0530 Message-ID: <20230608070754.7161-4-quic_aarasahu@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230608070754.7161-1-quic_aarasahu@quicinc.com> References: <20230608070754.7161-1-quic_aarasahu@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: ZF9eAxh2szP4A8ET45KbWwkdrmWrOexV X-Proofpoint-ORIG-GUID: ZF9eAxh2szP4A8ET45KbWwkdrmWrOexV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-08_04,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 spamscore=0 lowpriorityscore=0 mlxscore=0 clxscore=1015 bulkscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080058 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sathishkumar Muruganandam Currently DECAP_TYPE_8023 frames with TKIP MIC error is not undecaped and hence fails to do TKIP MIC error reporting in ieee80211_rx_napi() path. Fix this by adding undecap support for ieee80211_rx_napi() to process these frames and perform TKIP counter-measures when there is MIC error reported. Tested with STA triggering TKIP MIC error frames (using debugfs "tkip_mic_test" in SW encryption mode) twice within a minute and verify TKIP counter-measures are performed as expected. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Aaradhana Sahu --- drivers/net/wireless/ath/ath11k/dp_rx.c | 39 ++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 03eeb3dfbb15..ce14cb09b9c1 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2143,6 +2143,42 @@ static void ath11k_dp_rx_h_undecap_eth(struct ath11k *ar, ether_addr_copy(ieee80211_get_SA(hdr), sa); } +static void ath11k_dp_rx_h_undecap_snap(struct ath11k *ar, + struct sk_buff *msdu, + u8 *first_hdr, + enum hal_encrypt_type enctype, + struct ieee80211_rx_status *status) +{ + struct ieee80211_hdr *hdr; + size_t hdr_len; + u8 l3_pad_bytes; + struct hal_rx_desc *rx_desc; + + /* Delivered decapped frame: + * [amsdu header] <-- replaced with 802.11 hdr + * [rfc1042/llc] + * [payload] + */ + + rx_desc = (void *)msdu->data - sizeof(*rx_desc); + l3_pad_bytes = ath11k_dp_rx_h_msdu_end_l3pad(ar->ab, rx_desc); + + skb_put(msdu, l3_pad_bytes); + skb_pull(msdu, sizeof(struct ath11k_dp_amsdu_subframe_hdr) + l3_pad_bytes); + + hdr = (struct ieee80211_hdr *)first_hdr; + hdr_len = ieee80211_hdrlen(hdr->frame_control); + + if (!(status->flag & RX_FLAG_IV_STRIPPED)) { + memcpy(skb_push(msdu, + ath11k_dp_rx_crypto_param_len(ar, enctype)), + (void *)hdr + hdr_len, + ath11k_dp_rx_crypto_param_len(ar, enctype)); + } + + memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); +} + static void ath11k_dp_rx_h_undecap(struct ath11k *ar, struct sk_buff *msdu, struct hal_rx_desc *rx_desc, enum hal_encrypt_type enctype, @@ -2189,7 +2225,8 @@ static void ath11k_dp_rx_h_undecap(struct ath11k *ar, struct sk_buff *msdu, enctype, status); break; case DP_RX_DECAP_TYPE_8023: - /* TODO: Handle undecap for these formats */ + ath11k_dp_rx_h_undecap_snap(ar, msdu, first_hdr, + enctype, status); break; } }