003-compat-2.6.35.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. if (!dev)
  14. @@ -2098,14 +2102,24 @@ _wl_set_multicast_list(struct net_device
  15. wl->pub->allmulti = (dev->flags & IFF_ALLMULTI)? TRUE: FALSE;
  16. /* copy the list of multicasts into our private table */
  17. +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
  18. for (i = 0, mclist = dev->mc_list; mclist && (i < dev->mc_count);
  19. i++, mclist = mclist->next) {
  20. +#else
  21. + i = 0;
  22. + netdev_for_each_mc_addr(ha, dev) {
  23. +#endif
  24. if (i >= MAXMULTILIST) {
  25. wl->pub->allmulti = TRUE;
  26. i = 0;
  27. break;
  28. }
  29. +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)
  30. wl->pub->multicast[i] = *((struct ether_addr*) mclist->dmi_addr);
  31. +#else
  32. + wl->pub->multicast[i] = *((struct ether_addr*) ha->addr);
  33. + i++;
  34. +#endif
  35. }
  36. wl->pub->nmulticast = i;
  37. wlc_set(wl->wlc, WLC_SET_PROMISC, (dev->flags & IFF_PROMISC));