You are not logged in.

#1 2015-02-03 11:20:03

debanshuk
Member
From: India
Registered: 2014-04-30
Posts: 4

Frequent disconnections with Broadcom wifi BCM43142

I have the latest kernel (3.18.4) and have installed the 'wl' kernel module from broadcom-wl-dkms pakage (https://aur.archlinux.org/packages/broadcom-wl-dkms). According to the comments on the package's page they have fixed some issues with the broadcom-wl driver recently. But I am still facing frequent disconnections and slow speed issue with BCM43142 (PCI-ID: 14e4:4365) wifi card (on Lenovo B590). Is anyone else facing similar issue(s) and/or have a solution?

Offline

#2 2015-02-03 11:28:54

tjbp
Member
Registered: 2010-11-06
Posts: 41

Re: Frequent disconnections with Broadcom wifi BCM43142

Do you have the same issue with the b43 driver? I have a BCM4331 and have had a similar issue (signal strength jumps to max and all packets are dropped or very slow) that happens with b43 as much as it does with wl.

Offline

#3 2015-02-03 11:41:44

debanshuk
Member
From: India
Registered: 2014-04-30
Posts: 4

Re: Frequent disconnections with Broadcom wifi BCM43142

b43 driver doesn't support BCM43142, as also stated here http://linuxwireless.org/en/users/Drive … ed_devices.

Offline

#4 2015-02-03 11:47:56

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

debanshuk, I have same issues with the same card

lspci -vnn | grep 14e4:
07:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)

It is almost impossible to use wifi. Most of the time it won't connect (stays at configuring interface for a while and then fails and closes connection) and even wgen it connects (1 every 10 failed attempts) I have very low speed and disconnections.

With kernel 3.17 I had similar problems but I found out that driver version 6.30.223.141 works with no problem, so I was using a version of 6.30.223.141 patched for 3.17.
For now I don't now if there is any patch available for 6.30.223.141 and 3.18.

Offline

#5 2015-02-03 11:47:59

tjbp
Member
Registered: 2010-11-06
Posts: 41

Re: Frequent disconnections with Broadcom wifi BCM43142

debanshuk wrote:

b43 driver doesn't support BCM43142, as also stated here http://linuxwireless.org/en/users/Drive … ed_devices.

Ah, fair do's.

Last edited by tjbp (2015-02-03 11:48:18)

Offline

#6 2015-02-03 22:17:42

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 504

Re: Frequent disconnections with Broadcom wifi BCM43142

I just happened to be on the road this week so I had to use my 43142 card a lot. I have no real hard evidence or root cause analysis to provide, but for some reason just having Chromium open results in extreme slowness happening pretty much every couple of minutes. However, I've been running Firefox all day now without any issues. I was actually thinking there's a DNS issue cropping up with Chromium, but I guess it could be related to the Wifi card...?

Anyway, for what it's worth: try running just Firefox and no Chromium and either debunk this myth, or maybe we are on to something?

edit: not disconnects, but extreme slowness

Last edited by twelveeighty (2015-02-03 22:20:43)

Offline

#7 2015-02-03 22:24:24

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

I am using ff, I don't have chromium installed but I have the problems mentioned above.

Something else I noticed it that lspci gived me this:

07:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)

but dmesg gives

[    5.324254] eth0: Broadcom BCM4365 802.11 Hybrid Wireless Controller 6.30.223.141 (r415941)

(I rolled back to previous kernel and driver)

Offline

#8 2015-02-04 09:43:39

Yochai
Member
Registered: 2010-10-20
Posts: 33

Re: Frequent disconnections with Broadcom wifi BCM43142

Same issues here with BCM43142. Slowness, constant disconnects, I find that I have to rmmod and modprobe after every disconnection.

Using 3.17 with 6.30.223.141 works, it's an issue with the newer versions of this shity driver.

Offline

#9 2015-02-04 11:37:24

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

It seems that Manjaro linux uses a patch for linux 3.18 and 6.30.223.141

