소스 검색

qcacmn: Check mld peer address for IPA intra-bss fwd

In the case of MLO connection, MLD address is used for data
transmissions in the ethernet header. Take MLO-SAP intra-bss
forwarding as an instance, ref1 sends unicast arp-resp to
ref2 who initiates broadcast arp-req. DA and SA in the ethernet
header are both MLD mac addresses of ref1 and ref2.

Currently when WLAN IPA component does the intra-bss forwarding
check, MLO connection is not taken into consideration, where
only legacy hash table is searched. For a MLD peer, it is not
added into the legacy hash table but the MLD specific hash
table.

Hence in this change, use dp_peer_hash_find_wrapper() API with
CDP_WILD_PEER_TYPE to check if peer exists in both legacy
and MLD hash table.

Change-Id: Ifea7cd37373e1575d811bedefb602d0df5c1765b
CRs-Fixed: 3400280
Jia Ding 2 년 전
부모
커밋
09186dbaf9
1개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 8 5
      dp/wifi3.0/dp_ipa.c

+ 8 - 5
dp/wifi3.0/dp_ipa.c

@@ -3409,15 +3409,18 @@ static inline bool dp_ipa_peer_check(struct dp_soc *soc,
 static inline bool dp_ipa_peer_check(struct dp_soc *soc,
 				     uint8_t *peer_mac_addr, uint8_t vdev_id)
 {
+	struct cdp_peer_info peer_info = {0};
 	struct dp_peer *peer = NULL;
 
-	peer = dp_peer_find_hash_find(soc, peer_mac_addr, 0, vdev_id,
-				      DP_MOD_ID_IPA);
-	if (!peer) {
-		return false;
-	} else {
+	DP_PEER_INFO_PARAMS_INIT(&peer_info, vdev_id, peer_mac_addr, false,
+				 CDP_WILD_PEER_TYPE);
+
+	peer = dp_peer_hash_find_wrapper(soc, &peer_info, DP_MOD_ID_IPA);
+	if (peer) {
 		dp_peer_unref_delete(peer, DP_MOD_ID_IPA);
 		return true;
+	} else {
+		return false;
 	}
 }
 #endif