qcacld-3.0: add DA check for EAPOL if not from regular RX path

For MLO connection, if the RX EAPOL frame is not from regular RX path,
then DA conversion likely has not done by HW.

Add DA check for EAPOL if not from regular RX path.

Change-Id: Ib68d247be216805d11d42da3f8580c47dffe93b6
CRs-Fixed: 3289834
This commit is contained in:
Jinwei Chen
2022-09-21 22:07:02 -07:00
committed by Madan Koyyalamudi
parent 4f7dd9caca
commit 27c185dbcd
2 changed files with 27 additions and 0 deletions

View File

@@ -637,4 +637,28 @@ dp_rx_ol_init(struct wlan_dp_psoc_context *dp_ctx,
}
#endif
#ifdef WLAN_FEATURE_11BE_MLO
static inline
void dp_rx_pkt_da_check(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf)
{
/* only do DA check for RX frame from non-regular path */
if (!qdf_nbuf_is_exc_frame(nbuf))
return;
if (qdf_mem_cmp(qdf_nbuf_data(nbuf), dp_intf->mac_addr.bytes,
ETH_ALEN)) {
dp_info("da mac:" QDF_MAC_ADDR_FMT "intf_mac:" QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(qdf_nbuf_data(nbuf)),
QDF_MAC_ADDR_REF(dp_intf->mac_addr.bytes));
qdf_mem_copy(qdf_nbuf_data(nbuf), dp_intf->mac_addr.bytes,
ETH_ALEN);
}
}
#else
static inline
void dp_rx_pkt_da_check(struct wlan_dp_intf *dp_intf, qdf_nbuf_t nbuf)
{
}
#endif
#endif

View File

@@ -1653,6 +1653,9 @@ QDF_STATUS dp_rx_packet_cbk(void *dp_intf_context,
} else if (qdf_nbuf_is_ipv4_eapol_pkt(nbuf)) {
subtype = qdf_nbuf_get_eapol_subtype(nbuf);
send_over_nl = true;
/* Mac address check between RX packet DA and dp_intf's */
dp_rx_pkt_da_check(dp_intf, nbuf);
if (subtype == QDF_PROTO_EAPOL_M1) {
++dp_intf->dp_stats.eapol_stats.
eapol_m1_count;