From 981e8e7b41c81ffd134eebc0f60a13489be104bf Mon Sep 17 00:00:00 2001 From: Sachin Ahuja Date: Mon, 25 Feb 2019 18:50:06 +0530 Subject: [PATCH] qcacld-3.0: Update MC address list correctly Currently while copying the MC address list, PMO checks for the IPv6 router solicitation address. If this address is found in the source list then this address is ignored but the hole is created in the destination list. As a result of this hole, FW does not filter the packets for the last configured MC address in the list. To mitigate this issue, add the correct logic of copying the MC addresses from source list to destination list when IPv6 router solicitation address is found in the source list. Change-Id: If9412933d30259e7260e4d9e11cc514dec964355 CRs-Fixed: 2403419 --- .../pmo/core/src/wlan_pmo_mc_addr_filtering.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/pmo/core/src/wlan_pmo_mc_addr_filtering.c b/components/pmo/core/src/wlan_pmo_mc_addr_filtering.c index d9d15bb95914..b63a69c178d8 100644 --- a/components/pmo/core/src/wlan_pmo_mc_addr_filtering.c +++ b/components/pmo/core/src/wlan_pmo_mc_addr_filtering.c @@ -31,7 +31,7 @@ static void pmo_core_fill_mc_list(struct pmo_vdev_priv_obj **vdev_ctx, struct pmo_mc_addr_list_params *ip) { struct pmo_mc_addr_list *op_list; - int i; + int i, j = 0; static const uint8_t ipv6_rs[] = { 0x33, 0x33, 0x00, 0x00, 0x00, 0x02}; struct pmo_vdev_priv_obj *temp_ctx; @@ -66,12 +66,14 @@ static void pmo_core_fill_mc_list(struct pmo_vdev_priv_obj **vdev_ctx, continue; } qdf_spin_lock_bh(&temp_ctx->pmo_vdev_lock); - qdf_mem_zero(&(op_list->mc_addr[i].bytes), - QDF_MAC_ADDR_SIZE); - qdf_mem_copy(&(op_list->mc_addr[i].bytes), - ip->mc_addr[i].bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_zero(&op_list->mc_addr[j].bytes, + QDF_MAC_ADDR_SIZE); + qdf_mem_copy(&op_list->mc_addr[j].bytes, + ip->mc_addr[i].bytes, QDF_MAC_ADDR_SIZE); qdf_spin_unlock_bh(&temp_ctx->pmo_vdev_lock); - pmo_debug("mlist[%pM] = ", op_list->mc_addr[i].bytes); + pmo_debug("Index = %d, mlist[%pM]", + j, op_list->mc_addr[i].bytes); + j++; } }