https://github.com/manjaro/packages-ext … roadcom-wl

Maybe we can use this patch to build previous driver with latest kernel.

Offline

#10 2015-02-05 12:32:19

Robr3rd
Member
Registered: 2014-10-19
Posts: 3

Re: Frequent disconnections with Broadcom wifi BCM43142

Just adding my experiences to this. Since the update mentioned by Yochai I have had connectivity problems.

Interestingly, it's only with 1 of the 4 networks I use every day. My mobile hotspot is fine, my home router (both the ac-band and the n-band) is also fine, but my wireless at work would infinitely disconnect/reconnect. It actually worked for about 3 seconds at each connection, but it never lasted. Since upating my system a few days ago it will now remain connected for about 5 minutes before it drops and reconnects (which is much better).

I've noticed no patterns (like Chromium or FF being worse than the other) in what makes this worse or better.

My chipset is 14e4:43b1.
My card is: "03:00.0 Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)"
My ethernet is: "[    3.152602] alx 0000:04:00.0 eth0: Qualcomm Atheros AR816x/AR817x Ethernet" (which works fine, of course).
My laptop is Asus ROG G750JM

Kernel version 3.18.5-1-ARCH

Offline

#11 2015-02-05 12:34:53

Robr3rd
Member
Registered: 2014-10-19
Posts: 3

Re: Frequent disconnections with Broadcom wifi BCM43142

debanshuk wrote:

I have the latest kernel (3.18.4) and have installed the 'wl' kernel module from broadcom-wl-dkms pakage (https://aur.archlinux.org/packages/broadcom-wl-dkms). According to the comments on the package's page they have fixed some issues with the broadcom-wl driver recently. But I am still facing frequent disconnections and slow speed issue with BCM43142 (PCI-ID: 14e4:4365) wifi card (on Lenovo B590). Is anyone else facing similar issue(s) and/or have a solution?

I can confirm that the broadcom-wl driver was fixed, however I had issues loading the module (possibly due to user error somehow, but maybe not). I always had to run "sudo depmod -a" on bootup so that when I restarted the module would be loaded. If I forgot to run the command, then on next bootup I had no wireless.

Installing the *-dkms packet resolved this for me, though, and I was able to successfully modprobe the driver and since then it's worked consistently through muliple restarts.

EDIT: I should mention that I had this issue even before the update that we're all discussing here. Even when it worked perfectly I still had to do this, so it may be unrelated. Just sharing my experiences for others who might benefit.

Last edited by Robr3rd (2015-02-05 12:36:47)

Offline

#12 2015-02-06 09:47:05

debanshuk
Member
From: India
Registered: 2014-04-30
Posts: 4

Re: Frequent disconnections with Broadcom wifi BCM43142

matersci wrote:

debanshuk, I have same issues with the same card

lspci -vnn | grep 14e4:
07:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)

It is almost impossible to use wifi. Most of the time it won't connect (stays at configuring interface for a while and then fails and closes connection) and even wgen it connects (1 every 10 failed attempts) I have very low speed and disconnections.

With kernel 3.17 I had similar problems but I found out that driver version 6.30.223.141 works with no problem, so I was using a version of 6.30.223.141 patched for 3.17.
For now I don't now if there is any patch available for 6.30.223.141 and 3.18.

matersci wrote:

It seems that Manjaro linux uses a patch for linux 3.18 and 6.30.223.141

https://github.com/manjaro/packages-ext … roadcom-wl

Maybe we can use this patch to build previous driver with latest kernel.


I rolled back to kernel 3.17 and installed the version 6.30.223.141 patched driver from https://wiki.archlinux.org/index.php/un … rchlinuxgr and it's working for me now. I also tried the same patched driver with 3.18 but it doesn't work.

I guess we can try to build a driver with the patch you shared, though I have zero experience in building packages for pacman.

Offline

#13 2015-02-25 01:07:06

Poprocks
Member
Registered: 2004-12-08
Posts: 26

