From 8dd440d33c1d52b0f55efd545afe744e5ed555cb Mon Sep 17 00:00:00 2001 From: Nandha Kishore Easwaran Date: Fri, 30 Nov 2018 15:02:20 +0530 Subject: [PATCH] qcacmn: Add extra check in mec event when replacing ast entry Check if the ast_entry peer is same as the peer received in MEC event before removing the wds entry. This check is required for wds repeater scenarios. When a multicast packet goes from station to the rootap via the repeater, a mec event will be received in host but the entry should not be replaced. Change-Id: Ia6fae9f08b411b481fc6d7c3f829bd127f92caec --- dp/wifi3.0/dp_peer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index a28cc3e4d6a2..444f5a7e98cc 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -588,10 +588,16 @@ int dp_peer_add_ast(struct dp_soc *soc, /* Modify an already existing AST entry from type * WDS to MEC on promption. This serves as a fix when * backbone of interfaces are interchanged wherein - * wds entr becomes its own MEC. + * wds entr becomes its own MEC. The entry should be + * replaced only when the ast_entry peer matches the + * peer received in mec event. This additional check + * is needed in wds repeater cases where a multicast + * packet from station to the root via the repeater + * should not remove the wds entry. */ if ((ast_entry->type == CDP_TXRX_AST_TYPE_WDS) && - (type == CDP_TXRX_AST_TYPE_MEC)) { + (type == CDP_TXRX_AST_TYPE_MEC) && + (ast_entry->peer == peer)) { ast_entry->is_active = FALSE; dp_peer_del_ast(soc, ast_entry); }