Skip to content

Commit 565257a

Browse files
Tamizh Chelvam Rajajeff-t-johnson
authored andcommitted
wifi: ath12k: Handle 4-address EAPOL frames from WBM error path
Whenever hardware receives 4-address EAPOL frames from an unauthorized station it is routed through WBM/RXDMA error path with the HAL_REO_ENTR_RING_RXDMA_ECODE_UNAUTH_WDS_ERR error code. But, the current driver does not handle the 4-address EAPOL frames in the WBM error path. As a result, these frames are dropped, causing authentication failures and connectivity issues for 4-address stations. Add support to correctly process these frames and forward them to mac80211 for proper handling. This prevents the loss of 4-address EAPOL frames and ensures reliable connectivity for WDS/4-address clients. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Co-developed-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260525110942.2890212-7-tamizh.raja@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent f818260 commit 565257a

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

  • drivers/net/wireless/ath/ath12k/wifi7

drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,56 @@ static bool ath12k_wifi7_dp_rx_h_tkip_mic_err(struct ath12k_pdev_dp *dp_pdev,
17041704
return false;
17051705
}
17061706

1707+
static bool ath12k_wifi7_dp_rx_h_unauth_wds_err(struct ath12k_pdev_dp *dp_pdev,
1708+
struct sk_buff *msdu,
1709+
struct hal_rx_desc_data *rx_info)
1710+
{
1711+
struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu);
1712+
struct ath12k_dp *dp = dp_pdev->dp;
1713+
u32 hdr_len, hal_rx_desc_sz = dp->ab->hal.hal_desc_sz;
1714+
u8 l3pad_bytes = rx_info->l3_pad_bytes;
1715+
struct ath12k_dp_rx_rfc1042_hdr *llc;
1716+
u16 msdu_len = rx_info->msdu_len;
1717+
struct ath12k_dp_peer *peer;
1718+
struct ieee80211_hdr *hdr;
1719+
int ret;
1720+
1721+
guard(rcu)();
1722+
peer = ath12k_dp_peer_find_by_peerid(dp_pdev, rxcb->peer_id);
1723+
if (!peer) {
1724+
ath12k_dbg(dp->ab, ATH12K_DBG_DATA,
1725+
"failed to find the peer to process unauth wds err handling peer_id %d\n",
1726+
rxcb->peer_id);
1727+
return true;
1728+
}
1729+
1730+
if ((hal_rx_desc_sz + l3pad_bytes + msdu_len) > DP_RX_BUFFER_SIZE)
1731+
return true;
1732+
1733+
skb_put(msdu, hal_rx_desc_sz + l3pad_bytes + msdu_len);
1734+
skb_pull(msdu, hal_rx_desc_sz + l3pad_bytes);
1735+
1736+
if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, msdu,
1737+
rx_info)))
1738+
return true;
1739+
1740+
ath12k_dp_rx_h_ppdu(dp_pdev, rx_info);
1741+
1742+
ret = ath12k_wifi7_dp_rx_h_mpdu(dp_pdev, msdu, rx_info);
1743+
if (ret)
1744+
return true;
1745+
1746+
rxcb->tid = rx_info->tid;
1747+
1748+
hdr = (struct ieee80211_hdr *)msdu->data;
1749+
hdr_len = ieee80211_hdrlen(hdr->frame_control);
1750+
llc = (struct ath12k_dp_rx_rfc1042_hdr *)(msdu->data + hdr_len);
1751+
if (llc->snap_type != cpu_to_be16(ETH_P_PAE))
1752+
return true;
1753+
1754+
return false;
1755+
}
1756+
17071757
static bool ath12k_wifi7_dp_rx_h_rxdma_err(struct ath12k_pdev_dp *dp_pdev,
17081758
struct sk_buff *msdu,
17091759
struct hal_rx_desc_data *rx_info)
@@ -1715,6 +1765,9 @@ static bool ath12k_wifi7_dp_rx_h_rxdma_err(struct ath12k_pdev_dp *dp_pdev,
17151765
dp->device_stats.rxdma_error[rxcb->err_code]++;
17161766

17171767
switch (rxcb->err_code) {
1768+
case HAL_REO_ENTR_RING_RXDMA_ECODE_UNAUTH_WDS_ERR:
1769+
drop = ath12k_wifi7_dp_rx_h_unauth_wds_err(dp_pdev, msdu, rx_info);
1770+
break;
17181771
case HAL_REO_ENTR_RING_RXDMA_ECODE_DECRYPT_ERR:
17191772
case HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR:
17201773
if (rx_info->err_bitmap & HAL_RX_MPDU_ERR_TKIP_MIC) {

0 commit comments

Comments
 (0)