You are not logged in.

#1 2008-10-14 01:04:28

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Wireless headache BCM4312 and PKGBUILD [SOLVED]

So I realize that there is a new driver availible from broadcom for the BCM 4312.
until today I was running my wireless card off of ndiswrapper 1.52,
upon updating to the new kernel (2.6.27) my wireless card has ceased to function.
therefore I was trying to install the PKGBUILD from the aur and got some interesting errors.

i ran 'makepkg -L --asroot'  and here are the results=>

make: Entering directory `/usr/src/linux-2.6.27-ARCH'
  LD      /home/cyrus/builds/broadcom-wl/src/built-in.o
  CC [M]  /home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_linux.o
  CC [M]  /home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.o
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c: In function 'wl_iw_get_scan':
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:934: warning: passing argument 1 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:934: warning: passing argument 3 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:934: warning: passing argument 4 of 'iwe_stream_add_event' makes pointer from integer without a cast
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:934: error: too few arguments to function 'iwe_stream_add_event'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:939: warning: passing argument 1 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:939: warning: passing argument 3 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:939: warning: passing argument 4 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:939: error: too few arguments to function 'iwe_stream_add_point'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:947: warning: passing argument 1 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:947: warning: passing argument 3 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:947: warning: passing argument 4 of 'iwe_stream_add_event' makes pointer from integer without a cast
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:947: error: too few arguments to function 'iwe_stream_add_event'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:955: warning: passing argument 1 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:955: warning: passing argument 3 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:955: warning: passing argument 4 of 'iwe_stream_add_event' makes pointer from integer without a cast
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:955: error: too few arguments to function 'iwe_stream_add_event'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:961: warning: passing argument 1 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:961: warning: passing argument 3 of 'iwe_stream_add_event' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:961: warning: passing argument 4 of 'iwe_stream_add_event' makes pointer from integer without a cast
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:961: error: too few arguments to function 'iwe_stream_add_event'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:973: warning: passing argument 1 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:973: warning: passing argument 3 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:973: warning: passing argument 4 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:973: error: too few arguments to function 'iwe_stream_add_point'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:981: warning: passing argument 1 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:981: warning: passing argument 3 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:981: warning: passing argument 4 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:981: error: too few arguments to function 'iwe_stream_add_point'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:992: warning: passing argument 1 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:992: warning: passing argument 3 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:992: warning: passing argument 4 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:992: error: too few arguments to function 'iwe_stream_add_point'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1006: warning: passing argument 1 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1006: warning: passing argument 3 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1006: warning: passing argument 4 of 'iwe_stream_add_point' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1006: error: too few arguments to function 'iwe_stream_add_point'
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1016: warning: passing argument 1 of 'iwe_stream_add_value' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1016: warning: passing argument 4 of 'iwe_stream_add_value' from incompatible pointer type
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1016: warning: passing argument 5 of 'iwe_stream_add_value' makes pointer from integer without a cast
/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.c:1016: error: too few arguments to function 'iwe_stream_add_value'
make[1]: *** [/home/cyrus/builds/broadcom-wl/src/src/wl/sys/wl_iw.o] Error 1
make: *** [_module_/home/cyrus/builds/broadcom-wl/src] Error 2
make: Leaving directory `/usr/src/linux-2.6.27-ARCH'

I also tried this following the readme on the broadcom website and had the same results
any ideas?

Cyrusm

Last edited by Cyrusm (2008-10-14 20:14:38)


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#2 2008-10-14 06:44:47

jaux
Member
Registered: 2008-09-25
Posts: 4

Re: Wireless headache BCM4312 and PKGBUILD [SOLVED]

I had the same problem minutes ago, but I found the solution: we need patch the driver.

Here is the patch: (save it as hybrid_wl-5.10.27.6_patch-2.6.27-ARCH if you wish to use my PKGBUILD or change the "patch" line in PKGBUILD)

--- hybrid_wl.old/src/wl/sys/wl_iw.c    2008-10-14 01:04:20.000000000 -0400
+++ hybrid_wl/src/wl/sys/wl_iw.c    2008-10-14 01:32:39.000000000 -0400
@@ -931,12 +931,12 @@
         iwe.cmd = SIOCGIWAP;
         iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
         memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN);
-        event = iwe_stream_add_event(event, end, &iwe, IW_EV_ADDR_LEN);
+        event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_ADDR_LEN);
 
         iwe.u.data.length = dtoh32(bi->SSID_len);
         iwe.cmd = SIOCGIWESSID;
         iwe.u.data.flags = 1;
-        event = iwe_stream_add_point(event, end, &iwe, bi->SSID);
+        event = iwe_stream_add_point(info, event, end, &iwe, bi->SSID);
 
         if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) {
             iwe.cmd = SIOCGIWMODE;
@@ -944,7 +944,7 @@
                 iwe.u.mode = IW_MODE_INFRA;
             else
                 iwe.u.mode = IW_MODE_ADHOC;
-            event = iwe_stream_add_event(event, end, &iwe, IW_EV_UINT_LEN);
+                event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_UINT_LEN);
         }
 
         iwe.cmd = SIOCGIWFREQ;
