Bug#591549: broadcom-sta-source: needs patch to build with 2.6.35

2010-08-07 Thread Geoff Simmons
tags 591549 patch
thanks

On Tue, Aug 03, 2010 at 10:30:40PM +0200, Marc Haber wrote:
 broadcom-sta 5.60.48.36 needs to be patched
[...]
 to allow building with kernel 2.6.35. I haven't tried yet whether the
 patched driver actually works.

Tested and working with a BCM4321 device on 2.6.35.  A quilt patch is
attached.

Geoff
Description: Multicast patch for kernel 2.6.34 and higher
Origin: upstream, http://www.broadcom.com/docs/linux_sta/sta_5.60.48.36_2.6.34_multicast_kernel_patch.zip
Bug-Debian: http://bugs.debian.org/591549
Author: Geoff Simmons gsimm...@gsimmons.org
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -1418,7 +1418,12 @@
 _wl_set_multicast_list(struct net_device *dev)
 {
 	wl_info_t *wl;
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 33)
 	struct dev_mc_list *mclist;
+#else
+	struct netdev_hw_addr	*ha;
+	int num;
+#endif
 	int i;
 
 	if (!dev)
@@ -1431,9 +1436,8 @@
 
 	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) {
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 33)
+		for (i = 0, mclist = dev-mc_list; mclist  (i  dev-mc_count); i++, mclist = mclist-next) {
 			if (i = MAXMULTILIST) {
 wl-pub-allmulti = TRUE;
 i = 0;
@@ -1441,6 +1445,18 @@
 			}
 			wl-pub-multicast[i] = *((struct ether_addr*) mclist-dmi_addr);
 		}
+#else
+		num = min_t(int, netdev_mc_count(dev), MAXMULTILIST);
+		i = 0;
+		netdev_for_each_mc_addr(ha, dev) {
+			if (i = num) {
+wl-pub-allmulti = TRUE;
+i = 0;
+break;
+			}
+			wl-pub-multicast[i] = *((struct ether_addr*) ha-addr);
+		}
+#endif
 		wl-pub-nmulticast = i;
 		wlc_set(wl-wlc, WLC_SET_PROMISC, (dev-flags  IFF_PROMISC));
 	}
--- a/i386/src/wl/sys/wl_linux.c
+++ b/i386/src/wl/sys/wl_linux.c
@@ -1418,7 +1418,12 @@
 _wl_set_multicast_list(struct net_device *dev)
 {
 	wl_info_t *wl;
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 33)
 	struct dev_mc_list *mclist;
+#else
+	struct netdev_hw_addr	*ha;
+	int num;
+#endif
 	int i;
 
 	if (!dev)
@@ -1431,9 +1436,8 @@
 
 	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) {
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2, 6, 33)
+		for (i = 0, mclist = dev-mc_list; mclist  (i  dev-mc_count); i++, mclist = mclist-next) {
 			if (i = MAXMULTILIST) {
 wl-pub-allmulti = TRUE;
 i = 0;
@@ -1441,6 +1445,18 @@
 			}
 			wl-pub-multicast[i] = *((struct ether_addr*) mclist-dmi_addr);
 		}
+#else
+		num = min_t(int, netdev_mc_count(dev), MAXMULTILIST);
+		i = 0;
+		netdev_for_each_mc_addr(ha, dev) {
+			if (i = num) {
+wl-pub-allmulti = TRUE;
+i = 0;
+break;
+			}
+			wl-pub-multicast[i] = *((struct ether_addr*) ha-addr);
+		}
+#endif
 		wl-pub-nmulticast = i;
 		wlc_set(wl-wlc, WLC_SET_PROMISC, (dev-flags  IFF_PROMISC));
 	}


Bug#591549: broadcom-sta-source: needs patch to build with 2.6.35

2010-08-03 Thread Marc Haber
Package: broadcom-sta-source
Severity: normal

Hi,

broadcom-sta 5.60.48.36 needs to be patched with the patch from
http://www.broadcom.com/docs/linux_sta/sta_5.60.48.36_2.6.34_multicast_kernel_patch.zip
to allow building with kernel 2.6.35. I haven't tried yet whether the
patched driver actually works.

Greetings
Marc



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org