Re: Frequent disconnections with Broadcom wifi BCM43142

FWIW, I have the same card and I'm using broadcom-wl-dkms 6.30.223.248-5 with the 3.14 LTS kernel and my experience has been much smoother than with 3.17-3.18. I find it takes a bit longer to connect *to* networks, but once I'm connected, it generally works well. Only problem I really have at this point is if I move my laptop to another location without disconnecting & reconnecting from the network, I do at times experience very low speed.

I add this. I don't know if this has anything to do with the wireless driver or if it's just overly zealous DNS autoconfiguration, but when connecting to the router at my mom's place, when using NetworkManager, the 'resolvconf' program would get run and add the entries "domain = home" and "search = home" to my /etc/resolv.conf file. This would cause DNS lookup issues and would cause even locally installed applications like Libreoffice to take FOREVER to launch. Adding "domain_blacklist=home" to my /etc/resolvconf.conf file fixed that issue.

Last edited by Poprocks (2015-02-25 01:12:59)


I take my Poprocks with Diet Pepsi

Offline

#14 2015-02-26 14:37:02

kuadhual
Member
Registered: 2009-06-24
Posts: 13

Re: Frequent disconnections with Broadcom wifi BCM43142

I tried to add the patch from https://github.com/manjaro/packages-ext … roadcom-wl to broadcom-wl-dkms 6.30.223.141. So far it's working better than 248 on my Lenovo Z410, but I'm not sure if this will work on other laptop.

linux-recent.patch

diff -rupN a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
--- a/src/wl/sys/wl_cfg80211_hybrid.c	2013-08-01 13:52:22.000000000 +0700
+++ b/src/wl/sys/wl_cfg80211_hybrid.c	2015-02-26 21:12:46.550484424 +0700
@@ -1780,9 +1780,15 @@ static s32 wl_inform_single_bss(struct w
 
 	notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
 	notify_ielen = le32_to_cpu(bi->ie_length);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
 	cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
 		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
 		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+#else
+	cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
+		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+#endif
 
 	if (unlikely(!cbss))
 		return -ENOMEM;
@@ -1841,7 +1847,11 @@ wl_notify_connect_status(struct wl_cfg80
 			wl_get_assoc_ies(wl);
 			memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
 			wl_update_bss_info(wl);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, &wl->conf->channel, GFP_KERNEL);
+#else
 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
+#endif
 			set_bit(WL_STATUS_CONNECTED, &wl->status);
 			wl->profile->active = true;
 		}
diff -rupN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
--- a/src/wl/sys/wl_linux.c	2013-08-01 13:52:22.000000000 +0700
+++ b/src/wl/sys/wl_linux.c	2015-02-26 21:09:11.858314178 +0700
@@ -1345,7 +1345,12 @@ wl_alloc_linux_if(wl_if_t *wlif)
 	dev->priv = priv_link;
 #else
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
 	dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
+#else
+	dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
+			   ether_setup);
+#endif
 	if (!dev) {
 		WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
 			(wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
@@ -3236,7 +3241,12 @@ void
 wl_tkip_printstats(wl_info_t *wl, bool group_key)
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+	struct seq_file sfile;
+	struct seq_file *debug_buf = &sfile;	
+#else
 	char debug_buf[512];
+#endif
 	int idx;
 	if (wl->tkipmodops) {
 		if (group_key) {
@@ -3249,7 +3259,11 @@ wl_tkip_printstats(wl_info_t *wl, bool g
 			wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
 		else
 			return;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+		printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
+#else
 		printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
+#endif
 	}
 #endif 
 }
@@ -3408,11 +3422,19 @@ wl_linux_watchdog(void *ctx)
 	return 0;
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
 {
 	wl_info_t * wl = (wl_info_t *)data;
+#else
+static int
+wl_proc_read(struct seq_file *seq, void *offset)
+{
+	wl_info_t * wl = (wl_info_t *)seq->private;
+#endif
 	int bcmerror, to_user;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	int len;
 
 	if (offset > 0) {
@@ -3424,17 +3446,33 @@ wl_proc_read(char *buffer, char **start,
 		WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
 		return 0;
 	}
+#endif
 	WL_LOCK(wl);
 	bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	len = sprintf(buffer, "%d\n", to_user);
+#endif
 	WL_UNLOCK(wl);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	return len;
+#else
+	seq_printf(seq, "%d\n", to_user);
+	return bcmerror;
+#endif
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
 {
 	wl_info_t * wl = (wl_info_t *)data;
+#else
+static ssize_t 
+wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *ppos)
+{
+	struct seq_file *seq = filp->private_data;
+	wl_info_t * wl = (wl_info_t *)seq->private;
+#endif
 	int from_user = 0;
 	int bcmerror;
 
@@ -3445,7 +3483,11 @@ wl_proc_write(struct file *filp, const c
 	}
 	if (copy_from_user(&from_user, buff, 1)) {
 		WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 		return -EIO;
+#else
+		return -EFAULT;
+#endif
 	}
 
 	if (from_user >= 0x30)
@@ -3459,22 +3501,48 @@ wl_proc_write(struct file *filp, const c
 		WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
 		return -EIO;
 	}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+	*ppos += length;
+#endif
 	return length;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+static int wl_proc_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, wl_proc_read, PDE_DATA(inode));
+}
+
+static const struct file_operations wl_fops = {
+	.owner = THIS_MODULE,
+	.open = wl_proc_open,
+	.read = seq_read,
+	.write = wl_proc_write,
+	.llseek = seq_lseek,
+	.release = single_release,
+};
+#endif
+
 static int
 wl_reg_proc_entry(wl_info_t *wl)
 {
 	char tmp[32];
 	sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
 		WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
+#else
+	if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
+		WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp));
+#endif
 		ASSERT(0);
 		return -1;
 	}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	wl->proc_entry->read_proc = wl_proc_read;
 	wl->proc_entry->write_proc = wl_proc_write;
 	wl->proc_entry->data = wl;
+#endif
 	return 0;
 }
 #ifdef WLOFFLD

PKGBUILD

# Maintainer: Frank Vanderham <twelve.eighty (at) gmail.>
pkgname=broadcom-wl-dkms
_pkgname=broadcom-wl
pkgver=6.30.223.141
pkgrel=8
pkgdesc="Broadcom 802.11 Linux STA wireless driver"
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('i686' 'x86_64')
license=('custom')
depends=('dkms')
optdepends=('linux-headers')
install=broadcom-wl-dkms.install
conflicts=('wireless-bcm43142-oneiric-dkms' 'wireless-bcm43142-dkms' 'broadcom-wl6-dkms' 'broadcom-wl')
[[ $CARCH = x86_64 ]] && _arch=_64 || _arch=
source=("http://www.broadcom.com/docs/linux_sta/hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz"
	'broadcom-wl-dkms.conf'
	'dkms.conf'
	'license.patch'
	'linux-recent.patch'
	'gcc.patch')
sha1sums=('2917d785ffd9663b1d23cfa388b9bd7c9f03cc3b'
	'a37c5dd9ab279372f0c68595bb2a8f1fe694cd13'
	'91926bb064c00a00dbcab0d1d92c7eb976d56032'
	'81c05d48b234d56ad2e18eaee5ce89b79550ef20'
	'398e03e240d85fd87ab95475ec6a088ed5943a09'
	'a23e0d52e0a20b5155fa8a418af79b3f7d191fa1')
[[ $CARCH = x86_64 ]] && sha1sums[0]='3a2453c71a07030f41a8fc613c87badf8452848c'

backup=('etc/modprobe.d/broadcom-wl-dkms.conf')

build() {
	cd "${srcdir}"

	patch -p1 -i linux-recent.patch
	patch -p1 -i license.patch
	patch -p1 -i gcc.patch

	# delete files not needed for packaging
	rm hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz
}

package() {
	cd "${srcdir}"
	
	mkdir -p ${pkgdir}/usr/src/${_pkgname}-${pkgver}

	cp -RL * ${pkgdir}/usr/src/${_pkgname}-${pkgver}
	install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -D -m 644 broadcom-wl-dkms.conf "${pkgdir}"/etc/modprobe.d/broadcom-wl-dkms.conf
}

Can someone with BCM43142 test this on their laptop?

edit: I'm on 3.18.6

Last edited by kuadhual (2015-02-26 14:38:31)

Offline

#15 2015-02-28 18:19:04

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

I just tested latest kernel with 6.30.223.141 and kuadhual patch. For now everything seems to work

Offline

#16 2015-03-22 10:31:34

niglum
Member
Registered: 2015-02-18
Posts: 2

Re: Frequent disconnections with Broadcom wifi BCM43142

Where can I download 6.30.223.141 sources to patch it?

Offline

#17 2015-03-22 10:43:52

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

niglum wrote:

Where can I download 6.30.223.141 sources to patch it?

I don't know about the sources, but you can find a ready patched  x86_64 package here:
https://wiki.archlinux.org/index.php/Un … rchlinuxgr

Offline

#18 2015-03-22 13:33:05

Reik
Member
Registered: 2015-03-22
Posts: 4

Re: Frequent disconnections with Broadcom wifi BCM43142

Offline

#19 2015-03-28 20:33:07

niglum
Member
Registered: 2015-02-18
Posts: 2

Re: Frequent disconnections with Broadcom wifi BCM43142

matersci wrote:
niglum wrote:

Where can I download 6.30.223.141 sources to patch it?

I don't know about the sources, but you can find a ready patched  x86_64 package here:
https://wiki.archlinux.org/index.php/Un … rchlinuxgr

thanks, works perfectly!!

Offline

#20 2015-04-29 14:34:54

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

Anyone tried 6.30.223.141 or the above patch with kernel 4.0? It's in extra now

Offline

#21 2015-04-29 18:09:28

grafzakenbarsch
Member
Registered: 2015-03-06
Posts: 4

Re: Frequent disconnections with Broadcom wifi BCM43142

yes, tried it today and I am very disappointed that it does not work. Now the connection is very unstable. It was very stable before with the patched version 6.30.223.141.

It says:

Building module:
cleaning build area....
make KERNELRELEASE=4.0.1-1-ARCH -C /usr/lib/modules/4.0.1-1-ARCH/build M=/var/lib/dkms/broadcom-wl/6.30.223.141/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.0.1-1-ARCH (x86_64)
Consult /var/lib/dkms/broadcom-wl/6.30.223.141/build/make.log for more information.

and

$ tail /var/lib/dkms/broadcom-wl/6.30.223.141/build/make.log
/var/lib/dkms/broadcom-wl/6.30.223.141/build/src/wl/sys/wl_cfg80211_hybrid.c: At top level:
/var/lib/dkms/broadcom-wl/6.30.223.141/build/src/wl/sys/wl_cfg80211_hybrid.c:1593:2: warning: initialization from incompatible pointer type
  .get_station = wl_cfg80211_get_station,
  ^
/var/lib/dkms/broadcom-wl/6.30.223.141/build/src/wl/sys/wl_cfg80211_hybrid.c:1593:2: warning: (near initialization for 'wl_cfg80211_ops.get_station')
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/broadcom-wl/6.30.223.141/build/src/wl/sys/wl_cfg80211_hybrid.o' failed
make[1]: *** [/var/lib/dkms/broadcom-wl/6.30.223.141/build/src/wl/sys/wl_cfg80211_hybrid.o] Error 1
Makefile:1390: die Regel für Ziel „_module_/var/lib/dkms/broadcom-wl/6.30.223.141/build“ scheiterte
make: *** [_module_/var/lib/dkms/broadcom-wl/6.30.223.141/build] Fehler 2
make: Verzeichnis „/usr/lib/modules/4.0.1-1-ARCH/build“ wird verlassen

Offline

#22 2015-04-30 03:55:31

kuadhual
Member
Registered: 2009-06-24
Posts: 13

Re: Frequent disconnections with Broadcom wifi BCM43142

I'm not sure if this is the correct patch, but for now at least I can use this to connect to my wifi.

linux-recent.patch

diff -rupN a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
--- a/src/wl/sys/wl_cfg80211_hybrid.c	2013-08-01 13:52:22.000000000 +0700
+++ b/src/wl/sys/wl_cfg80211_hybrid.c	2015-04-30 10:23:42.858440372 +0700
@@ -59,8 +59,13 @@ static s32 wl_cfg80211_set_wiphy_params(
 static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
            struct cfg80211_ibss_params *params);
 static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
 static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
            struct net_device *dev, u8 *mac, struct station_info *sinfo);
+#else
+static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
+           struct net_device *dev, const u8 *mac, struct station_info *sinfo);
+#endif
 static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
            struct net_device *dev, bool enabled, s32 timeout);
 static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
