# Wifi issues / Broadcom brcmsmac driver / kernel 3.6.2

## momesana

For about a year I've been trying to get the brcmsmac wifi driver to work on my notebook - to no avail. I've always had to go back to the prioprietary broadcom-sta driver, which - apart from flooding my logs with error messages - worked quite reliably.

Unfortunately the broadcom-sta driver causes the kernel to crash on the 3.6.x kernel versions so again I tried to get the brcmsmac driver to work - ending up having the same issues I did in my previous attempts:

The network connection is so extremely flaky that it becomes unusable. So I wanted to know if anybody else has had similar issues with the mentioned opensource driver and possibly knows a workaround for it.

Thanks in advance

P.S. some Info:

======================

Notebook Brand/Model

======================

HP Pavilion DV6-6109

======================

Wifi Device Info

======================

Chip: 

Name: BCM4313

PCI Device ID: 0x4727

lspci:

0d:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)

lspci -n

0d:00.0 0280: 14e4:4727 (rev 01)

======================

Kernel Config

======================

complete kernel configuration: http://pastebin.com/sK5Pr7MQ

The kernel configuration looks as follows:

[*] Networking support --->

    Wireless --->

        Wireless

	<M> cfg80211 - wireless configuration API

	[*] cfg80211 wireless extensions compatibility

	<M> Generic IEEE 802.11 Networking Stack (mac80211)

	Default rate control algorithm (Minstrel) --->

	[*] Enable LED triggers

	[*] Select mac80211 debugging features --->

	    [*] verbose debugging output

Device Drivers

    [*] Network device support --->

	[*] Wireless LAN --->

	    <M> Broadcom IEEE802.11n PCIe SoftMAC WLAN driver

	    [*] Broadcom driver debug functions

    Broadcom Specific AMBA --->

	<M> BCMA support

	[*] support for BCMA on PCI-host bus

	[*] BCMA Broadcom GBIT MAC COMMON core driver

======================

Kernel Log

======================

The driver spits out the following log messages in a regular interval:

...

Oct 14 19:30:28 [kernel] [  723.176924] ieee80211 phy0: brcms_ops_config: change monitor mode: false

Oct 14 19:30:28 [kernel] [  723.176925] ieee80211 phy0: brcms_ops_config: change power-save mode: false (implement)

Oct 14 19:30:28 [kernel] [  723.177040] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed: disassociated

Oct 14 19:30:28 [kernel] [  723.177042] ieee80211 phy0: changing basic rates failed: -52

Oct 14 19:30:28 [kernel] [  723.177043] ieee80211 phy0: brcms_ops_bss_info_changed: cqm change: threshold 0, hys 0  (implement)

Oct 14 19:30:28 [kernel] [  723.177044] ieee80211 phy0: brcms_ops_bss_info_changed: arp filtering: enabled false, count 0 (implement)

Oct 14 19:30:28 [kernel] [  723.177045] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled: false (implement)

Oct 14 19:31:38 [kernel] [    8.964706] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'

...

If you need more information, let me know.

----------

## mir3x

1st) I dont have that broadcom, but I have 3 different wifi cards, and you didnt write what's the problem with your connection ( fail to associate, authenticate or drops connection )

2nd ) with newest firmware (linux-firmware-20120909) ALL my wifi cars have problems with authentication, sometimes it work, mostly not -> works fine for me linux-firmware-20120502

3rd) you can try manually lower connection rate via eg. iwconfig wlanX rate 5.5M ( doubt if it help )

4th) try windows drivers via ndiswrapper -> this may be best solution

5th) maybe you dont need 3.6 at all  :Very Happy:  revert kernel and just wait for proprietary drivers, you can also check some live distro with 3.6 kernel and see if it works there

6th) try disabling encryption or change to WEP ( crackable in 10 mins  :Very Happy:  ) - but some cards wotks then much better

----------

## momesana

 *mir3x wrote:*   

