summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNithyanantham Paramasivam <nithyanantham.paramasivam@oss.qualcomm.com>2025-07-18 08:25:13 +0530
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>2025-07-19 09:14:45 -0700
commitd29591d5b52eaa62bc8c07ec83fe63018b5546ea (patch)
tree7551f62cf57fd7c3fbf80c3224bb91413fe0d234
parent981050b918fc4c36e0ef3bd7392b39d7304ef09b (diff)
wifi: ath12k: Advertise encapsulation/decapsulation offload support to mac80211
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. Check the service bit to determine if the firmware supports Ethernet offload. If supported, advertise the capability to mac80211 to bypass software-based 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 <nithyanantham.paramasivam@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250718025513.32982-4-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath12k/mac.c5
-rw-r--r--drivers/net/wireless/ath/ath12k/wmi.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index c56201fbee7a..05250fa0600d 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -13755,6 +13755,11 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
ieee80211_hw_set(hw, REPORTS_LOW_ACK);
ieee80211_hw_set(hw, NO_VIRTUAL_MONITOR);
+ if (test_bit(WMI_TLV_SERVICE_ETH_OFFLOAD, ar->wmi->wmi_ab->svc_map)) {
+ ieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);
+ ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);
+ }
+
if (cap->nss_ratio_enabled)
ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 5b782258f870..f3b0a6f57ec2 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -2255,6 +2255,7 @@ enum wmi_tlv_service {
WMI_TLV_SERVICE_WMSK_COMPACTION_RX_TLVS = 361,
WMI_TLV_SERVICE_PEER_METADATA_V1A_V1B_SUPPORT = 365,
+ WMI_TLV_SERVICE_ETH_OFFLOAD = 461,
WMI_MAX_EXT2_SERVICE,
};