@@ -1380,7 +1385,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy,
 	key_endian_to_host(&key);
 
 	params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
-	memcpy(params.key, key.data, params.key_len);
+	memcpy((char *)params.key, key.data, params.key_len);
 
 	if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) {
 		return err;
@@ -1414,9 +1419,15 @@ wl_cfg80211_get_key(struct wiphy *wiphy,
 	return err;
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
 static s32
 wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
                         u8 *mac, struct station_info *sinfo)
+#else
+static s32
+wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+                        const u8 *mac, struct station_info *sinfo)
+#endif
 {
 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
 	scb_val_t scb_val;
@@ -1434,7 +1445,11 @@ wl_cfg80211_get_station(struct wiphy *wi
 		WL_DBG(("Could not get rate (%d)\n", err));
 	} else {
 		rate = dtoh32(rate);
+		#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+		sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+		#else
 		sinfo->filled |= STATION_INFO_TX_BITRATE;
+		#endif
 		sinfo->txrate.legacy = rate * 5;
 		WL_DBG(("Rate %d Mbps\n", (rate / 2)));
 	}
@@ -1447,7 +1462,11 @@ wl_cfg80211_get_station(struct wiphy *wi
 			return err;
 		}
 		rssi = dtoh32(scb_val.val);
+		#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+		sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+		#else
 		sinfo->filled |= STATION_INFO_SIGNAL;
+		#endif
 		sinfo->signal = rssi;
 		WL_DBG(("RSSI %d dBm\n", rssi));
 	}
