Skip to content

Instantly share code, notes, and snippets.

@acdimalev
Created November 19, 2011 17:45
Show Gist options
  • Save acdimalev/1379115 to your computer and use it in GitHub Desktop.
Save acdimalev/1379115 to your computer and use it in GitHub Desktop.
broadcom-sta patch for Debian squeeze-backports kernel
diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c
index dbd6e89..c5d9ba9 100644
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -1418,7 +1418,7 @@ static void
_wl_set_multicast_list(struct net_device *dev)
{
wl_info_t *wl;
- struct dev_mc_list *mclist;
+ struct netdev_hw_addr *ha;
int i;
if (!dev)
@@ -1432,14 +1432,15 @@ _wl_set_multicast_list(struct net_device *dev)
if (wl->pub->up) {
wl->pub->allmulti = (dev->flags & IFF_ALLMULTI)? TRUE: FALSE;
- for (i = 0, mclist = dev->mc_list; mclist && (i < dev->mc_count);
- i++, mclist = mclist->next) {
+ i = 0;
+ netdev_for_each_mc_addr(ha, dev) {
if (i >= MAXMULTILIST) {
wl->pub->allmulti = TRUE;
i = 0;
break;
}
- wl->pub->multicast[i] = *((struct ether_addr*) mclist->dmi_addr);
+ wl->pub->multicast[i] = *((struct ether_addr*) ha->addr);
+ i++;
}
wl->pub->nmulticast = i;
wlc_set(wl->wlc, WLC_SET_PROMISC, (dev->flags & IFF_PROMISC));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment