|
@@ -6449,7 +6449,7 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action,
|
|
|
uint8_t pattern)
|
|
|
{
|
|
|
int ret;
|
|
|
- uint8_t i;
|
|
|
+ uint8_t i, j;
|
|
|
tHalHandle handle;
|
|
|
tSirRcvFltMcAddrList *filter;
|
|
|
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
@@ -6487,19 +6487,21 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action,
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
filter->action = action;
|
|
|
- for (i = 0; i < adapter->mc_addr_list.mc_cnt; i++) {
|
|
|
+ for (i = 0, j = 0; i < adapter->mc_addr_list.mc_cnt; i++) {
|
|
|
if (!memcmp(adapter->mc_addr_list.addr[i],
|
|
|
&pattern, 1)) {
|
|
|
- memcpy(filter->multicastAddr[i].bytes,
|
|
|
+ memcpy(filter->multicastAddr[j].bytes,
|
|
|
adapter->mc_addr_list.addr[i],
|
|
|
sizeof(adapter->mc_addr_list.addr[i]));
|
|
|
- filter->ulMulticastAddrCnt++;
|
|
|
+
|
|
|
hdd_info("%s RX filter : addr ="
|
|
|
MAC_ADDRESS_STR,
|
|
|
action ? "setting" : "clearing",
|
|
|
- MAC_ADDR_ARRAY(filter->multicastAddr[i].bytes));
|
|
|
+ MAC_ADDR_ARRAY(filter->multicastAddr[j].bytes));
|
|
|
+ j++;
|
|
|
}
|
|
|
}
|
|
|
+ filter->ulMulticastAddrCnt = j;
|
|
|
/* Set rx filter */
|
|
|
sme_8023_multicast_list(handle, adapter->sessionId, filter);
|
|
|
qdf_mem_free(filter);
|