> 1st) I dont have that broadcom, but I have 3 different wifi cards, and you didnt write what's the problem with your connection ( fail to associate, authenticate or drops connection )
> 
> 2nd ) with newest firmware (linux-firmware-20120909) ALL my wifi cars have problems with authentication, sometimes it work, mostly not -> works fine for me linux-firmware-20120502
> 
> 3rd) you can try manually lower connection rate via eg. iwconfig wlanX rate 5.5M ( doubt if it help )
> ...

 

Hi and thanks for your answer,

1) I also have different notebooks / tabs with wifi cards. This problem is of course solely related to the device in question. The connection can be established, but then the packets somewhat get lost after a few second so it is not possible to watch a youtube video etc. It is however not so that the device is deassociated from the AP. It's just that packets don't seem to reach their destination. That's why I pasted the log entries. 

2) I am using the newest stable firmware (linux-firmware-20120719). Even tried the latest fw from the git repp of the project but with the same issues. I've had the same problems about a year ago so the issue isn't related to the firmware. Besides the same firmware is used for the proprietary driver and there it works flawlessly.

3) Well, I may try that but it rather sounds like a desperate measure.

4) I would rather prefer to use the older (3.5.x) kernel versions than doing that.

5) I am right now using 3.5 so yes, that issue isn't really pressing. But the prioprietary drivers have their own (small) issues and in the long term I would prefer the opensource drivers. I assume that there must be a workaround for the issue I am having.

6) I have experience in hacking WEP APs myself using aircrack-ng. Switching to WEP is not an option and a (very bad) suggestion to make.

Regards - momesana

----------

## keenblade

 *momesana wrote:*   

> For about a year I've been trying to get the brcmsmac wifi driver to work on my notebook - to no avail. I've always had to go back to the prioprietary broadcom-sta driver, which - apart from flooding my logs with error messages - worked quite reliably.
> 
> Unfortunately the broadcom-sta driver causes the kernel to crash on the 3.6.x kernel versions so again I tried to get the brcmsmac driver to work - ending up having the same issues I did in my previous attempts:
> 
> The network connection is so extremely flaky that it becomes unusable. So I wanted to know if anybody else has had similar issues with the mentioned opensource driver and possibly knows a workaround for it.
> ...

 

Hi, momesana. I have exactly the same BCM4313 wifi device in my dell n3010 laptop. I use the opensource brcmsmac driver since kernel-2.6.38 to 3.7.0-rc1. It is working very good here for a long time. For firmware, I don't use sys-kernel/linux-firmware. Instead I use net-wireless/brcm-firmware that I created.

If you want, I can post my full kernel config and live ebuild for firmware.

My kernel config for opensource brcmsmac driver:

```

[*] Networking support --->

--- Wireless

<M>   cfg80211 - wireless configuration API

[*]     cfg80211 wireless extensions compatibility

<*>   Common routines for IEEE802.11 drivers

[*]   lib80211 debugging messages

<M>   Generic IEEE 802.11 Networking Stack (mac80211)

      Default rate control algorithm (Minstrel)  --->

[*]   Enable mac80211 mesh networking (pre-802.11s) support

[*]   Enable LED triggers

[*]   Export mac80211 internals in DebugFS

Device Drivers  --->

--- Network device support

--- Wireless LAN

<M>   Broadcom IEEE802.11n PCIe SoftMAC WLAN driver

```

----------

## momesana

 *keenblade wrote:*   

> 
> 
> Hi, momesana. I have exactly the same BCM4313 wifi device in my dell n3010 laptop. I use the opensource brcmsmac driver since kernel-2.6.38 to 3.7.0-rc1. It is working very good here for a long time. For firmware, I don't use sys-kernel/linux-firmware. Instead I use net-wireless/brcm-firmware that I created.
> 
> If you want, I can post my full kernel config and live ebuild for firmware.
> ...

 

Hi Keenblade,

I would be greatful for both, the kernel config and the custom ebuild.

Thanks in advance - momesana

----------

## keenblade

 *momesana wrote:*   

> 
> 
> I would be greatful for both, the kernel config and the custom ebuild.
> 
> 

 

