From d82a4de4ecc2c8ff87301cdcc0606a3de99a925c Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Tue, 7 Jun 2016 16:23:10 +0530 Subject: qcacld-2.0: Clear MC filters when more than max available When number of link MC addresses configured are more than the maximum firmware MC address list size, host sets the firmware's MC filters up to the max and skipping the rest. As a result firmware drops the MC packets for the addresses whose MC filter is not set. To fix this clear the firmware MC filters when the number of kernel MC addresses list is greater than the firmware's MC filter list size. When no filters are configured firmware allows all the MC frames to the host. Change-Id: I6d8e8b2f5a646b914a7568ceae593b45b58f84d0 CRs-Fixed: 1025279 --- CORE/HDD/src/wlan_hdd_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index bd5c69dd5311..8370e3c1535b 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -9874,12 +9874,20 @@ static void __hdd_set_multicast_list(struct net_device *dev) "%s: mc_count : %u, max_mc_addr_list : %d", __func__, mc_count, pHddCtx->max_mc_addr_list); + if (mc_count > pHddCtx->max_mc_addr_list) { + hddLog(VOS_TRACE_LEVEL_INFO, + "%s: No free filter available; allow all multicast frames", + __func__); + pAdapter->mc_addr_list.mc_cnt = 0; + return; + } + netdev_for_each_mc_addr(ha, dev) { hddLog(VOS_TRACE_LEVEL_INFO, FL("ha_addr[%d] "MAC_ADDRESS_STR), i, MAC_ADDR_ARRAY(ha->addr)); - if (i == mc_count || i == pHddCtx->max_mc_addr_list) + if (i == mc_count) break; /* * Skip following addresses: -- cgit v1.2.3