|
@@ -806,34 +806,38 @@ static void wilc_set_multicast_list(struct net_device *dev)
|
|
struct netdev_hw_addr *ha;
|
|
struct netdev_hw_addr *ha;
|
|
struct wilc_vif *vif = netdev_priv(dev);
|
|
struct wilc_vif *vif = netdev_priv(dev);
|
|
int i = 0;
|
|
int i = 0;
|
|
|
|
+ u8 *mc_list;
|
|
|
|
+ int res;
|
|
|
|
|
|
if (dev->flags & IFF_PROMISC)
|
|
if (dev->flags & IFF_PROMISC)
|
|
return;
|
|
return;
|
|
|
|
|
|
if (dev->flags & IFF_ALLMULTI ||
|
|
if (dev->flags & IFF_ALLMULTI ||
|
|
dev->mc.count > WILC_MULTICAST_TABLE_SIZE) {
|
|
dev->mc.count > WILC_MULTICAST_TABLE_SIZE) {
|
|
- wilc_setup_multicast_filter(vif, false, 0);
|
|
|
|
|
|
+ wilc_setup_multicast_filter(vif, false, 0, NULL);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
if (dev->mc.count == 0) {
|
|
if (dev->mc.count == 0) {
|
|
- wilc_setup_multicast_filter(vif, true, 0);
|
|
|
|
|
|
+ wilc_setup_multicast_filter(vif, true, 0, NULL);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ mc_list = kmalloc(dev->mc.count * ETH_ALEN, GFP_KERNEL);
|
|
|
|
+ if (!mc_list)
|
|
|
|
+ return;
|
|
|
|
+
|
|
netdev_for_each_mc_addr(ha, dev) {
|
|
netdev_for_each_mc_addr(ha, dev) {
|
|
- memcpy(wilc_multicast_mac_addr_list[i], ha->addr, ETH_ALEN);
|
|
|
|
- netdev_dbg(dev, "Entry[%d]: %x:%x:%x:%x:%x:%x\n", i,
|
|
|
|
- wilc_multicast_mac_addr_list[i][0],
|
|
|
|
- wilc_multicast_mac_addr_list[i][1],
|
|
|
|
- wilc_multicast_mac_addr_list[i][2],
|
|
|
|
- wilc_multicast_mac_addr_list[i][3],
|
|
|
|
- wilc_multicast_mac_addr_list[i][4],
|
|
|
|
- wilc_multicast_mac_addr_list[i][5]);
|
|
|
|
- i++;
|
|
|
|
|
|
+ memcpy(mc_list + i, ha->addr, ETH_ALEN);
|
|
|
|
+ netdev_dbg(dev, "Entry[%d]: %x:%x:%x:%x:%x:%x\n", i/ETH_ALEN,
|
|
|
|
+ mc_list[i], mc_list[i + 1], mc_list[i + 2],
|
|
|
|
+ mc_list[i + 3], mc_list[i + 4], mc_list[i + 5]);
|
|
|
|
+ i += ETH_ALEN;
|
|
}
|
|
}
|
|
|
|
|
|
- wilc_setup_multicast_filter(vif, true, (dev->mc.count));
|
|
|
|
|
|
+ res = wilc_setup_multicast_filter(vif, true, dev->mc.count, mc_list);
|
|
|
|
+ if (res)
|
|
|
|
+ kfree(mc_list);
|
|
}
|
|
}
|
|
|
|
|
|
static void linux_wlan_tx_complete(void *priv, int status)
|
|
static void linux_wlan_tx_complete(void *priv, int status)
|