@@ -1780,9 +1799,15 @@ static s32 wl_inform_single_bss(struct w
 
 	notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
 	notify_ielen = le32_to_cpu(bi->ie_length);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
 	cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
 		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
 		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+#else
+	cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
+		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+#endif
 
 	if (unlikely(!cbss))
 		return -ENOMEM;
@@ -1841,7 +1866,11 @@ wl_notify_connect_status(struct wl_cfg80
 			wl_get_assoc_ies(wl);
 			memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
 			wl_update_bss_info(wl);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, &wl->conf->channel, GFP_KERNEL);
+#else
 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
+#endif
 			set_bit(WL_STATUS_CONNECTED, &wl->status);
 			wl->profile->active = true;
 		}
@@ -2395,8 +2424,16 @@ cfg80211_attach_out:
 
 void wl_cfg80211_detach(struct net_device *ndev)
 {
-	struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
-
+	struct wl_cfg80211_priv *wl;
+	struct wireless_dev *wdev;
+	
+	wdev = ndev->ieee80211_ptr;
+	if (wdev == NULL) {
+                printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev);
+                return;
+        }
+	wl = ndev_to_wl(ndev);
+    
 	wl_deinit_cfg80211_priv(wl);
 	wl_free_wdev(wl);
 }
diff -rupN a/src/wl/sys/wl_dbg.h b/src/wl/sys/wl_dbg.h
--- a/src/wl/sys/wl_dbg.h	2013-08-01 13:52:22.000000000 +0700
+++ b/src/wl/sys/wl_dbg.h	2015-04-30 10:28:50.553440112 +0700
@@ -55,10 +55,12 @@ extern int osl_printf(const char *fmt, .
 
 #define WL_NONE(args)
 
+#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */
+
 #ifdef BCMDBG_ERR
 #define	WL_ERROR(args)		WL_PRINT(args)
 #else
-#define	WL_ERROR(args)
+#define	WL_ERROR(args)		FORCE_TRACE_LEVEL args
 #endif 
 #define	WL_TRACE(args)
 #define WL_APSTA_UPDN(args)
diff -rupN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
--- a/src/wl/sys/wl_linux.c	2013-08-01 13:52:22.000000000 +0700
+++ b/src/wl/sys/wl_linux.c	2015-02-26 21:09:11.858314178 +0700
@@ -1345,7 +1345,12 @@ wl_alloc_linux_if(wl_if_t *wlif)
 	dev->priv = priv_link;
 #else
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
 	dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
+#else
+	dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
+			   ether_setup);
+#endif
 	if (!dev) {
 		WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
 			(wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
@@ -3236,7 +3241,12 @@ void
 wl_tkip_printstats(wl_info_t *wl, bool group_key)
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+	struct seq_file sfile;
+	struct seq_file *debug_buf = &sfile;	
+#else
 	char debug_buf[512];
+#endif
 	int idx;
 	if (wl->tkipmodops) {
 		if (group_key) {
@@ -3249,7 +3259,11 @@ wl_tkip_printstats(wl_info_t *wl, bool g
 			wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
 		else
 			return;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+		printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
+#else
 		printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
+#endif
 	}
 #endif 
 }
@@ -3408,11 +3422,19 @@ wl_linux_watchdog(void *ctx)
 	return 0;
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
 {
 	wl_info_t * wl = (wl_info_t *)data;
+#else
+static int
+wl_proc_read(struct seq_file *seq, void *offset)
+{
+	wl_info_t * wl = (wl_info_t *)seq->private;
+#endif
 	int bcmerror, to_user;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	int len;
 
 	if (offset > 0) {
@@ -3424,17 +3446,33 @@ wl_proc_read(char *buffer, char **start,
 		WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
 		return 0;
 	}
+#endif
 	WL_LOCK(wl);
 	bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	len = sprintf(buffer, "%d\n", to_user);
+#endif
 	WL_UNLOCK(wl);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	return len;
+#else
+	seq_printf(seq, "%d\n", to_user);
+	return bcmerror;
+#endif
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
 {
 	wl_info_t * wl = (wl_info_t *)data;
+#else
+static ssize_t 
+wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *ppos)
+{
+	struct seq_file *seq = filp->private_data;
+	wl_info_t * wl = (wl_info_t *)seq->private;
+#endif
 	int from_user = 0;
 	int bcmerror;
 
@@ -3445,7 +3483,11 @@ wl_proc_write(struct file *filp, const c
 	}
 	if (copy_from_user(&from_user, buff, 1)) {
 		WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 		return -EIO;
+#else
+		return -EFAULT;
+#endif
 	}
 
 	if (from_user >= 0x30)
@@ -3459,22 +3501,48 @@ wl_proc_write(struct file *filp, const c
 		WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
 		return -EIO;
 	}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+	*ppos += length;
+#endif
 	return length;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+static int wl_proc_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, wl_proc_read, PDE_DATA(inode));
+}
+
+static const struct file_operations wl_fops = {
+	.owner = THIS_MODULE,
+	.open = wl_proc_open,
+	.read = seq_read,
+	.write = wl_proc_write,
+	.llseek = seq_lseek,
+	.release = single_release,
+};
+#endif
+
 static int
 wl_reg_proc_entry(wl_info_t *wl)
 {
 	char tmp[32];
 	sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
 		WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
+#else
+	if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
+		WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp));
+#endif
 		ASSERT(0);
 		return -1;
 	}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	wl->proc_entry->read_proc = wl_proc_read;
 	wl->proc_entry->write_proc = wl_proc_write;
 	wl->proc_entry->data = wl;
+#endif
 	return 0;
 }
 #ifdef WLOFFLD

PKGBUILD

# Maintainer: Frank Vanderham <twelve.eighty (at) gmail.>
pkgname=broadcom-wl-dkms
_pkgname=broadcom-wl
pkgver=6.30.223.141
pkgrel=9
pkgdesc="Broadcom 802.11 Linux STA wireless driver"
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('i686' 'x86_64')
license=('custom')
depends=('dkms')
optdepends=('linux-headers')
install=broadcom-wl-dkms.install
conflicts=('wireless-bcm43142-oneiric-dkms' 'wireless-bcm43142-dkms' 'broadcom-wl6-dkms' 'broadcom-wl')
[[ $CARCH = x86_64 ]] && _arch=_64 || _arch=
source=("http://www.broadcom.com/docs/linux_sta/hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz"
	'broadcom-wl-dkms.conf'
	'dkms.conf'
	'license.patch'
	'linux-recent.patch'
	'gcc.patch')
sha1sums=('2917d785ffd9663b1d23cfa388b9bd7c9f03cc3b'
	'a37c5dd9ab279372f0c68595bb2a8f1fe694cd13'
	'91926bb064c00a00dbcab0d1d92c7eb976d56032'
	'81c05d48b234d56ad2e18eaee5ce89b79550ef20'
	'a9d4f88a76f5a391f7cd398f630fbf95e6f571ef'
	'a23e0d52e0a20b5155fa8a418af79b3f7d191fa1')
[[ $CARCH = x86_64 ]] && sha1sums[0]='3a2453c71a07030f41a8fc613c87badf8452848c'

backup=('etc/modprobe.d/broadcom-wl-dkms.conf')

build() {
	cd "${srcdir}"

	patch -p1 -i linux-recent.patch
	patch -p1 -i license.patch
	patch -p1 -i gcc.patch

	# delete files not needed for packaging
	rm hybrid-v35${_arch}-nodebug-pcoem-${pkgver//./_}.tar.gz
}

package() {
	cd "${srcdir}"
	
	mkdir -p ${pkgdir}/usr/src/${_pkgname}-${pkgver}

	cp -RL * ${pkgdir}/usr/src/${_pkgname}-${pkgver}
	install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -D -m 644 broadcom-wl-dkms.conf "${pkgdir}"/etc/modprobe.d/broadcom-wl-dkms.conf
}

Offline

#23 2015-04-30 05:36:22

sladyshim
Member
Registered: 2015-04-17
Posts: 10

Re: Frequent disconnections with Broadcom wifi BCM43142

Here's a pre-compiled package with kuadhual's patch, seems to work fine on my system.

https://mega.co.nz/#!60kjXRgC!h0_awcz6_ … nOZ37IVSAU

However, I'd appreciate if kuadhual could post his own package. I've never done this before so I fear I may have screwed up somewhere and maybe it's a matter of time until something goes wrong.

Last edited by sladyshim (2015-04-30 05:53:11)

Offline

#24 2015-04-30 11:45:20

matersci
Member
From: Hellas
Registered: 2006-01-19
Posts: 167

Re: Frequent disconnections with Broadcom wifi BCM43142

I also tries kuadhual patch and for now it seems it works with no problem

Again, for anyone interested, a x64 package can be found at

https://wiki.archlinux.org/index.php/Un … rchlinuxgr

Offline

#25 2015-05-02 07:39:16

grafzakenbarsch
Member
Registered: 2015-03-06
Posts: 4

Re: Frequent disconnections with Broadcom wifi BCM43142

big thank you to kuadhual, the new version installs fine and works flawlessly until now!

Offline

Board footer

Powered by FluxBB