6relayd: various updates & fixes
[openwrt.git] / package / broadcom-wl / patches / 003-compat-2.6.35.patch
1 --- a/driver/wl_linux.c
2 +++ b/driver/wl_linux.c
3 @@ -2082,7 +2082,11 @@ static void
4  _wl_set_multicast_list(struct net_device *dev)
5  {
6         wl_info_t *wl;
7 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
8         struct dev_mc_list *mclist;
9 +#else
10 +       struct netdev_hw_addr *ha;
11 +#endif
12         int i;
13  
14         if (!dev)
15 @@ -2098,14 +2102,24 @@ _wl_set_multicast_list(struct net_device
16                 wl->pub->allmulti = (dev->flags & IFF_ALLMULTI)? TRUE: FALSE;
17  
18                 /* copy the list of multicasts into our private table */
19 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
20                 for (i = 0, mclist = dev->mc_list; mclist && (i < dev->mc_count);
21                         i++, mclist = mclist->next) {
22 +#else
23 +               i = 0;
24 +               netdev_for_each_mc_addr(ha, dev) {
25 +#endif
26                         if (i >= MAXMULTILIST) {
27                                 wl->pub->allmulti = TRUE;
28                                 i = 0;
29                                 break;
30                         }
31 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
32                         wl->pub->multicast[i] = *((struct ether_addr*) mclist->dmi_addr);
33 +#else
34 +                       wl->pub->multicast[i] = *((struct ether_addr*) ha->addr);
35 +                       i++;
36 +#endif
37                 }
38                 wl->pub->nmulticast = i;
39                 wlc_set(wl->wlc, WLC_SET_PROMISC, (dev->flags & IFF_PROMISC));