OpenWrt Forum Archive

Topic: brcmsmac slow + no 802.11n?

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello everyone!  I've been working on an issue I've been having with my Linksys E2000 802.11n router.  For reference, the router includes the BCM4717 rev 2 (MIPS 74Kc) SoC as reported by the OpenWRT wiki.  While trying to enable 802.11n support I replaced the default b43 driver with the brcmsmac driver by uninstalling the old and installing the new through opkg and rebooting.  While the wireless works I'm noticing slower speeds than before on all of my 802.11g devices (around 2 Mbps, down from around 8-10 Mbps) and still no support for 802.11n.  I'm using the latest snapshot trunk (Chaos Calmer), openwrt-brcm47xx-mips74k-squashfs.trx.  Here are some further details in case it helps:

dmesg is littered with many messages like this (and I haven't been able to figure out what they mean through my Googlefu):

brcmsmac bcma0:0: START: tid 1 is not agg'able
brcmsmac bcma0:0: wl0: brcms_c_d11hdrs_mac80211:  txop exceeded phylen 193/256 dur 2050/1504

uname -r:

3.10.49

lsmod -k:

arc4                    1312  2 
brcmsmac              451569  0 
brcmutil                4407  1 brcmsmac
cfg80211              197863  2 brcmsmac
compat                  1988  3 brcmsmac
cordic                   752  1 brcmsmac
crc8                     794  0 
crc_ccitt               1019  1 ppp_async
crypto_blkcipher       10375  1 arc4
gpio_button_hotplug     4464  0 
ip6_tables              8993  3 ip6table_raw
ip6t_REJECT             2368  2 
ip6table_filter          656  1 
ip6table_mangle         1024  1 
ip6table_raw             576  1 
ip_tables               9165  4 iptable_nat
ipt_MASQUERADE          1136  1 
ipt_REJECT              1776  2 
iptable_filter           720  1 
iptable_mangle           928  1 
iptable_nat             1968  1 
iptable_raw              640  1 
ipv6                  249708 32 ip6t_REJECT
leds_gpio               1616  0 
mac80211              345761  1 brcmsmac
nf_conntrack           46062 13 iptable_nat
nf_conntrack_ftp        5136  1 nf_nat_ftp
nf_conntrack_ipv4       5204 12 
nf_conntrack_ipv6       5584  3 
nf_conntrack_irc        2784  1 nf_nat_irc
nf_defrag_ipv4           790  1 nf_conntrack_ipv4
nf_defrag_ipv6          8727  1 nf_conntrack_ipv6
nf_nat                 10752  7 iptable_nat
nf_nat_ftp              1216  0 
nf_nat_ipv4             2718  1 iptable_nat
nf_nat_irc              1008  0 
ppp_async               6176  0 
ppp_generic            19650  3 pppoe
pppoe                   7744  0 
pppox                   1338  1 pppoe
slhc                    4347  1 ppp_generic
tun                    14559  0 
x_tables               10997 26 ipt_MASQUERADE
xt_CT                   2272  0 
xt_LOG                  9744  0 
xt_REDIRECT             1056  0 
xt_TCPMSS               2704  2 
xt_comment               480 89 
xt_conntrack            2144 14 
xt_id                    480  0 
xt_limit                 992 20 
xt_mac                   608  0 
xt_mark                  672  0 
xt_multiport            1200  0 
xt_nat                  1072  0 
xt_state                 688  0 
xt_tcpudp               1712  8 
xt_time                 1664  0 

iw phy0 info:

Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
        Band 1:
                Capabilities: 0x70
                        HT20
                        Static SM Power Save
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15
                Frequencies:
                        * 2412 MHz [1] (19.0 dBm)
                        * 2417 MHz [2] (19.0 dBm)
                        * 2422 MHz [3] (19.0 dBm)
                        * 2427 MHz [4] (19.0 dBm)
                        * 2432 MHz [5] (19.0 dBm)
                        * 2437 MHz [6] (19.0 dBm)
                        * 2442 MHz [7] (19.0 dBm)
                        * 2447 MHz [8] (19.0 dBm)
                        * 2452 MHz [9] (19.0 dBm)
                        * 2457 MHz [10] (19.0 dBm)
                        * 2462 MHz [11] (19.0 dBm)
                        * 2467 MHz [12] (disabled)
                        * 2472 MHz [13] (disabled)
                        * 2484 MHz [14] (disabled)
        interface combinations are not supported
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing

iwinfo wlan0 info:

wlan0     ESSID: "Explicit"
          Access Point: 98:FC:11:81:8B:A5
          Mode: Master  Channel: 5 (2.432 GHz)
          Tx-Power: 19 dBm  Link Quality: 51/70
          Signal: -59 dBm  Noise: unknown
          Bit Rate: 51.3 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: unknown [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: no  PHY name: phy0

opkg list-installed | grep brcm:

kmod-brcmsmac - 3.10.49+2014-05-22-1
kmod-brcmutil - 3.10.49+2014-05-22-1

cat /etc/config/wireless:

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '5'
        option path 'bcma0:0'
        option hwmode '11ng'
        option country 'US'
        option txpower '19'
        option htmode 'HT20'

config wifi-iface
        option device 'radio0'
        option mode 'ap'
        option encryption 'psk2+ccmp'
        option key '*******'
        option macaddr '98:FC:11:81:8B:A5'
        option network 'explicitcommon'
        option ssid 'Explicit'
        option hidden '1'

Oddly lspci isn't included in my build and I can't find it in any of the opkg repositories in trunk.

Any help is greatly appreciated.  Sorry for such a long post.  Please let me know if any further information would be helpful.  Thanks again!

--Mark

Has anyone been able to get the brcmsmac driver to work properly on a BCM4717 SoC like what's on my Linksys E2000?  I reverted back to the b43 driver and it instantly tripled the 802.11g connection speed, albeit with no support for 802.11n possible since that driver is incapable of 802.11n.  However, the brcmsmac driver didn't provide 802.11n either, as far as I could tell.  I've already tried using the config in this post: https://forum.openwrt.org/viewtopic.php?id=46979, which is essentially the same as what I had.

After re-reading (for the hundredth times) OpenWRT UCI Wireless and OpenWRT bcm47xx I tried changing my /etc/config/wireless to use

option type broadcom

but then I wasn't able to even start the wireless.  My guess is that this directive is for using the broadcom-wl proprietary driver, kmod-brcm-wl.  I was thinking of trying it out but I'd much prefer to use open software if possible.

If anyone has a working config for the brcmsmac driver (including 802.11n support) I'd be very interested to see it.  I thought that maybe my Fedora laptop might be having the issue that it simply selects the 802.11g connection, but looking at the available bitrates on the router using the

iwlist wlo1 scanning essid <SSID>

command on my laptop I saw the max connection speed for the router is 54 mbps.

--Mark

Hello mfitch,

have you made any progress on solving your issues with brcmsmac?

I'm experiencing the same problems with my E2000 and the final release of Barrier Breaker 14.07.

The b43 gives decent 802.11g speed but does not support 802.11n. The brcmsmac driver seems to support 802.11n, since 'iwconfig' on my notebook reports bit rates up to 130 Mb/s, however the actual speed is horribly slow (about 10 Mb/s) and the connection is unstable.

Therefore I switched to the proprietary wl driver, which runs fine, although I did not entirely understand how to configure the device with this driver. In the end I avoided the graphical web front-end entirely, since it set some values, which limited the speed to 802.11g.
The following steps yield working 802.11n for me:

Remove kmod-b43 or kmod-brcmsmac and kmod-brcmutil
Install kmod-brcm-wl wl wlc nas

/etc/config/wireless:

config wifi-device  'wl0'
    option type     'broadcom'
    option channel  '6'
    option txantenna '3'
    option rxantenna '3'

config wifi-iface
    option device   'wl0'
    option network    'lan'
    option mode     'ap'
    option ssid     'MyWlan'
    option key     'wlankey'
    option encryption 'psk2+ccmp'

However, it only works if the command 'wifi' is executed, so I added this command to /etc/rc.local.


It runs fine with this config but I nevertheless would prefer to use the open-source driver.

(Last edited by Chimaira on 5 Oct 2014, 19:49)

Thanks for your reply Chimaira and for sharing your experience.  Unfortunately I didn't get this worked out and I eventually just reverted back to the b43 driver using only 802.11g.  I have seen my speeds restored to normal using that driver, for the 'g' standard anyway;  I still haven't been able to get 802.11n working.  Perhaps I'll try it again when Chaos Calmer makes it into the stable branch.  I am going to avoid the proprietary driver since my speed is sufficient for my needs at the moment.

Thanks again for your input!

--Mark

mfitch wrote:

Thanks for your reply Chimaira and for sharing your experience.  Unfortunately I didn't get this worked out and I eventually just reverted back to the b43 driver using only 802.11g.  I have seen my speeds restored to normal using that driver, for the 'g' standard anyway;  I still haven't been able to get 802.11n working.  Perhaps I'll try it again when Chaos Calmer makes it into the stable branch.  I am going to avoid the proprietary driver since my speed is sufficient for my needs at the moment.

Thanks again for your input!

--Mark

Chaos Calmer will not fix this issue unless Broadcom miraculously releases open source drivers. Don't hold your breath.

The discussion might have continued from here.