qcacmn: Allow WAPI packet delivering if no valid peer

During STA roaming, WAPI M1 might send to host before roam_sync
completion, host peer has not been created or mapped to
FW peer ID, no corresponding host peer can be found to deliver this
WAPI packet then dropped.

To not affect roaming efficiency, allow this WAPI packet can be
delivered to stack without peer if with valid DP vdev.

Change-Id: I37bdcd2d4ed4057eedae56d8c524e5f412773187
CRs-Fixed: 3857096
This commit is contained in:
Krupali Dhanvijay 2024-07-01 11:29:38 +05:30 • committed by Ravindra Konda
commit f2c5ba0150
3 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -390,6 +391,7 @@ while (0)
#define FRAME_MASK_IPV4_DHCP 2
#define FRAME_MASK_IPV4_EAPOL 4
#define FRAME_MASK_IPV6_DHCP 8
#define FRAME_MASK_IPV4_WAPI 0x40
#ifdef QCA_SUPPORT_PEER_ISOLATION
#define dp_get_peer_isolation(_peer) ((_peer)->isolation)

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -2129,7 +2129,8 @@ void dp_rx_deliver_to_stack_no_peer(struct dp_soc *soc, qdf_nbuf_t nbuf)
uint32_t pkt_len = 0;
uint8_t *rx_tlv_hdr;
uint32_t frame_mask = FRAME_MASK_IPV4_ARP | FRAME_MASK_IPV4_DHCP |
FRAME_MASK_IPV4_EAPOL | FRAME_MASK_IPV6_DHCP;
FRAME_MASK_IPV4_EAPOL | FRAME_MASK_IPV6_DHCP |
FRAME_MASK_IPV4_WAPI;
peer_id = QDF_NBUF_CB_RX_PEER_ID(nbuf);
if (peer_id > soc->max_peers)

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -209,7 +210,9 @@ bool dp_rx_is_special_frame(qdf_nbuf_t nbuf, uint32_t frame_mask)
((frame_mask & FRAME_MASK_IPV4_EAPOL) &&
qdf_nbuf_is_ipv4_eapol_pkt(nbuf)) ||
((frame_mask & FRAME_MASK_IPV6_DHCP) &&
qdf_nbuf_is_ipv6_dhcp_pkt(nbuf)))
qdf_nbuf_is_ipv6_dhcp_pkt(nbuf)) ||
((frame_mask & FRAME_MASK_IPV4_WAPI) &&
qdf_nbuf_is_ipv4_wapi_pkt(nbuf)))
return true;
return false;