Here is x86_64 3.6.0-rc6 Kernel Config

This is the net-wireless/brcm-firmware-9999.ebuild

```

# Copyright 1999-2012 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: $

EAPI="4"

inherit git-2

DESCRIPTION="Firmware for open source host brcmsmac and brcmfmac drivers"

HOMEPAGE="http://linuxwireless.org/en/users/Drivers/brcm80211"

EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"

SRC_URI=""

LICENSE="GPL-2"

SLOT="0"

KEYWORDS=""

IUSE=""

RDEPEND="|| ( sys-fs/udev sys-apps/hotplug )"

src_unpack() {

   git-2_src_unpack

}

src_install() {

   insinto /lib/firmware/brcm

# brcmsmac driver

   doins brcm/bcm43xx_hdr-0.fw brcm/bcm43xx-0.fw

# brcmfmac driver

#   doins brcm/bcm4329-fullmac-4.bin brcm/brcm/brcmfmac4329.bin

}

```

Note: Currently I also use 

networkmanager-0.9.6.0

nm-applet-0.9.6.2

kernel-3.7.0-rc1 (I just tried this git kernel and wireless works perfect with it, too.)

----------

## optional95

Dear keenblade,

thank's for the great help  :Very Happy:  . It finally did the trick for me, after quite a while of pain. One thing, which was missing to make it work for me was the following:

For the PCIe SoftMAC WLAN driver (brcmsmac) you need to enable select the BCMA bus driver in the kernel as well:

```
Location: -> Device Drivers

    -> Broadcom specific AMBA

        -> <M> BCMA support

            -> [*] Support for BCMA on PCI-host bus 
```

http://linuxwireless.org/en/users/Drivers/brcm80211#Broadcom_brcmsmac_driver

Only thing that is now still not working is the LED of the wireless switch (which is not really relevant). Has anyone an idea how to get this work?

----------

## emc

Hi,

I have strange bahaviour and I'm almost 100% sure it is my small mistake but I can't solve it. I got up and running Wifi card Broadcom BCM4313 on 3.2.1 gentoo kernel:

# dmesg | grep brcmsmac

```
[   18.339072] brcmsmac 0000:01:00.0: bus 1 slot 0 func 0 irq 7

[   18.339138] brcmsmac 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

[   18.339148] brcmsmac 0000:01:00.0: setting latency timer to 64

[   45.591500] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed: associated
```

# lsmod | grep brcmsmac

```
brcmsmac              524048  0 

cordic                  1017  1 brcmsmac

crc8                    1056  1 brcmsmac

brcmutil                3227  1 brcmsmac
```

Here is full config:

.config-3.2.1

But on pf-sources-3.7.3 I have problem. No entries in dmesg, brcmsmac module is compiled but not loaded automaticly, but even if I load it by hand I can't get wlan networks visible.

.config-3.7.3

# grep -i bcma /usr/src/linux-3.7.3-pf/.config

```
CONFIG_BCMA_POSSIBLE=y

CONFIG_BCMA=m

CONFIG_BCMA_HOST_PCI_POSSIBLE=y

# CONFIG_BCMA_HOST_PCI is not set

# CONFIG_BCMA_DRIVER_GMAC_CMN is not set

# CONFIG_BCMA_DEBUG is not set

# CONFIG_USB_HCD_BCMA is not set
```

# grep -i brcmsmac /usr/src/linux-3.7.3-pf/.config

```
CONFIG_BRCMSMAC=m
```

I thing problem is in .config but from quick look it look ok to me. Any ideas

----------

## emc

my mistake:

```
# grep -i bcma /usr/src/linux/.config

CONFIG_BCMA_POSSIBLE=y

CONFIG_BCMA=m

CONFIG_BCMA_HOST_PCI_POSSIBLE=y

CONFIG_BCMA_HOST_PCI=y

CONFIG_BCMA_DRIVER_GMAC_CMN=y
```

...helped

----------

## 666threesixes666

