From 09837d28a2485d76504d2b7334f6be9ff84824d0 Mon Sep 17 00:00:00 2001 From: Chaithanya Garrepalli Date: Mon, 9 Sep 2019 15:01:10 +0530 Subject: [PATCH] qcacmn: Do not add AST entry when PEER exist Do not add WDS AST entry when peer exists with same mac address Change-Id: I533f431bb8c137d484c21fe8e411b1da7fe0d0cb CRs-fixed: 2514962 --- dp/wifi3.0/dp_peer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index 3dd1ae14c6..521e274d2b 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -579,6 +579,7 @@ int dp_peer_add_ast(struct dp_soc *soc, int ret = -1; txrx_ast_free_cb cb = NULL; void *cookie = NULL; + struct dp_peer *tmp_peer = NULL; qdf_spin_lock_bh(&soc->ast_lock); if (peer->delete_in_progress) { @@ -628,6 +629,13 @@ int dp_peer_add_ast(struct dp_soc *soc, qdf_spin_unlock_bh(&soc->ast_lock); return 0; } + tmp_peer = dp_peer_find_hash_find(soc, mac_addr, 0, + DP_VDEV_ALL); + if (tmp_peer) { + dp_peer_unref_delete(tmp_peer); + qdf_spin_unlock_bh(&soc->ast_lock); + return 0; + } } else { /* For HWMWDS_SEC entries can be added for same mac address * do not check for existing entry