From patchwork Fri May 30 18:02:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithyanantham Paramasivam X-Patchwork-Id: 893647 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91EF625E806 for ; Fri, 30 May 2025 18:03:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748628182; cv=none; b=EEKR25rpranEUZ2gtkh4SC3Itys9th74NMY+Kd/Xia0kr79+yFqUFeDiGtpHPUzxqigmKFXyKBpE30tizBGnlTSpW1Y82h2HeyVGTmQsxPb/YchxYbN9N9dvt5YgQRIyd+e84zj8+WdXwSjN4IwpBEQMTQOmEDBjx/j6jwy56+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748628182; c=relaxed/simple; bh=0EJi3aX5YuP7Z/3rjkjiApIoX0fmJRtVkTslsselr44=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=kxI9M2jbWHlVlfhI6bfUrLQAU18vra8Or0UDBOdvKOfYY32yCtFS0OVR+RL+0bCD1ky21/rL8cR02cXGqlxtaG7KbS0Hc60WmqOQYKTgssPPHXAmfhOCgyDVlwpGe8DsG8w5TsV6SbeZiW8NuM5fJ4OReBT0AMDxC+nailjtUHQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=YT6bfQvv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="YT6bfQvv" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54UAhATu009444 for ; Fri, 30 May 2025 18:02:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=tbzjtDFPMgDSfw8+tY1nLj4pEi94zY5+Io8Fdjldiuo=; b=YT 6bfQvvhB4M48JUQUGMNT05J6yPFZpBK/rpgv+o51Ip9wfdYKJFqdRVTlXkgpXmsK eiROtwQVukDkXuWxe3dufdxxqz4Kx8+LyU7lkrCijfvzlhs8rvjchHqrVgzxoStq 7xIVikriAUo2rZx2sS5B4YvN/KecAn8TBGaqEuGtslCUXrRgUPt2NuID/ZiNAZ/c vdyyv3Gd7H+PPlQ1M02bt0iCsf8v/lp/YbFxeIRo3sMV0ElbXHIjVRtkz6fwug9K xwNhtRbzgmoMbAZiR4KUdTKzlHK5VEFs/srhmpvtli/BfOcMo1jYu3ggX33g+OH+ 5Pj1v0GsgxwX2TDmknyQ== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46w691mnqs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 30 May 2025 18:02:59 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-22c31b55ac6so32675515ad.0 for ; Fri, 30 May 2025 11:02:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748628179; x=1749232979; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tbzjtDFPMgDSfw8+tY1nLj4pEi94zY5+Io8Fdjldiuo=; b=IjQ1UKWTyzZZaWt5a637GzTXra6Jseml2X7uzmUw73o4AgbsUozlIb7Kgb5wLX6nrt g9CnKskrDgxwaiQjzpUhEMBsLR6kWfSA8PWC1SRBZJbTWBMZkDmT9QgtzGkcsYZdfYmw RrRZA/HLhuHcEhP5oupKDX1DdceVvTh0iMLd1438XHXDf1KBJ7cxzaXQYn4LxS1d1n69 BC65fOgVr6fj1qE0td0IgbdOCEaMzYohr8/RJ0nyGFYDJckQ4nh4/Hmlqq1SDogf9rys gWvKSSNlx023o8/6SjBMo/XX6ZWsBw0hC1vKn8/pHJkuofNtRoKyAhw+tfDtvcnd2SLn aOLA== X-Gm-Message-State: AOJu0YwAB+moTPh5Ljh5Ki5coPm/1eet1B1UKleoT+GcEDileu2Nljbd eyQj4ERoozdOtx1/CdjtTNBUd557E0CHeuFjM8KO6ySSq+iRj5DAJKTYcVYAc+Wj0bkk/mxQyl1 ZmA3MiZ05LjN3Iv3Lk9mOlrKd+Jf6zOCvkWkfgKM6c1cItGYtwTcv/FCq1Pd5kamH7GKfAw== X-Gm-Gg: ASbGncsbE9KC+Bg1aEQ/VQGaD6OGveasvR8u+kLPYMAhigfvt2Ojlt2AfR05AUjonRT rLDif/oeoBx7ztVKnaT8o2kO89y0l2kezfHCtg/F1B/2LNQY7/4qnNAtlqxu0FdF/DAW1/MnpxM ANzXldcKJIyTftr6AKM+tLGGdERbINR3z7UsZuahdI8qBsReBgz+DK8Dw4A2WOgQ1pFLN5CPqcG J5o0sJT/5GAOuTuHttlpY83vyl21ILfcFWW5embjQNCEHzkF+tosSEDAlmhRaHvD0FRti4Nlgag pU3sJim66WsFqlp3rY8SbzcojDWapY+37XNNbz8A/JP8bKyWPAhDBTXf7eZXF7IKDOeZIkkDlzx TduL5I2qbRcl1+QjM7J5ZX3BxSMVHuXxb8XeYt3O9yhe7iw== X-Received: by 2002:a17:902:dacb:b0:234:8c3d:2912 with SMTP id d9443c01a7336-235289fdbabmr68768015ad.11.1748628178698; Fri, 30 May 2025 11:02:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdEztbPoaFJSpq9upOrgHw5rokN4u18YbJRz/Yo+GH/QtKCo3WKkhqFQ21A/LUfJmgbWYTRQ== X-Received: by 2002:a17:902:dacb:b0:234:8c3d:2912 with SMTP id d9443c01a7336-235289fdbabmr68767545ad.11.1748628178141; Fri, 30 May 2025 11:02:58 -0700 (PDT) Received: from hu-nithp-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506bc868asm31374435ad.31.2025.05.30.11.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 May 2025 11:02:57 -0700 (PDT) From: Nithyanantham Paramasivam To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Nithyanantham Paramasivam Subject: [PATCH ath-next 1/3] wifi: ath12k: Fix the handling of TX packets in mode Date: Fri, 30 May 2025 23:32:45 +0530 Message-Id: <20250530180247.424349-2-nithyanantham.paramasivam@oss.qualcomm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250530180247.424349-1-nithyanantham.paramasivam@oss.qualcomm.com> References: <20250530180247.424349-1-nithyanantham.paramasivam@oss.qualcomm.com> X-Authority-Analysis: v=2.4 cv=WfoMa1hX c=1 sm=1 tr=0 ts=6839f2d3 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=dt9VzEwgFbYA:10 a=EUspDBNiAAAA:8 a=vl7YvmKCL5Z24jtCxAEA:9 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-GUID: QAtpT-SiJAg3gFmI6oKjD-TKF17dns7q X-Proofpoint-ORIG-GUID: QAtpT-SiJAg3gFmI6oKjD-TKF17dns7q X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTMwMDE1OCBTYWx0ZWRfX7LTm31qxqP4q rpeEyxsIegONc6U7X4n9vSCwL0JdbHkj+xHluYBkPkuyyH+V+uZiABDs5M/Bk78iNhZ2t+qKIpf gAoyR6f0ETvQ2X+Bm2Z1LDpFXqCdJtbqLVGY+ZvA/sqNPWVWpoE6xzgahUEEBYgkA8vZEF+YIdm Cv+bmYwoRx+bp2i240fhp/UizSGihv2DFcyiOQtkn7Ab5pu9SUumhpiD3by4dmfP0zAGckBZeeU E3vncDhrQ4Dq4SYDmtfTi6nvwpa8ztYES7S6DLXkUFpaBNUV9L22tBx8su5bg4hU/wduH9+CrTc XplnGwzlK6M3KHZ3+h/0HIg//Sl6f5V6hpAhDY1UUqhaFL0VqCQottHJB1MTur9W7WXZec49Ceb QUWwCpZHbOhbg8qkyW8wd7X3QJOGxACI/wGeBXTp4AcGQ0nYszVlJO9lUPF34C03Hc2wpUrY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-30_08,2025-05-30_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 clxscore=1015 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505300158 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Currently, in the transmit (TX) direction, EAPOL, QoS NULL, and multicast frames are sent in native Wi-Fi (802.11) format. However, when the virtual interface is configured in Ethernet mode, transmission fails for packets received in this format. To address this issue, the firmware should be instructed to treat these packets as RAW type packets, ensuring proper handling even when the interface operates in Ethernet mode. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00217-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Nithyanantham Paramasivam --- drivers/net/wireless/ath/ath12k/dp_tx.c | 38 ++++++++++++++++++++----- drivers/net/wireless/ath/ath12k/mac.c | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c index b6816b6c2c04..189c742f2a00 100644 --- a/drivers/net/wireless/ath/ath12k/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c @@ -245,6 +245,8 @@ int ath12k_dp_tx(struct ath12k *ar, struct ath12k_link_vif *arvif, bool msdu_ext_desc = false; bool add_htt_metadata = false; u32 iova_mask = ab->hw_params->iova_mask; + bool is_diff_encap = false; + bool is_null_frame = false; if (test_bit(ATH12K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags)) return -ESHUTDOWN; @@ -335,7 +337,19 @@ int ath12k_dp_tx(struct ath12k *ar, struct ath12k_link_vif *arvif, switch (ti.encap_type) { case HAL_TCL_ENCAP_TYPE_NATIVE_WIFI: - ath12k_dp_tx_encap_nwifi(skb); + is_null_frame = ieee80211_is_nullfunc(hdr->frame_control); + if (ahvif->vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) { + if (skb->protocol == cpu_to_be16(ETH_P_PAE) || is_null_frame) + is_diff_encap = true; + + /* Firmware expects msdu ext descriptor for nwifi/raw packets + * received in ETH mode. Without this, observed tx fail for + * Multicast packets in ETH mode. + */ + msdu_ext_desc = true; + } else { + ath12k_dp_tx_encap_nwifi(skb); + } break; case HAL_TCL_ENCAP_TYPE_RAW: if (!test_bit(ATH12K_FLAG_RAW_MODE, &ab->dev_flags)) { @@ -379,15 +393,25 @@ int ath12k_dp_tx(struct ath12k *ar, struct ath12k_link_vif *arvif, goto fail_remove_tx_buf; } - if (!test_bit(ATH12K_FLAG_HW_CRYPTO_DISABLED, &ar->ab->dev_flags) && - !(skb_cb->flags & ATH12K_SKB_HW_80211_ENCAP) && - !(skb_cb->flags & ATH12K_SKB_CIPHER_SET) && - ieee80211_has_protected(hdr->frame_control)) { - /* Add metadata for sw encrypted vlan group traffic */ + if ((!test_bit(ATH12K_FLAG_HW_CRYPTO_DISABLED, &ar->ab->dev_flags) && + !(skb_cb->flags & ATH12K_SKB_HW_80211_ENCAP) && + !(skb_cb->flags & ATH12K_SKB_CIPHER_SET) && + ieee80211_has_protected(hdr->frame_control)) || + is_diff_encap) { + /* Firmware is not expecting meta data for qos null + * nwifi packet received in ETH interface. + */ + if (is_null_frame && msdu_ext_desc) + goto skip_htt_meta; + + /* Add metadata for sw encrypted vlan group traffic + * and EAPOL nwifi packet received in ETH interface. + */ add_htt_metadata = true; msdu_ext_desc = true; - ti.flags0 |= u32_encode_bits(1, HAL_TCL_DATA_CMD_INFO2_TO_FW); ti.meta_data_flags |= HTT_TCL_META_DATA_VALID_HTT; +skip_htt_meta: + ti.flags0 |= u32_encode_bits(1, HAL_TCL_DATA_CMD_INFO2_TO_FW); ti.encap_type = HAL_TCL_ENCAP_TYPE_RAW; ti.encrypt_type = HAL_ENCRYPT_TYPE_OPEN; } diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 88b59f3ff87a..958299bd5acc 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -7574,6 +7574,7 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw, is_dvlan = true; if (!vif->valid_links || !is_mcast || is_dvlan || + (skb_cb->flags & ATH12K_SKB_HW_80211_ENCAP) || test_bit(ATH12K_FLAG_RAW_MODE, &ar->ab->dev_flags)) { ret = ath12k_dp_tx(ar, arvif, skb, false, 0, is_mcast); if (unlikely(ret)) { From patchwork Fri May 30 18:02:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithyanantham Paramasivam X-Patchwork-Id: 893561 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49CFC26463B for ; Fri, 30 May 2025 18:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748628183; cv=none; b=ocKLaPNuIpFLN9IyfuqsZX7H6UFpAHSeDAgwhg45cXlbYmAujHP044XdUYL08HiuvEE7GsR7Txk3fPz9MD/sp7GsS7d7usrVIZX9YlE0IbOIxrWtJteieADqtjJvkxHu1/4CwSL5M5psa9kSuW5Ox8rdTZS9qirtHjwMCZrx4f0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748628183; c=relaxed/simple; bh=Gs3jU4l33kir9Q4ACsqYdxedfrFyel4trbTjHrJz4zU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=YhVlzkA59UPRMUTYiJyo7qst0ruNY2bQI6ZbqEjwoTNgeTWAw4Njf7fYPVPOyA9ywISa55GKoh5kYh0tLi7xFIlTvl5GHgf0tvO0pllwM/r3X/aGBtgpgYzO+qrAlvDo/VmacivdNn4YYwaJdDD0zbUHZE3SVUV2vJGcG72R6Sg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=AbWYpKVv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="AbWYpKVv" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54U9nVX0014290 for ; Fri, 30 May 2025 18:03:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=sstKLTdJ5BaTm9UV2XH0pQlooV2LCRq6As4GQjiQtMw=; b=Ab WYpKVvW/oN2CBFQ0WE4/b9ek2/DdjFL9c9zYYwLTn+LumzF4OmrD/1TQXK32nhNS Yb4+lrVjlahZSj+n1b7yZIjLDRWCrbixd2r4sTrTVvr7Jy7rkKr9s0SevZqgIG6F x9u1ppZZzjIhWh4R8r362cVMOB6xBDt6kQ3BMGfS7nd9hYqb1rQtEoSMvKq5MmBI Rdr+zvKbCshAGWs1oc/3jgPS48TIGJS/6KFldupnkclbqP+IoWv82mjXzL/xc3T1 FNeo6gb2I9MeD6Hgc65lTFrVIXiEA9KEN7hrx8AlFT01aAHgTmmZcMdK+qECYaQU ApaylMltH63D+18A099g== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46wavm40ch-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 30 May 2025 18:03:01 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-22c31b55ac6so32675735ad.0 for ; Fri, 30 May 2025 11:03:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748628180; x=1749232980; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sstKLTdJ5BaTm9UV2XH0pQlooV2LCRq6As4GQjiQtMw=; b=RNSNMePUtQS432WeH3SweJ6B17gdAMM0UP0WTgv8mLy6IJy1iC1uhDNAsEjCFQugQg M8JkzhUsUaD7zZKwazwjYerYAiA6er0icc2wIdId1X2lhXJm1wJF3AfTp8IIisfSvNJy TWXiAE4PaP0hBYLneUA9832r0GPgvYhWzfyFNRoRjauaPmC0qDhMrgGcy92JRyREwzTb nAvxt/mwIIGa3QYq8yTjj8VvJt5ejmpbgQgqOl5hJO5oXoNiXPAv35/BvQLXC3sIL8KZ Q8a25RttvOVK9xH7IfIYd5xTXTKEJg1w2/BKDF3OwoQNWoVzRP7s9lil2jYxCpb0AvKW 8g1A== X-Gm-Message-State: AOJu0YxpM4MAFwHOAv1+5xmfism54IuSarlSl/6DXTzFpw00KkwIwDmr ieMjR6WP0iw1of70JSaPjOXMB524rOEZXwJirZgqva32Col+05FC1Au7JGA/A+aaWOotKTpj/1y hoHD4ZhcL1lGLb84RhuPFv3+lbyLIuC6cqNWLdzrahpYVMbo08z3ofizjXr0u6dnwwiYqmQ== X-Gm-Gg: ASbGncuaw7ofEp3q+IsHQthnLJMFD6xF8hU8z/RU1wRQh+erlOiKTph5ZmaqXpqKUv+ ayaFkT2O8GBU9IeGIPcdiJ6MMahBUchlglIDaeJgBtR60WgKIQjJ4Udyw7kZDZB3cpDCcVYCFE0 onpiJtnPvfucv7qCOf0CNHF46vZ7FQRCd5JEl8KFltDCbMXcu+fNBYGIUG7Ba1qv2e5jQXHP8Ll yZE9IogmYrlxEGld1hud/34cMBK9+Lxxq92GANJkF3iVP39K73s7rhzdfE9iJ2XMMSLjRGamftK tDr74334Eh7+OdMjzlrLAM/d0kaxXMZ2Bb4KC5qNWO0y5Wv53+riQlr2WYgAi6K+ZkDJyY5jrHd QrIHXbju8TwTZlWZcobee6Ip4JEc6FgmyzhLgA517BbKmWImN8kyYsdJW X-Received: by 2002:a17:902:ccd0:b0:210:f706:dc4b with SMTP id d9443c01a7336-23528eedce3mr58333555ad.13.1748628180525; Fri, 30 May 2025 11:03:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYSn7RJx8pQlzjYzD7CT51JjXLrU9rnBJj3YSg0fptYM04zJkSIIg9GZtrfFTyLWbhkm72UQ== X-Received: by 2002:a17:902:ccd0:b0:210:f706:dc4b with SMTP id d9443c01a7336-23528eedce3mr58333025ad.13.1748628179953; Fri, 30 May 2025 11:02:59 -0700 (PDT) Received: from hu-nithp-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506bc868asm31374435ad.31.2025.05.30.11.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 May 2025 11:02:59 -0700 (PDT) From: Nithyanantham Paramasivam To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Nithyanantham Paramasivam Subject: [PATCH ath-next 2/3] wifi: ath12k: Fix TX status reporting to mac80211 when offload is enabled Date: Fri, 30 May 2025 23:32:46 +0530 Message-Id: <20250530180247.424349-3-nithyanantham.paramasivam@oss.qualcomm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250530180247.424349-1-nithyanantham.paramasivam@oss.qualcomm.com> References: <20250530180247.424349-1-nithyanantham.paramasivam@oss.qualcomm.com> X-Proofpoint-GUID: 2APuKPitdFqoV64k-rinZru4g96zKrYj X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTMwMDE1OSBTYWx0ZWRfX72YARddGjYvK /Dq6HioXvxyy5ZyapClX34+aQ6IuF946qpWuPXGBwsjlE2q5EUYgvLfZP9YYpjQFYt0Dq4mFSOG cJG5zc4fMiM7DoN7uKLKaDZJbUFtB0A/KPiLTVhQHJRT3Ci07SYaPO93t/YIKa9W7lZ/rr+JiaA yimmmxGHgDXHKto8/i+mF+rZKiqXLqyAOX/9N06AxtuJ7tmVqFJDiOjDRe62EBhWx1rtxsO8+bO gGcV+ePunW70EaT0h7M3uqRZlu33oLZN2GF9H2DU+H9R4oO1aoh0o9EJbyZ7+XbdOIeo14AXGzw 1HDBBaoj7q0HaT3oBRtPRq3rdiWpBhLUN5K2riT8ZbO0A1dLJx2WMASCHZ4lRbtcmTucswhWk4s /xDZ9Kze/fZjbf4me/zWatvGVwTEFTSeZmBcfB+UXUSr4fHrPFfQM8yIEwbgVqfVT6exCbmR X-Authority-Analysis: v=2.4 cv=fMk53Yae c=1 sm=1 tr=0 ts=6839f2d5 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=dt9VzEwgFbYA:10 a=EUspDBNiAAAA:8 a=5RRWBY4WAAAA:8 a=9wRqoZsPHZivbfTNylsA:9 a=GvdueXVYPmCkWapjIL-Q:22 a=drtMOSl5Q_Tsf-UZi3mY:22 X-Proofpoint-ORIG-GUID: 2APuKPitdFqoV64k-rinZru4g96zKrYj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-30_08,2025-05-30_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 impostorscore=0 phishscore=0 suspectscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 mlxscore=0 mlxlogscore=940 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505300159 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Currently, the ath12k driver supports only the native Wi-Fi frame format. In this mode, the ieee80211_tx_status() function works correctly to report transmission status to mac80211, as it retrieves station information using sta_info_get_by_addrs(). However, this method is not applicable for Ethernet-converted packets, since sta_info_get_by_addrs() cannot extract station information from such formats. To support all frame formats-including native Wi-Fi, raw, and Ethernet-station information should instead be retrieved using ath12k_peer_find_by_id(), and transmission status should be reported using ieee80211_tx_status_ext(). Additionally, ensure that rate information is included in the datapath TX status report sent to mac80211. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00217-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Nithyanantham Paramasivam --- drivers/net/wireless/ath/ath12k/dp_tx.c | 63 +++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c index 189c742f2a00..7de545c16d1f 100644 --- a/drivers/net/wireless/ath/ath12k/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c @@ -569,7 +569,8 @@ static void ath12k_dp_tx_htt_tx_complete_buf(struct ath12k_base *ab, struct ath12k_tx_desc_params *desc_params, struct dp_tx_ring *tx_ring, - struct ath12k_dp_htt_wbm_tx_status *ts) + struct ath12k_dp_htt_wbm_tx_status *ts, + u16 peer_id) { struct ieee80211_tx_info *info; struct ath12k_link_vif *arvif; @@ -578,6 +579,8 @@ ath12k_dp_tx_htt_tx_complete_buf(struct ath12k_base *ab, struct ath12k_vif *ahvif; struct ath12k *ar; struct sk_buff *msdu = desc_params->skb; + struct ieee80211_tx_status status = { 0 }; + struct ath12k_peer *peer; skb_cb = ATH12K_SKB_CB(msdu); info = IEEE80211_SKB_CB(msdu); @@ -624,8 +627,24 @@ ath12k_dp_tx_htt_tx_complete_buf(struct ath12k_base *ab, info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; } } + rcu_read_lock(); + spin_lock_bh(&ab->base_lock); + peer = ath12k_peer_find_by_id(ab, peer_id); + if (!peer || !peer->sta) { + ath12k_dbg(ab, ATH12K_DBG_DATA, + "dp_tx: failed to find the peer with peer_id %d\n", peer_id); + spin_unlock_bh(&ab->base_lock); + goto exit; + } else { + status.sta = peer->sta; + } + spin_unlock_bh(&ab->base_lock); - ieee80211_tx_status_skb(ath12k_ar_to_hw(ar), msdu); + status.info = info; + status.skb = msdu; + ieee80211_tx_status_ext(ath12k_ar_to_hw(ar), &status); +exit: + rcu_read_unlock(); } static void @@ -636,6 +655,7 @@ ath12k_dp_tx_process_htt_tx_complete(struct ath12k_base *ab, void *desc, struct htt_tx_wbm_completion *status_desc; struct ath12k_dp_htt_wbm_tx_status ts = {0}; enum hal_wbm_htt_tx_comp_status wbm_status; + u16 peer_id; status_desc = desc; @@ -648,7 +668,11 @@ ath12k_dp_tx_process_htt_tx_complete(struct ath12k_base *ab, void *desc, ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK); ts.ack_rssi = le32_get_bits(status_desc->info2, HTT_TX_WBM_COMP_INFO2_ACK_RSSI); - ath12k_dp_tx_htt_tx_complete_buf(ab, desc_params, tx_ring, &ts); + + peer_id = le32_get_bits(((struct hal_wbm_completion_ring_tx *)desc)-> + info3, HAL_WBM_COMPL_TX_INFO3_PEER_ID); + + ath12k_dp_tx_htt_tx_complete_buf(ab, desc_params, tx_ring, &ts, peer_id); break; case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP: case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL: @@ -799,6 +823,12 @@ static void ath12k_dp_tx_complete_msdu(struct ath12k *ar, struct ieee80211_vif *vif; struct ath12k_vif *ahvif; struct sk_buff *msdu = desc_params->skb; + struct ieee80211_tx_status status = { 0 }; + struct ieee80211_rate_status status_rate = { 0 }; + struct ath12k_peer *peer; + struct ath12k_link_sta *arsta; + struct ath12k_sta *ahsta; + struct rate_info rate; if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) { /* Must not happen */ @@ -885,7 +915,32 @@ static void ath12k_dp_tx_complete_msdu(struct ath12k *ar, ath12k_dp_tx_update_txcompl(ar, ts); - ieee80211_tx_status_skb(ath12k_ar_to_hw(ar), msdu); + spin_lock_bh(&ab->base_lock); + peer = ath12k_peer_find_by_id(ab, ts->peer_id); + if (!peer || !peer->sta) { + ath12k_err(ab, + "dp_tx: failed to find the peer with peer_id %d\n", + ts->peer_id); + spin_unlock_bh(&ab->base_lock); + ieee80211_free_txskb(ath12k_ar_to_hw(ar), msdu); + goto exit; + } + ahsta = ath12k_sta_to_ahsta(peer->sta); + arsta = &ahsta->deflink; + + spin_unlock_bh(&ab->base_lock); + + status.sta = peer->sta; + status.info = info; + status.skb = msdu; + rate = arsta->last_txrate; + + status_rate.rate_idx = rate; + status_rate.try_count = 1; + + status.rates = &status_rate; + status.n_rates = 1; + ieee80211_tx_status_ext(ath12k_ar_to_hw(ar), &status); exit: rcu_read_unlock(); From patchwork Fri May 30 18:02:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithyanantham Paramasivam X-Patchwork-Id: 893646 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7A3E27604B for ; Fri, 30 May 2025 18:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748628185; cv=none; b=ZJ2k5jmJWrEaSgmCvc/LgY+UeXHbSzUNxD0YoM52TbQMnLBeCH4zPQgRxcddna2Z+KTiVrK42J6QCYvJZHiv/GA147F2deA1oSeF+OvCDIjH/vLNv9CZFuuQNAZSEXaISzqiM4ynm0ktPZaJyoIi0P5eYLS4lpRM5TGjZqK0tRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748628185; c=relaxed/simple; bh=cGzujHPO/po5q9k2YiCn92R3KpaBxartUQR31J4OQic=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=o8qJFSYzsREQ0l2SqxCWAq4KEQMSIVWnThXZe0pzl9y3ITjnEs2LCkKxKmW7DKTv7SiKdhMUKEKNJpWv/GMo/DcpleC7bNjNtxvgHvC/qXpgpwr71bRnCZQ1Q+8T+ehk/m7qVY4au6ZVPdXFa9LrBVCDQjzpfVcypoQG9Sa5u2M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=nWMoDylt; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="nWMoDylt" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54UBo2ow017995 for ; Fri, 30 May 2025 18:03:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=bNx2PZVkJVHdlf+U6Dk6y7/+9lqdg3iExttgGZVWadc=; b=nW MoDyltudx4Z+x9T+JgVnEtGPdioHO4GlyzcoMGbrabVZHP07XEK7rtorePi00is9 hyuwiqy/8jyP0gSabVgB1sYPTCrCyyyxpPLsXB031iYJcFUI5iRdWEBBbNSyVv23 tdq5J+LXkufx/0nx/1+3F+9ZP1V3j3nPOstAj9AjWpfm5G/VKOZP2JCEpybcU8Sq e96IUrR0on4RnVOSrGCxJuAkppHvWkqgCMAKG3EW6kB6z0KWt5Z9oNRTatr8aGfL QkEemL8cejr2Uphi78JY3z9OibtAATicuqBvhn66JzPoA+AisDgzN3Xp0T6iaU4U ztGbud/S9WkTgIdkNb0g== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46yc4ys57y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 30 May 2025 18:03:03 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-234dbbc4899so34736095ad.2 for ; Fri, 30 May 2025 11:03:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748628182; x=1749232982; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bNx2PZVkJVHdlf+U6Dk6y7/+9lqdg3iExttgGZVWadc=; b=tkZ+eILwmUFRTNWKYDtaL5U9gx4kiu8QKHZK4JkPI91fMup7/HgtlCQyCjaoedX+9Y dVcJy7m83ii9MPrkjZ2yXyq6MynJkOt4dsPbWBOnkLn7YXmFUemnasFTDo5BepRfHuBn cyNESzozcblmuLuNE9XJyQYCxJLZ8ojATfXT55PbesssqtzT3cEbNUPFayxBEYXSjaTl 7jqSv0UuiD0pU/a3sfo4LTQiVbBORcpuoTOG4kOlWZSvNXfRNAmvyW2ysxiorGcHEgWL VwnUIYaYmzeR46TEHCcmte49NShhpdybkku4fEMDszE+vk4cnN1doNP912SJkxZ0cvd4 55CQ== X-Gm-Message-State: AOJu0YwFzfLFcpfL9tUX1b+djoRx7U4/nGn2QcOhcxDe3EG51lTtq5da phFGX9he6GaLbbVWxe7dJvcyjKtts+CRAigXZZJZSKa5LzMG4qxLO9CI46eeLbsbi3BfPdwG+xw /1APKq+Etj4SXxrszFn6DflH34HS31w7l4898t12vIB69nQnR5ZWOO3XSoMubJmdqbVv+pA== X-Gm-Gg: ASbGnctb9dRV3w48DvN4xuWy/w3maufrFaaM4g0MDbQ+MWR5IB2kGD6+Uee8Nd6YOFl TLUW4nwxqJ55YTI04t+L9WOpoq5l9dvFyXC2qB67roAxZyPkA1JhtOnjB/Ik6vuN7CRTxoJufju CMSpphRSUqC2GI2EFquxvW+Awbw/YUG96ZJeOVbupmPoBPolNYwB6h2ZhTN5rtBzaYQvNkPM3Jx cRfXfA+dYN0r50Qo2Kes43ppDPsrwFFmNUyfgoymHVugQlcOcaIuDs1uozRVWFzHoam7zmbaJdM U2jKoYDWlOK/Nuu9AIi5gjKM733lnHdL8EDRSLYGID6qbZoyYzPyW9qiyzv8C612fBebtvmwMuH jwm6cjlHXY7dDWtQ/2EdTpd/koa04EZmgUIG05+uVaR4dAA== X-Received: by 2002:a17:903:19cb:b0:234:f1ac:c036 with SMTP id d9443c01a7336-23529a1357amr66794135ad.50.1748628182193; Fri, 30 May 2025 11:03:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFOJdnxoFqU+W4FFU27jXFptIu+Ou7L8bFIvNvx7C7pS7+NxgCzhEaoR1G6UAMm+MfA13U8w== X-Received: by 2002:a17:903:19cb:b0:234:f1ac:c036 with SMTP id d9443c01a7336-23529a1357amr66793825ad.50.1748628181803; Fri, 30 May 2025 11:03:01 -0700 (PDT) Received: from hu-nithp-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506bc868asm31374435ad.31.2025.05.30.11.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 May 2025 11:03:01 -0700 (PDT) From: Nithyanantham Paramasivam To: ath12k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Nithyanantham Paramasivam Subject: [PATCH ath-next 3/3] wifi: ath12k: Advertise encapsulation/decapsulation offload support to mac80211 Date: Fri, 30 May 2025 23:32:47 +0530 Message-Id: <20250530180247.424349-4-nithyanantham.paramasivam@oss.qualcomm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250530180247.424349-1-nithyanantham.paramasivam@oss.qualcomm.com> References: <20250530180247.424349-1-nithyanantham.paramasivam@oss.qualcomm.com> X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTMwMDE1OSBTYWx0ZWRfXx223QcR0h0ox QNgM1Rt67D5l1s/eDk/nkXegokzxsWozeVabYTqBRjUu1M5e1iMTaRNV9FNfFQWbmlZmqbBoMc7 YKBBk5ZTehRX/IIASCbjvW5IaRhreU1fJ31S7KfbVvI9oyFI1Pdr5WewBLlwQ52zIybTh/EDw5S faj86Aga+guizD1aq74ijuhU9zThQpPcAoFEmdZX+aGX2L7TXjKybA2GO07/LHnBNpC2cSmU6o7 iATtu/UoiSfxryzC2jDtJ+iWdtSnNEbyOJNbARbQGvsreCaR5B+cmzhFcmmO0kipKFl+QtlTEMe 1GEu1TGrSF+EQnw2EVq79w8EvLBBjbdFKrHLuOBk1Mu8LWDmPHidSj6mozSJjTQf4f7jEbzZeQc FSg004gnmKYuMByM3U75MowsqKYgssD4S6FJyLpN1alUH2chS4llWAXiZGYk3vHJ9yMhhsr9 X-Authority-Analysis: v=2.4 cv=Ybe95xRf c=1 sm=1 tr=0 ts=6839f2d7 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=dt9VzEwgFbYA:10 a=EUspDBNiAAAA:8 a=xmVKpWhJFmdleDmdprIA:9 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-GUID: 74PdtjX3ciurdz3BrxGSd_-y91iI3h18 X-Proofpoint-ORIG-GUID: 74PdtjX3ciurdz3BrxGSd_-y91iI3h18 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-30_08,2025-05-30_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 impostorscore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505300159 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Currently, the mac80211 layer handles construction and parsing of 802.11 headers during packet transmission and reception. Offloading encapsulation and decapsulation to hardware can significantly enhance performance. This can be achieved by having the driver advertise hardware support to mac80211 to bypass 802.11 header processing Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00217-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Nithyanantham Paramasivam --- drivers/net/wireless/ath/ath12k/mac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 958299bd5acc..f65f0e9e7eb8 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -12011,6 +12011,8 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah) ieee80211_hw_set(hw, SUPPORTS_TX_FRAG); ieee80211_hw_set(hw, REPORTS_LOW_ACK); ieee80211_hw_set(hw, NO_VIRTUAL_MONITOR); + ieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD); + ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD); if ((ht_cap & WMI_HT_CAP_ENABLED) || is_6ghz) { ieee80211_hw_set(hw, AMPDU_AGGREGATION);