i have a dv9000 and used firmware cutter and something else....  works great for wep, wpa2-psk, mac whitelisting, & plain open aps....  can snap wep up in 2 minutes with injection tested & working...

i dislike the fact that its using closed sources, if this foss driver can inject ill break the ole laptop trying to put this foss driver on.  im pretty sure its a bcm 4313 (on the desktop with ath5k at the moment)

----------

## WvR

I can use the brcsmac driver (kernel 3.6.11) but only on a freshly started system. After any suspend / resume, the wifi card is unusable. I have switched to a USB wifi card based on a Ralink RT2800 chip. Works perfectly and reliably.

----------

## emc

 *WvR wrote:*   

> I can use the brcsmac driver (kernel 3.6.11) but only on a freshly started system. After any suspend / resume, the wifi card is unusable. I have switched to a USB wifi card based on a Ralink RT2800 chip. Works perfectly and reliably.

 

You add additional wifi card or use Broadcomm card with RaLink driver?

----------

## WvR

 *emc wrote:*   

> You add additional wifi card or use Broadcomm card with RaLink driver?

 

I use a USB WiFi transmitter (I guess it is called a WiFi dongle), which I just connect to one of the USB ports on my laptop. The built-in WiFi card is Broadcom. 

The USB dongle is made by Buffalo (brand), and it uses a Ralink RT2800 chip. So in my kernel I have support for brcmsmac and Ralink RT28xx wireless cards. In NetworkManager (Gnome) I disable the Broadcom card and only use the USB dongle. Works very well.

----------

## chmod000

It worked for me too.

Love You, keenblade!

----------

## Mgiese

 *keenblade wrote:*   

> 
> 
> Hi, momesana. I have exactly the same BCM4313 wifi device in my dell n3010 laptop. I use the opensource brcmsmac driver since kernel-2.6.38 to 3.7.0-rc1. It is working very good here for a long time. For firmware, I don't use sys-kernel/linux-firmware. Instead I use net-wireless/brcm-firmware that I created.
> 
> If you want, I can post my full kernel config and live ebuild for firmware.
> ...

 

unbelievable !!! it works .. i use 3.7.2 with your config. and your ebuild. only thing is that the LED does not work. thanks a LOT !!!! now i have to check at the university if this is working there too...

(i am connected with wpa2 at home, but university always gave me problems with wpa2)

----------

## jimmij

 *optional95 wrote:*   

> 
> 
> Only thing that is now still not working is the LED of the wireless switch

 

 *Mgiese wrote:*   

> only thing is that the LED does not work

 

I have the same issue with LED and it seems that currently there is no way to make it working:

http://wireless.kernel.org/en/users/Drivers/brcm80211

 *Quote:*   

> To be done for softmac driver
> 
> Add support for 
> 
> 40MHz channels 
> ...

 

----------

## codegrinder

I used broadcom-sta for my BCM4313 (14e4:4727), but at some point my notebook (Lenovo E130) lost ability to connect to my Nokia N9 wi-fi hotspot (it worked before only on unencrypted connection). After several attempts to install brcmsmac I managed to make it work properly with my DIR-300 NRU B7 router (I use WPA2-PSK). There are two options:

1. Switch router auth to tkip (this will make the brcmsmac to disable HT/VHT). I also set bandwith to 20MHz instead of 20/40MHz+, but it looks like this is not necessary.

2. Run command:

 iw wlp3s0 set bitrates mcs-2.4 0 1 2 3 4 (wlp3s0 is name of wireless interface on my computer).

First method gives much better seeking time when watching youtube videos via smplayer2. Looks like brcmsmac is trying to increase connection rate when smplayer2 is caching video in memory and at some point goes over hardware limit of wi-fi card. Problems occur when it is over 54MBit/s.

Now I have excellent working connection with router and encrypted connection with phone. I also have a question: is there a way to disable HT/VHT with some command?

UPD: In around 6 meter have minor connection problems with disabled HT/VHT. Not too important for me, just for notice.

UPD2: Method 2 (AES + iw) gives much more stable connection at same distance.

----------