@@ -952,13 +952,13 @@
             CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ?
             WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G);
         iwe.u.freq.e = 6;
-        event = iwe_stream_add_event(event, end, &iwe, IW_EV_FREQ_LEN);
+        event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_FREQ_LEN);
 
         iwe.cmd = IWEVQUAL;
         iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI));
         iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI);
         iwe.u.qual.noise = 0x100 + bi->phy_noise;
-        event = iwe_stream_add_event(event, end, &iwe, IW_EV_QUAL_LEN);
+        event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_QUAL_LEN);
 
 #if WIRELESS_EXT > 17
 
@@ -970,7 +970,7 @@
             if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) {
                 iwe.cmd = IWEVGENIE;
                 iwe.u.data.length = ie->len + 2;
-                event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+                event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
             }
             ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t);
             while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) {
@@ -978,7 +978,7 @@
                 if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
                 iwe.cmd = IWEVGENIE;
                 iwe.u.data.length = ie->len + 2;
-                event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+                event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
                 break;
                 }
             }
@@ -989,7 +989,7 @@
                 if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
                     iwe.cmd = IWEVGENIE;
                     iwe.u.data.length = ie->len + 2;
-                    event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+                    event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
                     goto done;
                 }
             }
@@ -1003,7 +1003,7 @@
         else
             iwe.u.data.flags = IW_ENCODE_DISABLED;
         iwe.u.data.length = 0;
-        event = iwe_stream_add_point(event, end, &iwe, (char *)event);
+        event = iwe_stream_add_point(info, event, end, &iwe, (char *)event);
 
         if (bi->rateset.count) {
             value = event + IW_EV_LCP_LEN;
@@ -1012,7 +1012,7 @@
             iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
             for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) {
                 iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000;
-                value = iwe_stream_add_value(event, value, end, &iwe,
+                value = iwe_stream_add_value(info, event, value, end, &iwe,
                     IW_EV_PARAM_LEN);
             }
             event = value;

PKGBUILD:

# Contributor: Alexandr Kotov <nektokot@gmail.com>
pkgname=broadcom-wl
pkgver=5.10.27.6
pkgrel=3
patch=hybrid_wl-5.10.27.6_patch-2.6.27-ARCH
pkgdesc="Broadcom 802.11abg Networking Drivers"
arch=('i686 x86_64')
[ "$CARCH" = "i686"   ] && ARCH=x86_32
[ "$CARCH" = "x86_64" ] && ARCH=x86_64
url="http://www.broadcom.com"
license=('Broadcom')
depends=('kernel26>=2.6.25-11')
source=('http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-'$ARCH'_5_10_27_6.tar.gz' $patch)
md5sums=('7f50d89179e637225bd97022b323c27e')
[ "$CARCH" = "x86_64" ] && md5sums=('d61e5ad289fc5f0b62e0656f90b451a7')

build() {
  patch -p1 < ../$patch || return 1
  KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` || return 1
  install -D -m 755 wl.ko $pkgdir/lib/modules/$(uname -r)/kernel/drivers/net/wireless/wl.ko || return 1
}

Offline

#3 2008-10-14 14:38:56

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Wireless headache BCM4312 and PKGBUILD [SOLVED]

Thank you for the patch and PKGBUILD, I ran them, and got these errors:

patching file src/wl/sys/wl_iw.c
Hunk #1 FAILED at 931.
Hunk #2 FAILED at 944.
Hunk #3 FAILED at 952.
Hunk #4 FAILED at 970.
Hunk #5 FAILED at 978.
Hunk #6 FAILED at 989.
Hunk #7 FAILED at 1003.
patch unexpectedly ends in middle of line
Hunk #8 FAILED at 1012.
8 out of 8 hunks FAILED -- saving rejects to file src/wl/sys/wl_iw.c.rej

Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#4 2008-10-14 18:37:57

jaux
Member
Registered: 2008-09-25
Posts: 4

Re: Wireless headache BCM4312 and PKGBUILD [SOLVED]

Offline

#5 2008-10-14 18:48:17

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Wireless headache BCM4312 and PKGBUILD [SOLVED]

thank you jaux!!  i was having the exact same problem, and i actually found that patch elsewhere but i could not get it to successfully apply, but yours worked like a charm.  driver's built with 2.6.27  cool

Offline

#6 2008-10-14 20:15:16

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Wireless headache BCM4312 and PKGBUILD [SOLVED]

Thanks a lot for the help jaux!
problem solved cool

Last edited by Cyrusm (2008-10-14 20:15:46)


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

Board footer

Powered by FluxBB