2013-12-27 21:08:17

by Michael Tokarev

[permalink] [raw]
Subject: BCM4313 & brcmsmac & 3.12: only semi-working?

Hello.

Got a Lenovo Thinkpad notebook with the following wifi card:

03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
Subsystem: Broadcom Corporation Device [14e4:0608]
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at f1600000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [58] Vendor Specific Information: Len=78 <?>
Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [d0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Virtual Channel
Capabilities: [160] Device Serial Number 00-00-24-ff-ff-fe-48-d2
Capabilities: [16c] Power Budgeting <?>
Kernel driver in use: bcma-pci-bridge

With 3.12 kernel, the device is recognized and it is possible to
connect to the access point and exchange some data. In 3.10,
even connection (assotiation with the AP) was quite a bit
problematic, and packet exchange never worked).

However, after receiving a few packets (about 100 packets), the
interface almost stops receiving data, except a few packets once
in a while. For example, when d/loading some file over wifi, first
part (very beginning) gets d/loaded fine, and next d/load stalls,
with Rx counter of the card not changing. Terminating the process
makes the counter to increase by one or two.

Stopping and re-starting the interface in NetworkManager makes
it go again, also for just about 100 packets, till it stalls
again.

Sometimes it works longer, say, 500 or even 1000 packets, but
at the end it stalls anyway.

Here's a typical iwconfig output:

wlan0 IEEE 802.11bgn ESSID:"mjt"
Mode:Managed Frequency:2.412 GHz Access Point: 64:70:02:29:D9:30
Bit Rate=1 Mb/s Tx-Power=19 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=56/70 Signal level=-54 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:84 Invalid misc:13 Missed beacon:0

(Note the bitrate of 1Mbps: the AP is pretty much capable of
running at 54Mbps, and actually my smartphone, when used in
exactly the same place, goes at full 54Mbps just fine. The
signal conditions are very well in here, AP is about 15 meters
away, stright visible. When I force-reconnect it, it displays
some more sane value here for a few moments but drops to 1mbps
anyway).

Here's some dmesg output when I start/stop wifi network and
try to d/load something:

...
[28031.696294] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[28031.696307] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
[28033.640097] wlan0: authenticate with 64:70:02:29:d9:30
[28033.642395] wlan0: send auth to 64:70:02:29:d9:30 (try 1/3)
[28033.644624] wlan0: authenticated
[28033.645452] wlan0: associate with 64:70:02:29:d9:30 (try 1/3)
[28033.650163] wlan0: RX AssocResp from 64:70:02:29:d9:30 (capab=0x411 status=0 aid=1)
[28033.651697] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: associated
[28033.651702] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: true (implement)
[28033.651710] wlan0: associated
[28033.921528] brcmsmac bcma0:0: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
[28149.522205] wlan0: deauthenticating from 64:70:02:29:d9:30 by local choice (reason=3)
[28149.535454] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: disassociated
[28149.535469] brcmsmac bcma0:0: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
[28149.535476] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[28149.538431] cfg80211: Calling CRDA to update world regulatory domain
[28152.718056] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[28152.718074] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
[28154.564599] wlan0: authenticate with 64:70:02:29:d9:30
[28154.567108] wlan0: send auth to 64:70:02:29:d9:30 (try 1/3)
[28154.569527] wlan0: authenticated
[28154.570232] wlan0: associate with 64:70:02:29:d9:30 (try 1/3)
[28154.574687] wlan0: RX AssocResp from 64:70:02:29:d9:30 (capab=0x411 status=0 aid=1)
[28154.575257] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: associated
[28154.575261] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: true (implement)
[28154.575268] wlan0: associated
...


The same notebook with the same wifi card works just fine under
windows (both windows 7 and 8), demonstrating stable reliable
about-54Mbps connection.

Is there any hope to get this device working under linux?

I can re-build kernels and stuff, enable debugging etc, -- that's
no problem, but I've really limited time.

I purchased this notebook especially to be used when travelling,
to be able to access to my office/work network over hotel wifi,
I plan to have a trip starting Jan-2. After figuring out that
it doesn't quite work as I'd expect it to do, I purchased another
wifi card, just to face another issue: it my notebook refuses to
_boot_ while that card is inserted! (it was a completely new
and unexpected "feature", now I know what it is, and will avoid
lenovo and HP notebooks in the future), -- so I returned the card
back. But now I'm again without wifi, and I can't return the
notebook...

P.S. I tried to find archives of brcm80211 list, or a way to
subscribe to it before posting, but found neither. Are there
archives?

Thanks,

/mjt


2013-12-28 12:24:24

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

Thank you very much for the reply!

28.12.2013 13:42, Arend van Spriel wrote:
> On 12/27/2013 09:58 PM, Michael Tokarev wrote:
>> Hello.
>>
>> Got a Lenovo Thinkpad notebook with the following wifi card:
>>
>> 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
>> Subsystem: Broadcom Corporation Device [14e4:0608]
>> Flags: bus master, fast devsel, latency 0, IRQ 17
>> Memory at f1600000 (64-bit, non-prefetchable) [size=16K]
>> Capabilities: [40] Power Management version 3
>> Capabilities: [58] Vendor Specific Information: Len=78 <?>
>> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
>> Capabilities: [d0] Express Endpoint, MSI 00
>> Capabilities: [100] Advanced Error Reporting
>> Capabilities: [13c] Virtual Channel
>> Capabilities: [160] Device Serial Number 00-00-24-ff-ff-fe-48-d2
>> Capabilities: [16c] Power Budgeting <?>
>> Kernel driver in use: bcma-pci-bridge

[wifi tx stalls after short usage, 3.12 kernel]

>> P.S. I tried to find archives of brcm80211 list, or a way to
>> subscribe to it before posting, but found neither. Are there
>> archives?
>
> Nope. The brcm80211-dev-list is just a (hopefully) convenient way to get
> your message to the brcm80211 driver developer within Broadcom. So it is
> always best to Cc: the linux-wireless list as well.

Ah. So the real archives should be for linux-wireless@ not for brcm..@ :)
Got it, thank you!

> Now about your card. I am not sure where to start, but can you dump
> contents for following debugfs file:
>
> /sys/kernel/debug/brcmsmac/bcma*/hardware

# cat /sys/kernel/debug/brcmsmac/bcma0\:0/hardware
board vendor: 14e4
board type: 608
board revision: 1109
board flags: 402201
board flags2: 884
firmware revision: 262032c

> Also a capture file would be great so if you have wireshark or dumpcap you can add monitor interface and capture 802.11 packets from connect up until the stalls. Commands for adding/enabling monitor interface (ass root/sudo):
>
> # iw dev wlan0 interface add mon0 type monitor
> # ifconfig mon0 up

Capture file made with tcpdump is attached (gzipped). I started the
capture with wlan0 disabled, next I used `nmcli con up id "wifi mjt"'
to connect to the AP (named, obviously, "mjt"), and next I tried to
d/load a file from my website (86.62.121.231). It d/loaded about 27Kb
and stalled. Next I tried to ping the AP (192.168.88.65), which also
didn't work.

That's quite a typical behavour of this whole thing. Sometimes it
lasts a bit longer, but that's rather unusual and it ends up stalling
anyway.

Is it worth the effort to try 3.13-tobe kernel here? I browsed changes
in there made in drivers/net/wireless/brcm80211/ compared with 3.12, but
there aren't many changes related to the softmac version, and most
looks rather cosmetic.

Thank you very much for the help!

/mjt


Attachments:
bcm4313.dump.gz (44.83 kB)

2013-12-28 09:42:20

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/27/2013 09:58 PM, Michael Tokarev wrote:
> Hello.
>
> Got a Lenovo Thinkpad notebook with the following wifi card:
>
> 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
> Subsystem: Broadcom Corporation Device [14e4:0608]
> Flags: bus master, fast devsel, latency 0, IRQ 17
> Memory at f1600000 (64-bit, non-prefetchable) [size=16K]
> Capabilities: [40] Power Management version 3
> Capabilities: [58] Vendor Specific Information: Len=78 <?>
> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
> Capabilities: [d0] Express Endpoint, MSI 00
> Capabilities: [100] Advanced Error Reporting
> Capabilities: [13c] Virtual Channel
> Capabilities: [160] Device Serial Number 00-00-24-ff-ff-fe-48-d2
> Capabilities: [16c] Power Budgeting <?>
> Kernel driver in use: bcma-pci-bridge
>
> With 3.12 kernel, the device is recognized and it is possible to
> connect to the access point and exchange some data. In 3.10,
> even connection (assotiation with the AP) was quite a bit
> problematic, and packet exchange never worked).
>
> However, after receiving a few packets (about 100 packets), the
> interface almost stops receiving data, except a few packets once
> in a while. For example, when d/loading some file over wifi, first
> part (very beginning) gets d/loaded fine, and next d/load stalls,
> with Rx counter of the card not changing. Terminating the process
> makes the counter to increase by one or two.
>
> Stopping and re-starting the interface in NetworkManager makes
> it go again, also for just about 100 packets, till it stalls
> again.
>
> Sometimes it works longer, say, 500 or even 1000 packets, but
> at the end it stalls anyway.
>
> Here's a typical iwconfig output:
>
> wlan0 IEEE 802.11bgn ESSID:"mjt"
> Mode:Managed Frequency:2.412 GHz Access Point: 64:70:02:29:D9:30
> Bit Rate=1 Mb/s Tx-Power=19 dBm
> Retry long limit:7 RTS thr:off Fragment thr:off
> Encryption key:off
> Power Management:off
> Link Quality=56/70 Signal level=-54 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:84 Invalid misc:13 Missed beacon:0
>
> (Note the bitrate of 1Mbps: the AP is pretty much capable of
> running at 54Mbps, and actually my smartphone, when used in
> exactly the same place, goes at full 54Mbps just fine. The
> signal conditions are very well in here, AP is about 15 meters
> away, stright visible. When I force-reconnect it, it displays
> some more sane value here for a few moments but drops to 1mbps
> anyway).
>
> Here's some dmesg output when I start/stop wifi network and
> try to d/load something:
>
> ...
> [28031.696294] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
> [28031.696307] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
> [28033.640097] wlan0: authenticate with 64:70:02:29:d9:30
> [28033.642395] wlan0: send auth to 64:70:02:29:d9:30 (try 1/3)
> [28033.644624] wlan0: authenticated
> [28033.645452] wlan0: associate with 64:70:02:29:d9:30 (try 1/3)
> [28033.650163] wlan0: RX AssocResp from 64:70:02:29:d9:30 (capab=0x411 status=0 aid=1)
> [28033.651697] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: associated
> [28033.651702] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: true (implement)
> [28033.651710] wlan0: associated
> [28033.921528] brcmsmac bcma0:0: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
> [28149.522205] wlan0: deauthenticating from 64:70:02:29:d9:30 by local choice (reason=3)
> [28149.535454] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: disassociated
> [28149.535469] brcmsmac bcma0:0: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
> [28149.535476] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
> [28149.538431] cfg80211: Calling CRDA to update world regulatory domain
> [28152.718056] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
> [28152.718074] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
> [28154.564599] wlan0: authenticate with 64:70:02:29:d9:30
> [28154.567108] wlan0: send auth to 64:70:02:29:d9:30 (try 1/3)
> [28154.569527] wlan0: authenticated
> [28154.570232] wlan0: associate with 64:70:02:29:d9:30 (try 1/3)
> [28154.574687] wlan0: RX AssocResp from 64:70:02:29:d9:30 (capab=0x411 status=0 aid=1)
> [28154.575257] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: associated
> [28154.575261] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: true (implement)
> [28154.575268] wlan0: associated
> ...
>
>
> The same notebook with the same wifi card works just fine under
> windows (both windows 7 and 8), demonstrating stable reliable
> about-54Mbps connection.
>
> Is there any hope to get this device working under linux?
>
> I can re-build kernels and stuff, enable debugging etc, -- that's
> no problem, but I've really limited time.
>
> I purchased this notebook especially to be used when travelling,
> to be able to access to my office/work network over hotel wifi,
> I plan to have a trip starting Jan-2. After figuring out that
> it doesn't quite work as I'd expect it to do, I purchased another
> wifi card, just to face another issue: it my notebook refuses to
> _boot_ while that card is inserted! (it was a completely new
> and unexpected "feature", now I know what it is, and will avoid
> lenovo and HP notebooks in the future), -- so I returned the card
> back. But now I'm again without wifi, and I can't return the
> notebook...
>
> P.S. I tried to find archives of brcm80211 list, or a way to
> subscribe to it before posting, but found neither. Are there
> archives?

Nope. The brcm80211-dev-list is just a (hopefully) convenient way to get
your message to the brcm80211 driver developer within Broadcom. So it is
always best to Cc: the linux-wireless list as well.

Now about your card. I am not sure where to start, but can you dump
contents for following debugfs file:

/sys/kernel/debug/brcmsmac/bcma*/hardware

Also a capture file would be great so if you have wireshark or dumpcap
you can add monitor interface and capture 802.11 packets from connect up
until the stalls. Commands for adding/enabling monitor interface (ass
root/sudo):

# iw dev wlan0 interface add mon0 type monitor
# ifconfig mon0 up

Regards,
Arend

> Thanks,
>
> /mjt
>


2014-01-14 08:59:56

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

So, I returned from my newyear trip. There, I tried to use this my laptop
with many various wifi networks, in hotels, cafes and other places. And
it never worked.

So I bought an usb wifi adaptor, some cheap old orient model, which worked
MUCH better than the built-in broadcom wifi. Except of 2 issues.

First, the antenna in this usb dongle is small, so signal quality isn't as
good as for the built-in adaptor with good antenna.

And second, which is much more severe, it is an external adaptor plugged
into an usb slot, so it isn't that easy as internal one, but it is very
easy to BREAK the usb slot. Which is what I did while sitting in a cafe
and someone else walking by. So now I've one usb port on my laptop broken
now (with very unpleasant large crack on the laptop "body") and the usb
wifi adaptor I bought is broken too.

I also tried to replace the internal wifi card with some non-broadcom
model, but the laptop refused to _boot_ while the card is inserted
(a so-called bios lock).

So the question stands: what is the way to actually use the internal
bcm card, without all those hassles I already encountered?

So far, the expirience was that anything with broadcom inside should
NOT be considered for a purchase, because the issues they gave you
costs much more than a price difference for a different model without
broadcom parts.

Thanks,

/mjt

28.12.2013 16:24, Michael Tokarev wrote:
> Thank you very much for the reply!
>
> 28.12.2013 13:42, Arend van Spriel wrote:
>> On 12/27/2013 09:58 PM, Michael Tokarev wrote:
>>> Hello.
>>>
>>> Got a Lenovo Thinkpad notebook with the following wifi card:
>>>
>>> 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
>>> Subsystem: Broadcom Corporation Device [14e4:0608]
>>> Flags: bus master, fast devsel, latency 0, IRQ 17
>>> Memory at f1600000 (64-bit, non-prefetchable) [size=16K]
>>> Capabilities: [40] Power Management version 3
>>> Capabilities: [58] Vendor Specific Information: Len=78 <?>
>>> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
>>> Capabilities: [d0] Express Endpoint, MSI 00
>>> Capabilities: [100] Advanced Error Reporting
>>> Capabilities: [13c] Virtual Channel
>>> Capabilities: [160] Device Serial Number 00-00-24-ff-ff-fe-48-d2
>>> Capabilities: [16c] Power Budgeting <?>
>>> Kernel driver in use: bcma-pci-bridge
>
> [wifi tx stalls after short usage, 3.12 kernel]
>
>>> P.S. I tried to find archives of brcm80211 list, or a way to
>>> subscribe to it before posting, but found neither. Are there
>>> archives?
>>
>> Nope. The brcm80211-dev-list is just a (hopefully) convenient way to get
>> your message to the brcm80211 driver developer within Broadcom. So it is
>> always best to Cc: the linux-wireless list as well.
>
> Ah. So the real archives should be for linux-wireless@ not for brcm..@ :)
> Got it, thank you!
>
>> Now about your card. I am not sure where to start, but can you dump
>> contents for following debugfs file:
>>
>> /sys/kernel/debug/brcmsmac/bcma*/hardware
>
> # cat /sys/kernel/debug/brcmsmac/bcma0\:0/hardware
> board vendor: 14e4
> board type: 608
> board revision: 1109
> board flags: 402201
> board flags2: 884
> firmware revision: 262032c
>
>> Also a capture file would be great so if you have wireshark or dumpcap you can add monitor interface and capture 802.11 packets from connect up until the stalls. Commands for adding/enabling monitor interface (ass root/sudo):
>>
>> # iw dev wlan0 interface add mon0 type monitor
>> # ifconfig mon0 up
>
> Capture file made with tcpdump is attached (gzipped). I started the
> capture with wlan0 disabled, next I used `nmcli con up id "wifi mjt"'
> to connect to the AP (named, obviously, "mjt"), and next I tried to
> d/load a file from my website (86.62.121.231). It d/loaded about 27Kb
> and stalled. Next I tried to ping the AP (192.168.88.65), which also
> didn't work.
>
> That's quite a typical behavour of this whole thing. Sometimes it
> lasts a bit longer, but that's rather unusual and it ends up stalling
> anyway.
>
> Is it worth the effort to try 3.13-tobe kernel here? I browsed changes
> in there made in drivers/net/wireless/brcm80211/ compared with 3.12, but
> there aren't many changes related to the softmac version, and most
> looks rather cosmetic.
>
> Thank you very much for the help!
>
> /mjt
>


2014-01-14 09:30:26

by Nikita N.

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

Interesting post.
BTW, I have been debugging those issues too, in my case coming from
using bcm4313 under windows xp.
And actually found out the cause, at least in my case: every setup frame
*RETRANSMISSION* invalidates the whole setup connection process.
I dont know if its a bug into the winxp driver of into bcm4313 firmware,
all what I know is that setup fails if router RE-sends even just 1
frame, either with retransmission flag set, or a new one with different
seqnum.
Which in fact means, if the router is not close a couple of meters from
you (hotel,cafes,office,..) you cant connect, as router will inevitably
send at least 1 retransmission.
On the other hand, setup is always successful when a strict series of
1-only-1 setup frames is sent both sides: auth req/auth resp/asso
req/asso resp.

Personally I got used to that issue, and also I always bring with me a
secondary backup usb interface.. sorry, what to do? life is a continuous
workaround.. :P

Regards,



On Tue, Jan 14, 2014, at 12:59 AM, Michael Tokarev wrote:
> So, I returned from my newyear trip. There, I tried to use this my
> laptop
> with many various wifi networks, in hotels, cafes and other places. And
> it never worked.
>
> So I bought an usb wifi adaptor, some cheap old orient model, which
> worked
> MUCH better than the built-in broadcom wifi. Except of 2 issues.
>
> First, the antenna in this usb dongle is small, so signal quality isn't
> as
> good as for the built-in adaptor with good antenna.
>
> And second, which is much more severe, it is an external adaptor plugged
> into an usb slot, so it isn't that easy as internal one, but it is very
> easy to BREAK the usb slot. Which is what I did while sitting in a cafe
> and someone else walking by. So now I've one usb port on my laptop
> broken
> now (with very unpleasant large crack on the laptop "body") and the usb
> wifi adaptor I bought is broken too.
>
> I also tried to replace the internal wifi card with some non-broadcom
> model, but the laptop refused to _boot_ while the card is inserted
> (a so-called bios lock).
>
> So the question stands: what is the way to actually use the internal
> bcm card, without all those hassles I already encountered?
>
> So far, the expirience was that anything with broadcom inside should
> NOT be considered for a purchase, because the issues they gave you
> costs much more than a price difference for a different model without
> broadcom parts.
>
> Thanks,
>
> /mjt
>
> 28.12.2013 16:24, Michael Tokarev wrote:
> > Thank you very much for the reply!
> >
> > 28.12.2013 13:42, Arend van Spriel wrote:
> >> On 12/27/2013 09:58 PM, Michael Tokarev wrote:
> >>> Hello.
> >>>
> >>> Got a Lenovo Thinkpad notebook with the following wifi card:
> >>>
> >>> 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
> >>> Subsystem: Broadcom Corporation Device [14e4:0608]
> >>> Flags: bus master, fast devsel, latency 0, IRQ 17
> >>> Memory at f1600000 (64-bit, non-prefetchable) [size=16K]
> >>> Capabilities: [40] Power Management version 3
> >>> Capabilities: [58] Vendor Specific Information: Len=78 <?>
> >>> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
> >>> Capabilities: [d0] Express Endpoint, MSI 00
> >>> Capabilities: [100] Advanced Error Reporting
> >>> Capabilities: [13c] Virtual Channel
> >>> Capabilities: [160] Device Serial Number 00-00-24-ff-ff-fe-48-d2
> >>> Capabilities: [16c] Power Budgeting <?>
> >>> Kernel driver in use: bcma-pci-bridge
> >
> > [wifi tx stalls after short usage, 3.12 kernel]
> >
> >>> P.S. I tried to find archives of brcm80211 list, or a way to
> >>> subscribe to it before posting, but found neither. Are there
> >>> archives?
> >>
> >> Nope. The brcm80211-dev-list is just a (hopefully) convenient way to get
> >> your message to the brcm80211 driver developer within Broadcom. So it is
> >> always best to Cc: the linux-wireless list as well.
> >
> > Ah. So the real archives should be for linux-wireless@ not for brcm..@ :)
> > Got it, thank you!
> >
> >> Now about your card. I am not sure where to start, but can you dump
> >> contents for following debugfs file:
> >>
> >> /sys/kernel/debug/brcmsmac/bcma*/hardware
> >
> > # cat /sys/kernel/debug/brcmsmac/bcma0\:0/hardware
> > board vendor: 14e4
> > board type: 608
> > board revision: 1109
> > board flags: 402201
> > board flags2: 884
> > firmware revision: 262032c
> >
> >> Also a capture file would be great so if you have wireshark or dumpcap you can add monitor interface and capture 802.11 packets from connect up until the stalls. Commands for adding/enabling monitor interface (ass root/sudo):
> >>
> >> # iw dev wlan0 interface add mon0 type monitor
> >> # ifconfig mon0 up
> >
> > Capture file made with tcpdump is attached (gzipped). I started the
> > capture with wlan0 disabled, next I used `nmcli con up id "wifi mjt"'
> > to connect to the AP (named, obviously, "mjt"), and next I tried to
> > d/load a file from my website (86.62.121.231). It d/loaded about 27Kb
> > and stalled. Next I tried to ping the AP (192.168.88.65), which also
> > didn't work.
> >
> > That's quite a typical behavour of this whole thing. Sometimes it
> > lasts a bit longer, but that's rather unusual and it ends up stalling
> > anyway.
> >
> > Is it worth the effort to try 3.13-tobe kernel here? I browsed changes
> > in there made in drivers/net/wireless/brcm80211/ compared with 3.12, but
> > there aren't many changes related to the softmac version, and most
> > looks rather cosmetic.
> >
> > Thank you very much for the help!
> >
> > /mjt
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless"
> in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
http://www.fastmail.fm - The professional email service


2014-02-10 19:16:59

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

After some more unsuccessful digging with brcmsmac driver, I thought I'd
give wl driver a try.

Unfortunately it does not work with kernels > 3.8, so I tried with 3.2.

There, wl.ko built successfully, created eth1 device on load, and wifi
apparently works fine. I transferred a few gigs in both direction, and
the signal is very stable at 65Mbps. It worked for several hours.

Unfortunately, kernels before 3.9 has another problem on this laptop:
it is the battery life. 3.8 and older kernels draws battery much faster
(even without wifi enabled), this laptop lasts about 4 hours on battery
with 3.2 kernel, compared to more than 7 with 3.10 kernel. I guess it
is the new ivy bridge pstates support introduced in 3.9.

I tried compiling wl.ko for 3.10 kernel, but unfortunately it doesn't
work there (after some minor tweaking of the source - I just commented
out procfs support) -- it does not find any devices.

So it looks like brcmsmac driver has a prob/bug, while wl driver works,
but wl doesn't work with more recent kernel.

It is still better than to use a separate usb dongle. But it'd be
really nie to see brcmsmac driver just working without the need to
decide which don you want now: battery life or wifi (I'd vote for
both :)

Thanks,

/mjt

14.01.2014 12:59, Michael Tokarev wrote:
> So, I returned from my newyear trip. There, I tried to use this my laptop
> with many various wifi networks, in hotels, cafes and other places. And
> it never worked.
>
> So I bought an usb wifi adaptor, some cheap old orient model, which worked
> MUCH better than the built-in broadcom wifi. Except of 2 issues.
>
> First, the antenna in this usb dongle is small, so signal quality isn't as
> good as for the built-in adaptor with good antenna.
>
> And second, which is much more severe, it is an external adaptor plugged
> into an usb slot, so it isn't that easy as internal one, but it is very
> easy to BREAK the usb slot. Which is what I did while sitting in a cafe
> and someone else walking by. So now I've one usb port on my laptop broken
> now (with very unpleasant large crack on the laptop "body") and the usb
> wifi adaptor I bought is broken too.
>
> I also tried to replace the internal wifi card with some non-broadcom
> model, but the laptop refused to _boot_ while the card is inserted
> (a so-called bios lock).
>
> So the question stands: what is the way to actually use the internal
> bcm card, without all those hassles I already encountered?
>
> So far, the expirience was that anything with broadcom inside should
> NOT be considered for a purchase, because the issues they gave you
> costs much more than a price difference for a different model without
> broadcom parts.
>
> Thanks,
>
> /mjt
>
> 28.12.2013 16:24, Michael Tokarev wrote:
>> Thank you very much for the reply!
>>
>> 28.12.2013 13:42, Arend van Spriel wrote:
>>> On 12/27/2013 09:58 PM, Michael Tokarev wrote:
>>>> Hello.
>>>>
>>>> Got a Lenovo Thinkpad notebook with the following wifi card:
>>>>
>>>> 03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
>>>> Subsystem: Broadcom Corporation Device [14e4:0608]
>>>> Flags: bus master, fast devsel, latency 0, IRQ 17
>>>> Memory at f1600000 (64-bit, non-prefetchable) [size=16K]
>>>> Capabilities: [40] Power Management version 3
>>>> Capabilities: [58] Vendor Specific Information: Len=78 <?>
>>>> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
>>>> Capabilities: [d0] Express Endpoint, MSI 00
>>>> Capabilities: [100] Advanced Error Reporting
>>>> Capabilities: [13c] Virtual Channel
>>>> Capabilities: [160] Device Serial Number 00-00-24-ff-ff-fe-48-d2
>>>> Capabilities: [16c] Power Budgeting <?>
>>>> Kernel driver in use: bcma-pci-bridge
>>
>> [wifi tx stalls after short usage, 3.12 kernel]
>>
>>>> P.S. I tried to find archives of brcm80211 list, or a way to
>>>> subscribe to it before posting, but found neither. Are there
>>>> archives?
>>>
>>> Nope. The brcm80211-dev-list is just a (hopefully) convenient way to get
>>> your message to the brcm80211 driver developer within Broadcom. So it is
>>> always best to Cc: the linux-wireless list as well.
>>
>> Ah. So the real archives should be for linux-wireless@ not for brcm..@ :)
>> Got it, thank you!
>>
>>> Now about your card. I am not sure where to start, but can you dump
>>> contents for following debugfs file:
>>>
>>> /sys/kernel/debug/brcmsmac/bcma*/hardware
>>
>> # cat /sys/kernel/debug/brcmsmac/bcma0\:0/hardware
>> board vendor: 14e4
>> board type: 608
>> board revision: 1109
>> board flags: 402201
>> board flags2: 884
>> firmware revision: 262032c
>>
>>> Also a capture file would be great so if you have wireshark or dumpcap you can add monitor interface and capture 802.11 packets from connect up until the stalls. Commands for adding/enabling monitor interface (ass root/sudo):
>>>
>>> # iw dev wlan0 interface add mon0 type monitor
>>> # ifconfig mon0 up
>>
>> Capture file made with tcpdump is attached (gzipped). I started the
>> capture with wlan0 disabled, next I used `nmcli con up id "wifi mjt"'
>> to connect to the AP (named, obviously, "mjt"), and next I tried to
>> d/load a file from my website (86.62.121.231). It d/loaded about 27Kb
>> and stalled. Next I tried to ping the AP (192.168.88.65), which also
>> didn't work.
>>
>> That's quite a typical behavour of this whole thing. Sometimes it
>> lasts a bit longer, but that's rather unusual and it ends up stalling
>> anyway.
>>
>> Is it worth the effort to try 3.13-tobe kernel here? I browsed changes
>> in there made in drivers/net/wireless/brcm80211/ compared with 3.12, but
>> there aren't many changes related to the softmac version, and most
>> looks rather cosmetic.
>>
>> Thank you very much for the help!
>>
>> /mjt
>>
>


2014-04-19 11:49:45

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

10.02.2014 23:16, Michael Tokarev wrote:
[big skip]


Tried kernel 3.14 with this device. Still no go, the brcmsmac driver still
does not work correctly, it stalls as before.

On the other hand, I found out how to compile the proprietary driver for
3.10+ kernels, it requires some rather minor source modifications.

/mjt

2014-08-26 05:23:48

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

[Adding netdev@ to the mix.
Original thread, started at Dec-2013, can be found at
http://marc.info/?t=138817851800006&r=1&w=2 or
http://www.spinics.net/lists/linux-wireless/msg116502.html
]

19.04.2014 15:42, Michael Tokarev wrote:
> [big skip]
>
>
> Tried kernel 3.14 with this device. Still no go, the brcmsmac driver still
> does not work correctly, it stalls as before.

Today I tried 3.16 kernel today too, just for fun (since this whole brcmsmac
thing looks not more like a non-working toy). Now with another laptop and
the same broadcom wifi adaptor (BRCM4313 802.11bgn Wireless Network Adapter
rev 01) (because due to cracked usb port on my original notebook it does not
work anymore).

This combination (kernel & wifi) does not work at all. Or, it is more jokish
than before -- the NIC works for ARP packets but nothing else, not even ping
or DNS or NTP. I see the access point sending replies (to pings or dns), but
these replies are not shown by tcpdump on the laptop. Even not all ARP packets
sent by the AP reaches the laptop.

So, I'm curious -- why this driver is found in regular section of kernel?
It looks like it should be in staging at least, or better yet, in a new section
titled "toy drivers" or something like this. Does it work for any device at
all?

Thanks,

/mjt

2014-08-26 16:15:34

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

26.08.2014 18:56, Arend van Spriel wrote:
> On 08/26/14 07:13, Michael Tokarev wrote:
[]
>> So, I'm curious -- why this driver is found in regular section of kernel?
>> It looks like it should be in staging at least, or better yet, in a new section
>> titled "toy drivers" or something like this. Does it work for any device at
>> all?
>
> Hi Michael,
>
> Thanks for your encouraging suggestions.

You might be a good politician :) These are blames, quite strong...

Seriously. As you revisited this thread, I had quite some issues and
money loss after all this, -- after initially especially choosing a
model with a supported wifi card which turned out to be non-working,
which I tried to fix by buying a new wifi NIC (which didn't work
thanks to Lenovo), and which I finally broke due to usb wifi dongle
I used.

But that's all "poetry", the main source of my blames is you reaction -
your first reply was really ecoraging, I hoped we can have some solution
together (I have strong programming background, just not as good with
kernel and drivers as you). But after your single reply, you never
spoke again until now. That's 8 months. _That_ is where my frustration
comes from.

And the actual facts are true - by now I have had 2 entirely different
devices (my original laptop which is now thrown away and another, given
by me by a friend because I needed something) - I dunno if that's
exactly the same wifi card or not (lspci output looks similar, and
this one is also bt/wifi combo), but they both doesn't work in a
quite similar way. So, the driver doesn't work with 2 out of 2 devices
which I've seen. Not a good statistics generally, but that's 100%
"hit" ratio for me. So I really am curious if this driver works at
all.

> I revisited the threads you referred to. In the boardflags it shows you
> have a bt+wifi card. It could be that is an issue. The brcmsmac supports other
> devices, ie. bcm43224/5 and the bcm4313 comes in a number of varieties.
> From what you tell here it seems you have trouble in rx path so I will look
> into that area if there is any specifically done for your variant of the bcm4313.

I tested this "new" laptop with 3.16 kernel just briefly. I may try more
complete analysis. I can participate with the debugging/dumping (I already
mentioned my strong programming background - but I'm really not into drivers
and hardware internals). So, basically, I'm all yours ;) Not that I really
need this driver anymore (since I will avoid these cards like a plague, for
obvious reasons :), but I want to have some good outcome out of all this
story :)

Thanks,

/mjt

2014-08-26 21:37:33

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 08/26/14 18:15, Michael Tokarev wrote:
> 26.08.2014 18:56, Arend van Spriel wrote:
>> On 08/26/14 07:13, Michael Tokarev wrote:
> []
>>> So, I'm curious -- why this driver is found in regular section of kernel?
>>> It looks like it should be in staging at least, or better yet, in a new section
>>> titled "toy drivers" or something like this. Does it work for any device at
>>> all?
>>
>> Hi Michael,
>>
>> Thanks for your encouraging suggestions.
>
> You might be a good politician :) These are blames, quite strong...
>
> Seriously. As you revisited this thread, I had quite some issues and
> money loss after all this, -- after initially especially choosing a
> model with a supported wifi card which turned out to be non-working,
> which I tried to fix by buying a new wifi NIC (which didn't work
> thanks to Lenovo), and which I finally broke due to usb wifi dongle
> I used.
>
> But that's all "poetry", the main source of my blames is you reaction -
> your first reply was really ecoraging, I hoped we can have some solution
> together (I have strong programming background, just not as good with
> kernel and drivers as you). But after your single reply, you never
> spoke again until now. That's 8 months. _That_ is where my frustration
> comes from.

Well, sorry about that. I did see the other messages fly by and noticed
you were using the wl driver so assumed you were fine with that.
Admittedly the brcmsmac got very little attention as all our resources
were put on brcmfmac.

> And the actual facts are true - by now I have had 2 entirely different
> devices (my original laptop which is now thrown away and another, given
> by me by a friend because I needed something) - I dunno if that's
> exactly the same wifi card or not (lspci output looks similar, and
> this one is also bt/wifi combo), but they both doesn't work in a
> quite similar way. So, the driver doesn't work with 2 out of 2 devices
> which I've seen. Not a good statistics generally, but that's 100%
> "hit" ratio for me. So I really am curious if this driver works at
> all.
>
>> I revisited the threads you referred to. In the boardflags it shows you
>> have a bt+wifi card. It could be that is an issue. The brcmsmac supports other
>> devices, ie. bcm43224/5 and the bcm4313 comes in a number of varieties.
>> From what you tell here it seems you have trouble in rx path so I will look
>> into that area if there is any specifically done for your variant of the bcm4313.
>
> I tested this "new" laptop with 3.16 kernel just briefly. I may try more
> complete analysis. I can participate with the debugging/dumping (I already
> mentioned my strong programming background - but I'm really not into drivers
> and hardware internals). So, basically, I'm all yours ;) Not that I really
> need this driver anymore (since I will avoid these cards like a plague, for
> obvious reasons :), but I want to have some good outcome out of all this
> story :)

Ok. Let's put frustration aside and make an effort. So could you make a
trace using trace-cmd utility. The log can get quite big. The brcmsmac
driver needs to be built with CONFIG_BRCM_TRACING enabled. Please
execute the following commands (assuming you use ubuntu with
network-manager):

$ sudo stop network-manager
$ sudo insmod brcmfmac.ko
$ sudo trace-cmd record -e brcmsmac:*

In another terminal:

$ sudo start network-manager

The trace-cmd must be stopped using ctrl-c.

Regards,
Arend

2014-08-27 15:27:42

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 08/27/14 12:02, Michael Tokarev wrote:
> 27.08.2014 01:37, Arend van Spriel wrote:
>> On 08/26/14 18:15, Michael Tokarev wrote:
> []
>> Well, sorry about that. I did see the other messages fly by and noticed you were using the wl driver so assumed you were fine with that.
>
> That's past already. I had several issues with wl driver,
> and current issue is that even the latest (Aug-2014) version
> of wl driver doesn't work with current kernel. So I can't
> really even compare wl and brcmsmac, -- in kernels< 3.16
> brcmsmac does not work, but wl can't be compiled for 3.16,
> and using different kernels for comparison is a bit wrong
> because there may be differences in other areas.
>
>> Admittedly the brcmsmac got very little attention as all our resources were put on brcmfmac.
>
> That happens. :)
>
> []
>> Ok. Let's put frustration aside and make an effort. So could you make a trace using trace-cmd utility. The log can get quite big. The brcmsmac driver needs to be built with CONFIG_BRCM_TRACING enabled. Please execute the following commands (assuming you use ubuntu with network-manager):
>>
>> $ sudo stop network-manager
>> $ sudo insmod brcmfmac.ko
>> $ sudo trace-cmd record -e brcmsmac:*
>>
>> In another terminal:
>>
>> $ sudo start network-manager
>>
>> The trace-cmd must be stopped using ctrl-c.
>
> Okay. This turned out to be not so simple.
>
> My initial attempt indicated that brcmsmac in 3.16 does
> not work at all. This isn't actually true - subsequent
> attempts shows that it works. I was ready to conclude
> the problem is fixed (after transferring several gigs
> of data over wifi, with tracing enabled or disabled,
> after fresh boot or after reboot from wl-enabled kernel,
> etc - it all worked.
>
> Until I hit the same stall as I described initially, the
> same which happened numerous times with kernel 3.12 ($subj).
>
> After several mins of transferring it stalled. But this
> time (unlike with 3.12), it continued after about 30 secs.

A kernel log (so no trace) of stalling interface might be useful so if
you can provide that and put a marker in there where you believe it
stalled that would be great.

> So, while my initial test of 3.16 indicated the prob is still
> here, at the same (or even worse) state, I can't really
> reproduce it, at least in a reliable way. There's something
> wrong still, but at least current version is significantly
> more useful than before (in a hope it wont stall at the
> very wrong moment exactly ;).
>
> There's one more difference between brcmsmac and wl -- with
> wl, I see significantly better speed, -- it is about 5MB/sec,
> while with brcmsmac it jumps between 2.0..4.5MB/sec (with
> 58..65Mbps connection rate in both cases). Here's a typical
> iwconfig output for brcmsmac version:
>
> wlan0 IEEE 802.11bgn ESSID:"mjt"
> Mode:Managed Frequency:2.412 GHz Access Point: 64:70:02:29:D9:30
> Bit Rate=65 Mb/s Tx-Power=19 dBm
> Retry short limit:7 RTS thr:off Fragment thr:off
> Power Management:off
> Link Quality=58/70 Signal level=-61 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:56355 Invalid misc:472 Missed beacon:0
>
> I'll keep trying/testing various cases, in attempt to
> understand what's going on. For now, I can't provide the
> requested traces (it wont be very useful, I guess).
>
> BTW, are there other things not implemented in brcmsmac?
> I see the module reminds about power management, what
> does it mean? Anything else missing?

Well, the wireless twiki has that info [1]. Regarding features the
important ones that I know are still not there are 40MHz support, and
power-save. The bcm4313 does not support 40MHz. Community contributions
added ibss, and ap mode. For P2P and TDLS probably some changes would be
needed although most of the legwork is done in mac80211.

Regards,
Arend

[1]
http://wireless.kernel.org/en/users/Drivers/brcm80211#To_be_done_for_softmac_driver

> Thank you!
>
> /mjt


2014-08-26 14:56:13

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 08/26/14 07:13, Michael Tokarev wrote:
> [Adding netdev@ to the mix.
> Original thread, started at Dec-2013, can be found at
> http://marc.info/?t=138817851800006&r=1&w=2 or
> http://www.spinics.net/lists/linux-wireless/msg116502.html
> ]
>
> 19.04.2014 15:42, Michael Tokarev wrote:
>> [big skip]
>>
>>
>> Tried kernel 3.14 with this device. Still no go, the brcmsmac driver still
>> does not work correctly, it stalls as before.
>
> Today I tried 3.16 kernel today too, just for fun (since this whole brcmsmac
> thing looks not more like a non-working toy). Now with another laptop and
> the same broadcom wifi adaptor (BRCM4313 802.11bgn Wireless Network Adapter
> rev 01) (because due to cracked usb port on my original notebook it does not
> work anymore).
>
> This combination (kernel& wifi) does not work at all. Or, it is more jokish
> than before -- the NIC works for ARP packets but nothing else, not even ping
> or DNS or NTP. I see the access point sending replies (to pings or dns), but
> these replies are not shown by tcpdump on the laptop. Even not all ARP packets
> sent by the AP reaches the laptop.
>
> So, I'm curious -- why this driver is found in regular section of kernel?
> It looks like it should be in staging at least, or better yet, in a new section
> titled "toy drivers" or something like this. Does it work for any device at
> all?

Hi Michael,

Thanks for your encouraging suggestions. I revisited the threads you
referred to. In the boardflags it shows you have a bt+wifi card. It
could be that is an issue. The brcmsmac supports other devices, ie.
bcm43224/5 and the bcm4313 comes in a number of varieties. From what you
tell here it seems you have trouble in rx path so I will look into that
area if there is any specifically done for your variant of the bcm4313.

Regards,
Arend

> Thanks,
>
> /mjt


2014-08-27 10:03:00

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

27.08.2014 01:37, Arend van Spriel wrote:
> On 08/26/14 18:15, Michael Tokarev wrote:
[]
> Well, sorry about that. I did see the other messages fly by and noticed you were using the wl driver so assumed you were fine with that.

That's past already. I had several issues with wl driver,
and current issue is that even the latest (Aug-2014) version
of wl driver doesn't work with current kernel. So I can't
really even compare wl and brcmsmac, -- in kernels < 3.16
brcmsmac does not work, but wl can't be compiled for 3.16,
and using different kernels for comparison is a bit wrong
because there may be differences in other areas.

> Admittedly the brcmsmac got very little attention as all our resources were put on brcmfmac.

That happens. :)

[]
> Ok. Let's put frustration aside and make an effort. So could you make a trace using trace-cmd utility. The log can get quite big. The brcmsmac driver needs to be built with CONFIG_BRCM_TRACING enabled. Please execute the following commands (assuming you use ubuntu with network-manager):
>
> $ sudo stop network-manager
> $ sudo insmod brcmfmac.ko
> $ sudo trace-cmd record -e brcmsmac:*
>
> In another terminal:
>
> $ sudo start network-manager
>
> The trace-cmd must be stopped using ctrl-c.

Okay. This turned out to be not so simple.

My initial attempt indicated that brcmsmac in 3.16 does
not work at all. This isn't actually true - subsequent
attempts shows that it works. I was ready to conclude
the problem is fixed (after transferring several gigs
of data over wifi, with tracing enabled or disabled,
after fresh boot or after reboot from wl-enabled kernel,
etc - it all worked.

Until I hit the same stall as I described initially, the
same which happened numerous times with kernel 3.12 ($subj).

After several mins of transferring it stalled. But this
time (unlike with 3.12), it continued after about 30 secs.

So, while my initial test of 3.16 indicated the prob is still
here, at the same (or even worse) state, I can't really
reproduce it, at least in a reliable way. There's something
wrong still, but at least current version is significantly
more useful than before (in a hope it wont stall at the
very wrong moment exactly ;).

There's one more difference between brcmsmac and wl -- with
wl, I see significantly better speed, -- it is about 5MB/sec,
while with brcmsmac it jumps between 2.0..4.5MB/sec (with
58..65Mbps connection rate in both cases). Here's a typical
iwconfig output for brcmsmac version:

wlan0 IEEE 802.11bgn ESSID:"mjt"
Mode:Managed Frequency:2.412 GHz Access Point: 64:70:02:29:D9:30
Bit Rate=65 Mb/s Tx-Power=19 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=58/70 Signal level=-61 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:56355 Invalid misc:472 Missed beacon:0

I'll keep trying/testing various cases, in attempt to
understand what's going on. For now, I can't provide the
requested traces (it wont be very useful, I guess).

BTW, are there other things not implemented in brcmsmac?
I see the module reminds about power management, what
does it mean? Anything else missing?

Thank you!

/mjt

2014-09-23 14:31:30

by Seth Forshee

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Tue, Sep 23, 2014 at 06:28:54PM +0400, Michael Tokarev wrote:
> 23.09.2014 18:25, Michael Tokarev wrote:
> > 23.09.2014 17:50, Arend van Spriel wrote:
> >> On 09/23/14 15:44, Seth Forshee wrote:
> []
> >>> It's been quite some time since I used them, but I think brcmsmac_tx is
> >>> quite noisy so you may only want to enable that if you already suspect a
> >>> tx problem. I always find it useful to enable the mac80211 and
> >>> mac80211_msg events too when debugging wireless, and I often enable
> >>> cfg80211 events as well (none of these are especially verbose).
>
> mac80211_msg does not exist, it looks like. fwiw.

Did you check your kernel's config? You need to have
CONFIG_MAC80211_MESSAGE_TRACING enabled.

Seth


2014-09-26 15:21:00

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

26.09.2014 18:42, Arend van Spriel wrote:

> Being bold here, but would you be willing to send that non-working part of hardware to me. I seem to have 4313 cards over here that just work and it would help greatly investigating the issue. I guess you do not care that much anymore, but might be others do (myself included).

Please note that this is 2nd card of the same model which I
come across in different laptops (one lenovo which I bought
last December, and later in a HP Envy which I borrowed from
my friend because my lenovo didn't work anymore). Both shows
exactly the same sympthoms, on several different WiFi networks.
The sympthoms are rehashed here several times -- sporaric stalls
of different frequence of occurences, which can be cured by
re-loading the driver.

I can send it your way, -- guess it will be quite a bit costly,
but I don't have any use for it anyway (short of throwing it
away), and since I already spent significantly more money due
to all this (whole thinkpad plus ssds and several wifi adaptors),
this additional cost is just a small noize. But since that's
2nd card in a row, maybe there's something else in there, the
prob is not in the card?

I mentioned several times that here, both of these cards worked
for long periods of time and for many gigabytes transfers (I
used wget in a loop overnight), -- and worked very well. Just
that these "working periods" changes into "non-working periods"
without any clear cause, sporadically. And these working
periods can be rather long, too.

Maybe this is some uninitialized field somewhere, I dunno -
at least that'd explain the "mystery" and inability to reproduce
any of the two kinds of "periods". Ofcourse it's rather difficult
to debug, but it might not be card-specific.

I also noticed that quite often it does not work after rebooing
the laptop from windows. But not always. I thought maybe win
switches it into some mode which linux driver fails to notice,
but no, the fact that it sometimes works after windows tells
me that I'm not right.

And note please that the closed-source wl driver always worked
with both of these cards, at least when I was able to compile
it (the prob is always the same - no support for more recent
kernels; and I don't really like to use recent kernels (I myself
currently stay with 3.10.x stable line), but both laptops actually
requires recent kernels to work properly (either because of
great energy saving support in latest intel cpus, or because of
support of gpu in latest intel celerons) -- that's why I really
prefer in-kernel driver).

That to say - the fact that wl always works may tell that the
hw is fine and the prob is elsewhere.

Thanks,

/mjt

2014-09-23 14:25:05

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

23.09.2014 17:50, Arend van Spriel wrote:
> On 09/23/14 15:44, Seth Forshee wrote:
[]
>> Well, there are a few different trace events defined for brcmsmac. This
>> would enable the full set:
>>
>> $ trace-cmd record -e brcmsmac -e brcmsmac_tx -e brcmsmac_msg
>>
>> It's been quite some time since I used them, but I think brcmsmac_tx is
>> quite noisy so you may only want to enable that if you already suspect a
>> tx problem. I always find it useful to enable the mac80211 and
>> mac80211_msg events too when debugging wireless, and I often enable
>> cfg80211 events as well (none of these are especially verbose).
>
> Ah, I read back the email from Sep 21 and it says:
>
> trace-cmd record brcmsmac:* &
>
> I am surprised the capture contains something as -e is missing. Good to know there are different tracers for the driver.
>
>> Of course all of this depends on having the right config options
>> selected. Looks like the relevant options are CONFIG_BRCM_TRACING and
>> CONFIG_MAC80211_MESSAGE_TRACING.

So, what should I enable? I guess there's a suspection of tx path
problem (since according to tcpdump, the other side sends packets
our way, but our side does not receive them), so -e brcmsmac_tx
shold be okay to enable (and should be easy to filter out if
needed, too, I guess). And using -e, now too, like this:

trace-cmd record -e brcmsmac -e brcmsmac_tx -e brcmsmac_msg -e mac80211 -e mac80211 -e cfg80211

http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-201409232.dat.gz is
the result from the following:

modprobe brcmsmac (networkmanager is running)
trace-cmd as above &
wget http://ip-add-ress/random-file -O /dev/null

I waited for wget to stall (it d'loaded 240Kb) and hit
Ctrl+C.

The trace file isn't really that huge.

Thank you!

/mjt

2014-09-15 08:03:31

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 27-08-14 17:27, Arend van Spriel wrote:
> On 08/27/14 12:02, Michael Tokarev wrote:
>> 27.08.2014 01:37, Arend van Spriel wrote:
>>> On 08/26/14 18:15, Michael Tokarev wrote:
>> []
>>> Well, sorry about that. I did see the other messages fly by and
>>> noticed you were using the wl driver so assumed you were fine with that.
>>
>> That's past already. I had several issues with wl driver,
>> and current issue is that even the latest (Aug-2014) version
>> of wl driver doesn't work with current kernel. So I can't
>> really even compare wl and brcmsmac, -- in kernels< 3.16
>> brcmsmac does not work, but wl can't be compiled for 3.16,
>> and using different kernels for comparison is a bit wrong
>> because there may be differences in other areas.
>>
>>> Admittedly the brcmsmac got very little attention as all our
>>> resources were put on brcmfmac.
>>
>> That happens. :)
>>
>> []
>>> Ok. Let's put frustration aside and make an effort. So could you make
>>> a trace using trace-cmd utility. The log can get quite big. The
>>> brcmsmac driver needs to be built with CONFIG_BRCM_TRACING enabled.
>>> Please execute the following commands (assuming you use ubuntu with
>>> network-manager):
>>>
>>> $ sudo stop network-manager
>>> $ sudo insmod brcmfmac.ko
>>> $ sudo trace-cmd record -e brcmsmac:*
>>>
>>> In another terminal:
>>>
>>> $ sudo start network-manager
>>>
>>> The trace-cmd must be stopped using ctrl-c.
>>
>> Okay. This turned out to be not so simple.
>>
>> My initial attempt indicated that brcmsmac in 3.16 does
>> not work at all. This isn't actually true - subsequent
>> attempts shows that it works. I was ready to conclude
>> the problem is fixed (after transferring several gigs
>> of data over wifi, with tracing enabled or disabled,
>> after fresh boot or after reboot from wl-enabled kernel,
>> etc - it all worked.
>>
>> Until I hit the same stall as I described initially, the
>> same which happened numerous times with kernel 3.12 ($subj).
>>
>> After several mins of transferring it stalled. But this
>> time (unlike with 3.12), it continued after about 30 secs.
>
> A kernel log (so no trace) of stalling interface might be useful so if
> you can provide that and put a marker in there where you believe it
> stalled that would be great.

Hi Michael,

Did you have any opportunity to create a log file. Got a question from
someone else who got bad bcm4313 behaviour after a certain upgrade. Did
you have the same experience?

Regards,
Arend

>> So, while my initial test of 3.16 indicated the prob is still
>> here, at the same (or even worse) state, I can't really
>> reproduce it, at least in a reliable way. There's something
>> wrong still, but at least current version is significantly
>> more useful than before (in a hope it wont stall at the
>> very wrong moment exactly ;).
>>
>> There's one more difference between brcmsmac and wl -- with
>> wl, I see significantly better speed, -- it is about 5MB/sec,
>> while with brcmsmac it jumps between 2.0..4.5MB/sec (with
>> 58..65Mbps connection rate in both cases). Here's a typical
>> iwconfig output for brcmsmac version:
>>
>> wlan0 IEEE 802.11bgn ESSID:"mjt"
>> Mode:Managed Frequency:2.412 GHz Access Point:
>> 64:70:02:29:D9:30
>> Bit Rate=65 Mb/s Tx-Power=19 dBm
>> Retry short limit:7 RTS thr:off Fragment thr:off
>> Power Management:off
>> Link Quality=58/70 Signal level=-61 dBm
>> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
>> Tx excessive retries:56355 Invalid misc:472 Missed beacon:0
>>
>> I'll keep trying/testing various cases, in attempt to
>> understand what's going on. For now, I can't provide the
>> requested traces (it wont be very useful, I guess).
>>
>> BTW, are there other things not implemented in brcmsmac?
>> I see the module reminds about power management, what
>> does it mean? Anything else missing?
>
> Well, the wireless twiki has that info [1]. Regarding features the
> important ones that I know are still not there are 40MHz support, and
> power-save. The bcm4313 does not support 40MHz. Community contributions
> added ibss, and ap mode. For P2P and TDLS probably some changes would be
> needed although most of the legwork is done in mac80211.
>
> Regards,
> Arend
>
> [1]
> http://wireless.kernel.org/en/users/Drivers/brcm80211#To_be_done_for_softmac_driver
>
>
>> Thank you!
>>
>> /mjt
>


2014-09-23 18:10:24

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

23.09.2014 21:35, Arend van Spriel wrote:
> On 09/23/14 18:02, Michael Tokarev wrote:

>> Oh. Indeed. While I enabled it, I recompiled only drivers/net/wireless,
>> but not net/. Rebuilt, another trace is here --
>>
>> http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-201409233.dat.gz
>>
>> Thanks,
>
> Just to confirm. With this trace you also get a stall during wget?

Yes. Initially it started d/loading but some time later the d/load speed
reduced to 0. It is possible to wait further, and after some more time
it will receive some more bytes/kilobytes/packets and stall again. Overall
progress is nearing zero.

Thanks,

/mjt

2014-09-23 13:50:32

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/23/14 15:44, Seth Forshee wrote:
> On Tue, Sep 23, 2014 at 02:47:45PM +0200, Arend van Spriel wrote:
>> On 09/23/14 12:04, Michael Tokarev wrote:
>>> 21.09.2014 19:30, Michael Tokarev wrote:
>>>> Namely, after resume, the card does not work. ARP works, ping and
>>>> DNS sometimes/somewhat work, inital TCP connection establisment
>>>> works, but eg http download does not work, it stalls almost
>>>> immediately.
>>>
>>> It does not work at all anymore again. Not only after resume but also
>>> after could power up, it stalls right at start of wget for example.
>>>
>>>> http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140921.dat.gz -- this
>>>> is a trace collected after resuming from suspend-to-disk
>>>
>>> And here -- http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140923.dat.gz
>>> is another trace, after insmod brcmutils& brcmsmac, starting trace-cmd record
>>> (with network-manager running in the background), and running a wget on
>>> http://ip-add-ress-of-the-access-point/somefile (which immediately stalls,
>>> showing minimal progress once in a while only).
>>
>> Well. This log and the one from a few days ago only show me
>> interrupt status changes, which does not tell me a lot. I do see
>> that the hardware signals transmit completions, but it is far less
>> informative then I hoped it would be. Maybe I am missing some debug
>> configuration here?
>>
>> Seth, would you know?
>
> Well, there are a few different trace events defined for brcmsmac. This
> would enable the full set:
>
> $ trace-cmd record -e brcmsmac -e brcmsmac_tx -e brcmsmac_msg
>
> It's been quite some time since I used them, but I think brcmsmac_tx is
> quite noisy so you may only want to enable that if you already suspect a
> tx problem. I always find it useful to enable the mac80211 and
> mac80211_msg events too when debugging wireless, and I often enable
> cfg80211 events as well (none of these are especially verbose).

Ah, I read back the email from Sep 21 and it says:

trace-cmd record brcmsmac:* &

I am surprised the capture contains something as -e is missing. Good to
know there are different tracers for the driver.

Regards,
Arend

> Of course all of this depends on having the right config options
> selected. Looks like the relevant options are CONFIG_BRCM_TRACING and
> CONFIG_MAC80211_MESSAGE_TRACING.
>
> Seth
>


2014-09-23 12:47:48

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/23/14 12:04, Michael Tokarev wrote:
> 21.09.2014 19:30, Michael Tokarev wrote:
>> Namely, after resume, the card does not work. ARP works, ping and
>> DNS sometimes/somewhat work, inital TCP connection establisment
>> works, but eg http download does not work, it stalls almost
>> immediately.
>
> It does not work at all anymore again. Not only after resume but also
> after could power up, it stalls right at start of wget for example.
>
>> http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140921.dat.gz -- this
>> is a trace collected after resuming from suspend-to-disk
>
> And here -- http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140923.dat.gz
> is another trace, after insmod brcmutils& brcmsmac, starting trace-cmd record
> (with network-manager running in the background), and running a wget on
> http://ip-add-ress-of-the-access-point/somefile (which immediately stalls,
> showing minimal progress once in a while only).

Well. This log and the one from a few days ago only show me interrupt
status changes, which does not tell me a lot. I do see that the hardware
signals transmit completions, but it is far less informative then I
hoped it would be. Maybe I am missing some debug configuration here?

Seth, would you know?

Regards,
Arend

> Hopefully this will help to find the problem. And for the record, I'm
> _again_ without the wifi network. But unlike of the previous situation,
> I can at least buy some other, better supported wifi adapter now, because
> this laptop does not have a bios lock (is 6235ANHMW any good?)
>
> Thanks,
>
> /mjt


2014-09-23 17:35:27

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/23/14 18:02, Michael Tokarev wrote:
> 23.09.2014 18:31, Seth Forshee пишет:
>> On Tue, Sep 23, 2014 at 06:28:54PM +0400, Michael Tokarev wrote:
>>> 23.09.2014 18:25, Michael Tokarev wrote:
>>>> 23.09.2014 17:50, Arend van Spriel wrote:
>>>>> On 09/23/14 15:44, Seth Forshee wrote:
>>> []
>>>>>> It's been quite some time since I used them, but I think brcmsmac_tx is
>>>>>> quite noisy so you may only want to enable that if you already suspect a
>>>>>> tx problem. I always find it useful to enable the mac80211 and
>>>>>> mac80211_msg events too when debugging wireless, and I often enable
>>>>>> cfg80211 events as well (none of these are especially verbose).
>>>
>>> mac80211_msg does not exist, it looks like. fwiw.
>>
>> Did you check your kernel's config? You need to have
>> CONFIG_MAC80211_MESSAGE_TRACING enabled.
>
> Oh. Indeed. While I enabled it, I recompiled only drivers/net/wireless,
> but not net/. Rebuilt, another trace is here --
>
> http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-201409233.dat.gz
>
> Thanks,

Just to confirm. With this trace you also get a stall during wget?

Regards,
Arend

> /mjt
>


2014-09-24 13:28:08

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/23/14 20:10, Michael Tokarev wrote:
> 23.09.2014 21:35, Arend van Spriel wrote:
>> On 09/23/14 18:02, Michael Tokarev wrote:
>
>>> Oh. Indeed. While I enabled it, I recompiled only drivers/net/wireless,
>>> but not net/. Rebuilt, another trace is here --
>>>
>>> http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-201409233.dat.gz
>>>
>>> Thanks,
>>
>> Just to confirm. With this trace you also get a stall during wget?
>
> Yes. Initially it started d/loading but some time later the d/load speed
> reduced to 0. It is possible to wait further, and after some more time
> it will receive some more bytes/kilobytes/packets and stall again. Overall
> progress is nearing zero.

I looked at the log. I see download commence because the packets
received of 1562 bytes length. So within one second I see little over
200 packets so approx. 3Mbps which is not impressive but I don't know
what can be expected. Indeed after that it stalls and we only seem to
receive small packets of 179 bytes that seem to end up in
cfg80211_mgmt_rx. It could be that the hardware is somehow bogged and
can not receive at higher modulations as management frames are
transmitted at lower rates. The hardware will drop packets that are
having FCS (aka. checksum) errors. The brcmsmac is missing some code to
read fcs error count from hardware, but I will get back to you with a
patch that we can use to confirm this.

Regards,
Arend

> Thanks,
>
> /mjt


2014-09-29 13:44:06

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/26/14 17:20, Michael Tokarev wrote:
> I can send it your way, -- guess it will be quite a bit costly,
> but I don't have any use for it anyway (short of throwing it
> away), and since I already spent significantly more money due
> to all this (whole thinkpad plus ssds and several wifi adaptors),
> this additional cost is just a small noize. But since that's
> 2nd card in a row, maybe there's something else in there, the
> prob is not in the card?

Could be. Maybe some BIOS issue. Can you make some hi-res pictures of
the card and email them to me? If it is identical to what I already have
over here there is not much sense in sending it.

Regards,
Arend




2014-09-24 14:51:34

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?


>I looked at the log. I see download commence because the packets
>received of 1562 bytes length. So within one second I see little over
>200 packets so approx. 3Mbps which is not impressive but I don't know
>what can be expected.

When it works it goes 50+ Mbps. I always tested at the same place and the signal there is good. D/load speed is 11Mb/sec steady. When it works. Today after powercycle it worked fine at 11 megabytes per second, I transferred several gigs of data.

> Indeed after that it stalls and we only seem to
>receive small packets of 179 bytes that seem to end up in
>cfg80211_mgmt_rx. It could be that the hardware is somehow bogged and
>can not receive at higher modulations as management frames are
>transmitted at lower rates. The hardware will drop packets that are
>having FCS (aka. checksum) errors. The brcmsmac is missing some code to
>
>read fcs error count from hardware, but I will get back to you with a
>patch that we can use to confirm this.

I see. Today I ordered an intel wifi card (which also works at 5MHz) and will swap bcm4313 with it. Since the notebook has to be disassembled for this (it doesn't have separate window for wifi card), and the procedure is rather complex I don't want to do it more times than necessary... ;)

Thanks!

/mjt from android phone

2014-09-23 13:44:23

by Seth Forshee

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Tue, Sep 23, 2014 at 02:47:45PM +0200, Arend van Spriel wrote:
> On 09/23/14 12:04, Michael Tokarev wrote:
> >21.09.2014 19:30, Michael Tokarev wrote:
> >>Namely, after resume, the card does not work. ARP works, ping and
> >>DNS sometimes/somewhat work, inital TCP connection establisment
> >>works, but eg http download does not work, it stalls almost
> >>immediately.
> >
> >It does not work at all anymore again. Not only after resume but also
> >after could power up, it stalls right at start of wget for example.
> >
> >>http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140921.dat.gz -- this
> >>is a trace collected after resuming from suspend-to-disk
> >
> >And here -- http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140923.dat.gz
> >is another trace, after insmod brcmutils& brcmsmac, starting trace-cmd record
> >(with network-manager running in the background), and running a wget on
> >http://ip-add-ress-of-the-access-point/somefile (which immediately stalls,
> >showing minimal progress once in a while only).
>
> Well. This log and the one from a few days ago only show me
> interrupt status changes, which does not tell me a lot. I do see
> that the hardware signals transmit completions, but it is far less
> informative then I hoped it would be. Maybe I am missing some debug
> configuration here?
>
> Seth, would you know?

Well, there are a few different trace events defined for brcmsmac. This
would enable the full set:

$ trace-cmd record -e brcmsmac -e brcmsmac_tx -e brcmsmac_msg

It's been quite some time since I used them, but I think brcmsmac_tx is
quite noisy so you may only want to enable that if you already suspect a
tx problem. I always find it useful to enable the mac80211 and
mac80211_msg events too when debugging wireless, and I often enable
cfg80211 events as well (none of these are especially verbose).

Of course all of this depends on having the right config options
selected. Looks like the relevant options are CONFIG_BRCM_TRACING and
CONFIG_MAC80211_MESSAGE_TRACING.

Seth


2014-09-23 16:02:15

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

23.09.2014 18:31, Seth Forshee пишет:
> On Tue, Sep 23, 2014 at 06:28:54PM +0400, Michael Tokarev wrote:
>> 23.09.2014 18:25, Michael Tokarev wrote:
>>> 23.09.2014 17:50, Arend van Spriel wrote:
>>>> On 09/23/14 15:44, Seth Forshee wrote:
>> []
>>>>> It's been quite some time since I used them, but I think brcmsmac_tx is
>>>>> quite noisy so you may only want to enable that if you already suspect a
>>>>> tx problem. I always find it useful to enable the mac80211 and
>>>>> mac80211_msg events too when debugging wireless, and I often enable
>>>>> cfg80211 events as well (none of these are especially verbose).
>>
>> mac80211_msg does not exist, it looks like. fwiw.
>
> Did you check your kernel's config? You need to have
> CONFIG_MAC80211_MESSAGE_TRACING enabled.

Oh. Indeed. While I enabled it, I recompiled only drivers/net/wireless,
but not net/. Rebuilt, another trace is here --

http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-201409233.dat.gz

Thanks,

/mjt


2014-09-26 14:42:52

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/26/14 16:26, Michael Tokarev wrote:
> Okay, so finally, today, without any updates from your side,
> I opened up the laptop again and inserted a newly bought
> Intel 6235ANHMW card instead of this creaky brcm4313. This
> card works right out of the box - plug it in and set up,
> both wifi and bluetooth (I had numerous probs with bluetooth
> too with brcm card), and it works on both 2.4GHz and 5GHz
> bands. Connection is very good and stable, I wasn't able
> to trigger a single glitch no matter how hard I tried.

Good for you.

> My only sorry is a lot of wasted time, efforts and money -
> all that have much better value than trying to deal with
> non-working drivers. And my only wish is so vendors stop
> using non-working parts in their hardware.. But oh well.

Being bold here, but would you be willing to send that non-working part
of hardware to me. I seem to have 4313 cards over here that just work
and it would help greatly investigating the issue. I guess you do not
care that much anymore, but might be others do (myself included).

Regards,
Arend

2014-09-21 15:30:34

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

15.09.2014 12:03, Arend van Spriel wrote:
> Hi Michael,

Hello again! I'm sorry for the long delay, I'll describe what happens
in a moment.


> Did you have any opportunity to create a log file. Got a question from
> someone else who got bad bcm4313 behaviour after a certain upgrade. Did
> you have the same experience?

No, I didn't have that opportunity. As I mentioned before, the second
laptop where I faced the same problem with brcm4313 wasn't mine, and I
had to return it back to its owner, so I had nothing to test things on
for quite some time.

However, a few days ago, after I was searching for a good notebook of my
own (obviously without broadcom parts ;), another friend of mine sent me
a gift - a new laptop. But this one has even worse wifi card (from linux
support PoV anyway) -- it is mediatek (formely ralink) MT7630e card.

After trying to build drivers for it for a while, I gave up, and an idea
come to me to swap this mediatek card with that broadcom 4313 card.
And surprizingly it worked - both laptops accepted the "new" cards and
I verified both works. So now the mediatek from my laptop works in
my friend's hp envy, and his brcm4313 works on my new asus.

So from now on I again have some playground for this stuff.

As I mentioned before, the card appears to work fine, at least at
first, I wasn't able to trigger any lockups/stalls before. Now
I can't trigger any stalls either, again, at least easily.

However, I found a 100%-reliable - so far - reproducer for the
initial behavour I described in the very first message in this
thread, which soon be one year old...

Namely, after resume, the card does not work. ARP works, ping and
DNS sometimes/somewhat work, inital TCP connection establisment
works, but eg http download does not work, it stalls almost
immediately.

Also during resume, I see the following kernel messages:

[ 202.607767] CPU: 2 PID: 2706 Comm: kworker/u9:0 Not tainted 3.16-amd64 #3.16.3
[ 202.607769] Hardware name: ASUSTeK COMPUTER INC. X200LA/X200LA, BIOS X200LA.204 06/16/2014
[ 202.607776] Workqueue: hci0 hci_power_on [bluetooth]
[ 202.607778] 0000000000000000 0000000000000009
[ 202.607780] Restarting tasks ... ffffffff814208bf 0000000000000000
[ 202.607783] ffffffff8104c926 ffff8800d5843d08 ffff8800d052f300 ffff8801189ea940
[ 202.607786] ffff8800d5843d00 0000000000000000 ffffffff8131c0d9 0000000000000000
[ 202.607790] Call Trace:
[ 202.607797] [<ffffffff814208bf>] ? dump_stack+0x41/0x51
[ 202.607802] [<ffffffff8104c926>] ? warn_slowpath_common+0x86/0xb0
[ 202.607807] [<ffffffff8131c0d9>] ? _request_firmware+0x439/0xa20
[ 202.607812] [<ffffffff8131c7a5>] ? request_firmware+0x35/0x60
[ 202.607816] [<ffffffffa0121780>] ? btusb_setup_bcm_patchram+0x70/0x3f0 [btusb]
[ 202.607823] [<ffffffffa0a0618d>] ? hci_dev_do_open+0x24d/0x8c0 [bluetooth]
[ 202.607829] [<ffffffff81082ade>] ? enqueue_task_fair+0x32e/0xce0
[ 202.607834] [<ffffffff8100bbb5>] ? sched_clock+0x5/0x10
[ 202.607839] [<ffffffff8107832b>] ? update_rq_clock+0x3b/0xd0
[ 202.607846] [<ffffffffa0a06818>] ? hci_power_on+0x18/0x120 [bluetooth]
[ 202.607877] [<ffffffff8106cad0>] ? kthread_freezable_should_stop+0x60/0x60
[ 202.607881] [<ffffffff81425dbc>] ? ret_from_fork+0x7c/0xb0
[ 202.607885] [<ffffffff8106cad0>] ? kthread_freezable_should_stop+0x60/0x60
[ 202.607887] ---[ end trace da2a7947839f7b1e ]---
[ 202.607891] bluetooth hci0: firmware: brcm/BCM20702A0-0a5c-21e3.hcd will not be loaded
[ 202.607894] Bluetooth: hci0: BCM: patch brcm/BCM20702A0-0a5c-21e3.hcd not found

I dunno how related these are -- bluetooth is another function of
this card.


http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140921.dat.gz -- this
is a trace collected after resuming from suspend-to-disk, after the above
kernel message, and doing this:

stop network-manager
rmmod brcmsmac brcmutil
modpobe brcmsmac
trace-cmd record brcmsmac:* &
start network-manager
wget http://<ip-over-wifi>/some-random-file
<Ctrl+C>

wget did received some series of packets, with pauses in-between, but overal
the progress looks like it is stalled completely, there's almost no progress.

This is 3.16.3 kernel. Note that reloading module after resume is not
sufficient (I'll try reloading whole brcm stack).

Thank you for your interest!

/mjt

2014-09-23 14:28:56

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

23.09.2014 18:25, Michael Tokarev wrote:
> 23.09.2014 17:50, Arend van Spriel wrote:
>> On 09/23/14 15:44, Seth Forshee wrote:
[]
>>> It's been quite some time since I used them, but I think brcmsmac_tx is
>>> quite noisy so you may only want to enable that if you already suspect a
>>> tx problem. I always find it useful to enable the mac80211 and
>>> mac80211_msg events too when debugging wireless, and I often enable
>>> cfg80211 events as well (none of these are especially verbose).

mac80211_msg does not exist, it looks like. fwiw.

/mjt

2014-09-23 10:04:35

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

21.09.2014 19:30, Michael Tokarev wrote:
> Namely, after resume, the card does not work. ARP works, ping and
> DNS sometimes/somewhat work, inital TCP connection establisment
> works, but eg http download does not work, it stalls almost
> immediately.

It does not work at all anymore again. Not only after resume but also
after could power up, it stalls right at start of wget for example.

> http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140921.dat.gz -- this
> is a trace collected after resuming from suspend-to-disk

And here -- http://www.corpit.ru/mjt/tmp/brcmsmac-4313-trace-20140923.dat.gz
is another trace, after insmod brcmutils & brcmsmac, starting trace-cmd record
(with network-manager running in the background), and running a wget on
http://ip-add-ress-of-the-access-point/somefile (which immediately stalls,
showing minimal progress once in a while only).

Hopefully this will help to find the problem. And for the record, I'm
_again_ without the wifi network. But unlike of the previous situation,
I can at least buy some other, better supported wifi adapter now, because
this laptop does not have a bios lock (is 6235ANHMW any good?)

Thanks,

/mjt

2014-09-26 14:26:05

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

Okay, so finally, today, without any updates from your side,
I opened up the laptop again and inserted a newly bought
Intel 6235ANHMW card instead of this creaky brcm4313. This
card works right out of the box - plug it in and set up,
both wifi and bluetooth (I had numerous probs with bluetooth
too with brcm card), and it works on both 2.4GHz and 5GHz
bands. Connection is very good and stable, I wasn't able
to trigger a single glitch no matter how hard I tried.

My only sorry is a lot of wasted time, efforts and money -
all that have much better value than trying to deal with
non-working drivers. And my only wish is so vendors stop
using non-working parts in their hardware.. But oh well.

Thanks,

/mjt

2014-09-29 19:48:05

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Monday 29 September 2014 15:44:03 Arend van Spriel wrote:
> On 09/26/14 17:20, Michael Tokarev wrote:
> > I can send it your way, -- guess it will be quite a bit costly,
> > but I don't have any use for it anyway (short of throwing it
> > away), and since I already spent significantly more money due
> > to all this (whole thinkpad plus ssds and several wifi adaptors),
> > this additional cost is just a small noize. But since that's
> > 2nd card in a row, maybe there's something else in there, the
> > prob is not in the card?
>
> Could be. Maybe some BIOS issue. Can you make some hi-res pictures of
> the card and email them to me? If it is identical to what I already have
> over here there is not much sense in sending it.
>
> Regards,
> Arend

Hi Arend,

I just saw this thread on linux-wireless and wanted to answer as it might be
of interest to you.

I also own a BCM4313 wireless network card. About a year ago I reported some
problems with reception strength which were then fixed after some time,
debugging and testing passed. At that time I also did some throughput testing,
but only had a 802.11g access-point to test. The results were not ideal, but
also not too bad. So at that time I thought the issues were all more or less
fixed and mostly fine. I also don't use wireless very much, so as long as things
do work somehow acceptable I probably don't notice any problems immediately.
So it comes that only about some month ago I noticed that the throughput I
measured with my 11g access-point (about half the rate than with an atheros
card on the same ap) is about the same on a 11n access-point where it should
be much faster. I didn't experience any stalls, but that may also be that I
didn't use the card enough to really notice them.

I always wanted to report a bug because of the low throughout, but never got
to it because of lack of time. I didn't want to provide a report saying just
it doesn't work or it's slow without any data about it and a description how
to reproduce it, as I think without this information a bug report is mostly
useless.

I also had a look at the kernel changelog of the brcmsm driver and notices
there was little to no activity lately. Because of this I also wasn't sure if
there is still someone interesting in fixing bugs for this device.

As I was annoyed by the bad support for this card I decided it would be more
easy and much less time consuming to simply buy another card than trying to
get this fixed. So I bought a BCM43228 card, because it also supports 5 GHz.
Only after it arrived I noticed that it was only supported by the 3.17+ kernel
(not so much of a problem) and that it only seems to work in 802.11g mode
(only slow speeds and no 5 GHz). At least I could use it in full 11g speeds,
so it was a improvement.

So I still don't have a card that does simply work. As I hope the missing
support for my BCM43228 will hopefully be added some time in the future it
probably would still be worth fixing the BCM4313 card as other users will also
benefit from it.

A friend of mine also has the same laptop than me and the same (or at least
very similar) wireless card. He has told me he has also problem with stalls
like Michael reported (if I remember the history of the thread correctly).

So I'm not really sure where I should go from here. I can try to provide some
debugging information as time permits, but I don't know how much time I will
have for this in the future. Of course ideally I want to use the BCM43228 card
with full support, as it can work on 5 GHz.

Currently the BCM43228 card is plugged into my laptop, but I want to avoid
swapping the cards more that very few times because the antenna connectors are
only designed for very few (un)plug cycles.

If it's of any information, my card is labeled BCM-BCM94313HMGB on the
sticker, the laptop where it was originally is a ThinkPad Edge E135.

Greetings,
Maxi


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-09-30 10:06:14

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 09/29/14 21:40, Maximilian Engelhardt wrote:
> On Monday 29 September 2014 15:44:03 Arend van Spriel wrote:
>> On 09/26/14 17:20, Michael Tokarev wrote:
>>> I can send it your way, -- guess it will be quite a bit costly,
>>> but I don't have any use for it anyway (short of throwing it
>>> away), and since I already spent significantly more money due
>>> to all this (whole thinkpad plus ssds and several wifi adaptors),
>>> this additional cost is just a small noize. But since that's
>>> 2nd card in a row, maybe there's something else in there, the
>>> prob is not in the card?
>>
>> Could be. Maybe some BIOS issue. Can you make some hi-res pictures of
>> the card and email them to me? If it is identical to what I already have
>> over here there is not much sense in sending it.
>>
>> Regards,
>> Arend
>
> Hi Arend,
>
> I just saw this thread on linux-wireless and wanted to answer as it might be
> of interest to you.
>
> I also own a BCM4313 wireless network card. About a year ago I reported some
> problems with reception strength which were then fixed after some time,
> debugging and testing passed. At that time I also did some throughput testing,
> but only had a 802.11g access-point to test. The results were not ideal, but
> also not too bad. So at that time I thought the issues were all more or less
> fixed and mostly fine. I also don't use wireless very much, so as long as things
> do work somehow acceptable I probably don't notice any problems immediately.
> So it comes that only about some month ago I noticed that the throughput I
> measured with my 11g access-point (about half the rate than with an atheros
> card on the same ap) is about the same on a 11n access-point where it should
> be much faster. I didn't experience any stalls, but that may also be that I
> didn't use the card enough to really notice them.
>
> I always wanted to report a bug because of the low throughout, but never got
> to it because of lack of time. I didn't want to provide a report saying just
> it doesn't work or it's slow without any data about it and a description how
> to reproduce it, as I think without this information a bug report is mostly
> useless.
>
> I also had a look at the kernel changelog of the brcmsm driver and notices
> there was little to no activity lately. Because of this I also wasn't sure if
> there is still someone interesting in fixing bugs for this device.
>
> As I was annoyed by the bad support for this card I decided it would be more
> easy and much less time consuming to simply buy another card than trying to
> get this fixed. So I bought a BCM43228 card, because it also supports 5 GHz.
> Only after it arrived I noticed that it was only supported by the 3.17+ kernel
> (not so much of a problem) and that it only seems to work in 802.11g mode
> (only slow speeds and no 5 GHz). At least I could use it in full 11g speeds,
> so it was a improvement.
>
> So I still don't have a card that does simply work. As I hope the missing
> support for my BCM43228 will hopefully be added some time in the future it
> probably would still be worth fixing the BCM4313 card as other users will also
> benefit from it.
>
> A friend of mine also has the same laptop than me and the same (or at least
> very similar) wireless card. He has told me he has also problem with stalls
> like Michael reported (if I remember the history of the thread correctly).
>
> So I'm not really sure where I should go from here. I can try to provide some
> debugging information as time permits, but I don't know how much time I will
> have for this in the future. Of course ideally I want to use the BCM43228 card
> with full support, as it can work on 5 GHz.
>
> Currently the BCM43228 card is plugged into my laptop, but I want to avoid
> swapping the cards more that very few times because the antenna connectors are
> only designed for very few (un)plug cycles.
>
> If it's of any information, my card is labeled BCM-BCM94313HMGB on the
> sticker, the laptop where it was originally is a ThinkPad Edge E135.

Thanks for taking time to chime in. This chipset is a pain in the....
The label info does help. You have a 4313 with internal PA for which
support was added later. The card that Michael has seems to have an
external PA. The initial iPA support patch broke things for everyone
with external PA so it was reverted. In the second round it was better,
but it seems Michael still had issues. As he mentioned BT issues and his
card shares the external PA between WLAN and BT I believe that there is
a BT-coex issue.

What is causing your 4313 to seemingly do 11g rates is hard to tell
without any debug info. I have that card over here, but in my cabled
setup it is doing 72Mbps, ie. 11n rate. I can run a rate-vs-range test
to see if there is an issue.

Thanks again and
Regards,
Arend




2014-10-09 08:21:13

by Rafał Miłecki

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 9 October 2014 09:52, Arend van Spriel <[email protected]> wrote:
> I have been staring at differences brcmsmac and our internal driver (which
> wl is derived from as well). Would you be able to make an mmiotrace loading
> wl and brcmsmac.

Arend,

As you noticed earlier, this is a WiFi card with BT. I've checked
siutils.c from SDK 7.14.43.7 (got it from Netgear R8000) and it has
three BCM4313 workarounds:


1) si_doattach
SI_MSG(("Applying 4313 WARs\n"));
si_pmu_chipcontrol(sih, 0, CCTRL_4313_12MA_LED_DRIVE,
CCTRL_4313_12MA_LED_DRIVE);

It's already implemented in bcma, see driver_chipcommon_pmu.c


2) si_epa_4313war
/* EPA Fix */
W_REG(sii->osh, &cc->gpiocontrol,
R_REG(sii->osh, &cc->gpiocontrol) | GPIO_CTRL_EPA_EN_MASK);

This is what you already implement in ai_epa_4313war


3) si_pmu_synth_pwrsw_4313_war
I don't think it's implemented.


4) si_btcombo_p250_4313_war
I also don't think it's implemented


The last one (si_btcombo_p250_4313_war) looks promising, the comment
above the function says:
/** WL/BT control for 4313 btcombo boards >= P250 */
I guess you need to re-implement this function and call it somewhere
in brcmsmac.

2014-10-09 07:52:52

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 10/09/14 00:19, Maximilian Engelhardt wrote:
> On Tuesday 30 September 2014 12:06:10 Arend van Spriel wrote:
>> On 09/29/14 21:40, Maximilian Engelhardt wrote:
>>> On Monday 29 September 2014 15:44:03 Arend van Spriel wrote:
>>>> On 09/26/14 17:20, Michael Tokarev wrote:
>>>>> I can send it your way, -- guess it will be quite a bit costly,
>>>>> but I don't have any use for it anyway (short of throwing it
>>>>> away), and since I already spent significantly more money due
>>>>> to all this (whole thinkpad plus ssds and several wifi adaptors),
>>>>> this additional cost is just a small noize. But since that's
>>>>> 2nd card in a row, maybe there's something else in there, the
>>>>> prob is not in the card?
>>>>
>>>> Could be. Maybe some BIOS issue. Can you make some hi-res pictures of
>>>> the card and email them to me? If it is identical to what I already have
>>>> over here there is not much sense in sending it.
>>>>
>>>> Regards,
>>>> Arend
>>>
>>> Hi Arend,
>>>
>>> I just saw this thread on linux-wireless and wanted to answer as it might
>>> be of interest to you.
>>>
>>> I also own a BCM4313 wireless network card. About a year ago I reported
>>> some problems with reception strength which were then fixed after some
>>> time, debugging and testing passed. At that time I also did some
>>> throughput testing, but only had a 802.11g access-point to test. The
>>> results were not ideal, but also not too bad. So at that time I thought
>>> the issues were all more or less fixed and mostly fine. I also don't use
>>> wireless very much, so as long as things do work somehow acceptable I
>>> probably don't notice any problems immediately. So it comes that only
>>> about some month ago I noticed that the throughput I measured with my 11g
>>> access-point (about half the rate than with an atheros card on the same
>>> ap) is about the same on a 11n access-point where it should be much
>>> faster. I didn't experience any stalls, but that may also be that I
>>> didn't use the card enough to really notice them.
>>>
>>> I always wanted to report a bug because of the low throughout, but never
>>> got to it because of lack of time. I didn't want to provide a report
>>> saying just it doesn't work or it's slow without any data about it and a
>>> description how to reproduce it, as I think without this information a
>>> bug report is mostly useless.
>>>
>>> I also had a look at the kernel changelog of the brcmsm driver and notices
>>> there was little to no activity lately. Because of this I also wasn't sure
>>> if there is still someone interesting in fixing bugs for this device.
>>>
>>> As I was annoyed by the bad support for this card I decided it would be
>>> more easy and much less time consuming to simply buy another card than
>>> trying to get this fixed. So I bought a BCM43228 card, because it also
>>> supports 5 GHz. Only after it arrived I noticed that it was only
>>> supported by the 3.17+ kernel (not so much of a problem) and that it only
>>> seems to work in 802.11g mode (only slow speeds and no 5 GHz). At least I
>>> could use it in full 11g speeds, so it was a improvement.
>>>
>>> So I still don't have a card that does simply work. As I hope the missing
>>> support for my BCM43228 will hopefully be added some time in the future it
>>> probably would still be worth fixing the BCM4313 card as other users will
>>> also benefit from it.
>>>
>>> A friend of mine also has the same laptop than me and the same (or at
>>> least
>>> very similar) wireless card. He has told me he has also problem with
>>> stalls
>>> like Michael reported (if I remember the history of the thread correctly).
>>>
>>> So I'm not really sure where I should go from here. I can try to provide
>>> some debugging information as time permits, but I don't know how much
>>> time I will have for this in the future. Of course ideally I want to use
>>> the BCM43228 card with full support, as it can work on 5 GHz.
>>>
>>> Currently the BCM43228 card is plugged into my laptop, but I want to avoid
>>> swapping the cards more that very few times because the antenna connectors
>>> are only designed for very few (un)plug cycles.
>>>
>>> If it's of any information, my card is labeled BCM-BCM94313HMGB on the
>>> sticker, the laptop where it was originally is a ThinkPad Edge E135.
>>
>> Thanks for taking time to chime in. This chipset is a pain in the....
>> The label info does help. You have a 4313 with internal PA for which
>> support was added later. The card that Michael has seems to have an
>> external PA. The initial iPA support patch broke things for everyone
>> with external PA so it was reverted. In the second round it was better,
>> but it seems Michael still had issues. As he mentioned BT issues and his
>> card shares the external PA between WLAN and BT I believe that there is
>> a BT-coex issue.
>>
>> What is causing your 4313 to seemingly do 11g rates is hard to tell
>> without any debug info. I have that card over here, but in my cabled
>> setup it is doing 72Mbps, ie. 11n rate. I can run a rate-vs-range test
>> to see if there is an issue.
>>
>> Thanks again and
>> Regards,
>> Arend
>
> Hi Arend,
>
> Today I changed back to the BC4313 card to verify the speed is still slow. At
> first it was slow as I remembered it (down about 3 Mbits/s, up about 1 Mbit/s,
> measured with iperf).
> I then booted an Ubuntu Live image to try the wl driver, just to verify that
> it performs better and the hardware is still fine. First on the Ubuntu Live
> image the speed with the brcmsmac driver were the same as in my test above. I
> the installed the wl driver, unloaded the brcmsmac module and loaded the wl
> module. That however did not work as something in the kernel crashed and
> wireless didn't work at all. I rebootet the system to test again in case this
> was a random failure. What was interesting after this reboot was that the
> wireless connection was fast with the brcmsmac driver. I got about 35 Mbit/s
> up and down speed. I then tried the wl driver again but it still crashed.
>
> After this I rebooted into my normal Debian system and the brcmsmac driver was
> still fast. So what was different now than before. I realized that I always did
> a reboot, so the Laptop was never really off between the boots. I then shut
> down the laptop and waited a few seconds before turning it on again. And after
> that the driver was back to the slow speed.
>
> I did not verify this a second time, but for now it very much looks like the
> wl driver is settings something in the card that is necessary for getting
> faster speeds. This seems to be preserved on reboot but not on poweroff.
>
> I hope this my help you finding the problem in the brcmsmac driver. Feel free
> to ask if you need any addition debug information from me.
>
> And for the record, my atheros usb card is still much faster, it reaches
> 130 Mbit/s.

Thanks, Maximilian

I have been staring at differences brcmsmac and our internal driver
(which wl is derived from as well). Would you be able to make an
mmiotrace loading wl and brcmsmac.

Regards,
Arend

2014-10-08 22:19:16

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Tuesday 30 September 2014 12:06:10 Arend van Spriel wrote:
> On 09/29/14 21:40, Maximilian Engelhardt wrote:
> > On Monday 29 September 2014 15:44:03 Arend van Spriel wrote:
> >> On 09/26/14 17:20, Michael Tokarev wrote:
> >>> I can send it your way, -- guess it will be quite a bit costly,
> >>> but I don't have any use for it anyway (short of throwing it
> >>> away), and since I already spent significantly more money due
> >>> to all this (whole thinkpad plus ssds and several wifi adaptors),
> >>> this additional cost is just a small noize. But since that's
> >>> 2nd card in a row, maybe there's something else in there, the
> >>> prob is not in the card?
> >>
> >> Could be. Maybe some BIOS issue. Can you make some hi-res pictures of
> >> the card and email them to me? If it is identical to what I already have
> >> over here there is not much sense in sending it.
> >>
> >> Regards,
> >> Arend
> >
> > Hi Arend,
> >
> > I just saw this thread on linux-wireless and wanted to answer as it might
> > be of interest to you.
> >
> > I also own a BCM4313 wireless network card. About a year ago I reported
> > some problems with reception strength which were then fixed after some
> > time, debugging and testing passed. At that time I also did some
> > throughput testing, but only had a 802.11g access-point to test. The
> > results were not ideal, but also not too bad. So at that time I thought
> > the issues were all more or less fixed and mostly fine. I also don't use
> > wireless very much, so as long as things do work somehow acceptable I
> > probably don't notice any problems immediately. So it comes that only
> > about some month ago I noticed that the throughput I measured with my 11g
> > access-point (about half the rate than with an atheros card on the same
> > ap) is about the same on a 11n access-point where it should be much
> > faster. I didn't experience any stalls, but that may also be that I
> > didn't use the card enough to really notice them.
> >
> > I always wanted to report a bug because of the low throughout, but never
> > got to it because of lack of time. I didn't want to provide a report
> > saying just it doesn't work or it's slow without any data about it and a
> > description how to reproduce it, as I think without this information a
> > bug report is mostly useless.
> >
> > I also had a look at the kernel changelog of the brcmsm driver and notices
> > there was little to no activity lately. Because of this I also wasn't sure
> > if there is still someone interesting in fixing bugs for this device.
> >
> > As I was annoyed by the bad support for this card I decided it would be
> > more easy and much less time consuming to simply buy another card than
> > trying to get this fixed. So I bought a BCM43228 card, because it also
> > supports 5 GHz. Only after it arrived I noticed that it was only
> > supported by the 3.17+ kernel (not so much of a problem) and that it only
> > seems to work in 802.11g mode (only slow speeds and no 5 GHz). At least I
> > could use it in full 11g speeds, so it was a improvement.
> >
> > So I still don't have a card that does simply work. As I hope the missing
> > support for my BCM43228 will hopefully be added some time in the future it
> > probably would still be worth fixing the BCM4313 card as other users will
> > also benefit from it.
> >
> > A friend of mine also has the same laptop than me and the same (or at
> > least
> > very similar) wireless card. He has told me he has also problem with
> > stalls
> > like Michael reported (if I remember the history of the thread correctly).
> >
> > So I'm not really sure where I should go from here. I can try to provide
> > some debugging information as time permits, but I don't know how much
> > time I will have for this in the future. Of course ideally I want to use
> > the BCM43228 card with full support, as it can work on 5 GHz.
> >
> > Currently the BCM43228 card is plugged into my laptop, but I want to avoid
> > swapping the cards more that very few times because the antenna connectors
> > are only designed for very few (un)plug cycles.
> >
> > If it's of any information, my card is labeled BCM-BCM94313HMGB on the
> > sticker, the laptop where it was originally is a ThinkPad Edge E135.
>
> Thanks for taking time to chime in. This chipset is a pain in the....
> The label info does help. You have a 4313 with internal PA for which
> support was added later. The card that Michael has seems to have an
> external PA. The initial iPA support patch broke things for everyone
> with external PA so it was reverted. In the second round it was better,
> but it seems Michael still had issues. As he mentioned BT issues and his
> card shares the external PA between WLAN and BT I believe that there is
> a BT-coex issue.
>
> What is causing your 4313 to seemingly do 11g rates is hard to tell
> without any debug info. I have that card over here, but in my cabled
> setup it is doing 72Mbps, ie. 11n rate. I can run a rate-vs-range test
> to see if there is an issue.
>
> Thanks again and
> Regards,
> Arend

Hi Arend,

Today I changed back to the BC4313 card to verify the speed is still slow. At
first it was slow as I remembered it (down about 3 Mbits/s, up about 1 Mbit/s,
measured with iperf).
I then booted an Ubuntu Live image to try the wl driver, just to verify that
it performs better and the hardware is still fine. First on the Ubuntu Live
image the speed with the brcmsmac driver were the same as in my test above. I
the installed the wl driver, unloaded the brcmsmac module and loaded the wl
module. That however did not work as something in the kernel crashed and
wireless didn't work at all. I rebootet the system to test again in case this
was a random failure. What was interesting after this reboot was that the
wireless connection was fast with the brcmsmac driver. I got about 35 Mbit/s
up and down speed. I then tried the wl driver again but it still crashed.

After this I rebooted into my normal Debian system and the brcmsmac driver was
still fast. So what was different now than before. I realized that I always did
a reboot, so the Laptop was never really off between the boots. I then shut
down the laptop and waited a few seconds before turning it on again. And after
that the driver was back to the slow speed.

I did not verify this a second time, but for now it very much looks like the
wl driver is settings something in the card that is necessary for getting
faster speeds. This seems to be preserved on reboot but not on poweroff.

I hope this my help you finding the problem in the brcmsmac driver. Feel free
to ask if you need any addition debug information from me.

And for the record, my atheros usb card is still much faster, it reaches
130 Mbit/s.

Greetings,
Maxi


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-11-19 13:46:24

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 11/17/14 23:36, Maximilian Engelhardt wrote:
> On Thursday 09 October 2014 10:21:12 Rafał Miłecki wrote:
>> On 9 October 2014 09:52, Arend van Spriel<[email protected]> wrote:
>>> I have been staring at differences brcmsmac and our internal driver (which
>>> wl is derived from as well). Would you be able to make an mmiotrace
>>> loading
>>> wl and brcmsmac.
>>
>> Arend,
>>
>> As you noticed earlier, this is a WiFi card with BT. I've checked
>> siutils.c from SDK 7.14.43.7 (got it from Netgear R8000) and it has
>> three BCM4313 workarounds:
>>
>>
>> 1) si_doattach
>> SI_MSG(("Applying 4313 WARs\n"));
>> si_pmu_chipcontrol(sih, 0, CCTRL_4313_12MA_LED_DRIVE,
>> CCTRL_4313_12MA_LED_DRIVE);
>>
>> It's already implemented in bcma, see driver_chipcommon_pmu.c
>>
>>
>> 2) si_epa_4313war
>> /* EPA Fix */
>> W_REG(sii->osh,&cc->gpiocontrol,
>> R_REG(sii->osh,&cc->gpiocontrol) | GPIO_CTRL_EPA_EN_MASK);
>>
>> This is what you already implement in ai_epa_4313war
>>
>>
>> 3) si_pmu_synth_pwrsw_4313_war
>> I don't think it's implemented.
>>
>>
>> 4) si_btcombo_p250_4313_war
>> I also don't think it's implemented
>>
>>
>> The last one (si_btcombo_p250_4313_war) looks promising, the comment
>> above the function says:
>> /** WL/BT control for 4313 btcombo boards>= P250 */
>> I guess you need to re-implement this function and call it somewhere
>> in brcmsmac.
>
> Hi,
>
> I just wanted to ask if there is any progress on this issue since I haven't
> heard anything for a month. Please let me know if you need any additional
> information.

I had a bit of problem with the mmiotrace files. Well, my (virtual)
linux machine had as it ended up swapping on my disk and went down the
drain.

I still wanted to look at items 3) and 4) that Rafal mentioned although
item 4) does not seems to apply to Michael's 4313 it may help yours. I
submitted a patch to get counter statistics from the 802.11 core on the
chip [1] as I am curious whether that will show a possible lead.

Regards,
Arend

2014-11-19 13:49:32

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 11/19/14 14:46, Arend van Spriel wrote:
> On 11/17/14 23:36, Maximilian Engelhardt wrote:
>> On Thursday 09 October 2014 10:21:12 Rafał Miłecki wrote:
>>> On 9 October 2014 09:52, Arend van Spriel<[email protected]> wrote:
>>>> I have been staring at differences brcmsmac and our internal driver
>>>> (which
>>>> wl is derived from as well). Would you be able to make an mmiotrace
>>>> loading
>>>> wl and brcmsmac.
>>>
>>> Arend,
>>>
>>> As you noticed earlier, this is a WiFi card with BT. I've checked
>>> siutils.c from SDK 7.14.43.7 (got it from Netgear R8000) and it has
>>> three BCM4313 workarounds:
>>>
>>>
>>> 1) si_doattach
>>> SI_MSG(("Applying 4313 WARs\n"));
>>> si_pmu_chipcontrol(sih, 0, CCTRL_4313_12MA_LED_DRIVE,
>>> CCTRL_4313_12MA_LED_DRIVE);
>>>
>>> It's already implemented in bcma, see driver_chipcommon_pmu.c
>>>
>>>
>>> 2) si_epa_4313war
>>> /* EPA Fix */
>>> W_REG(sii->osh,&cc->gpiocontrol,
>>> R_REG(sii->osh,&cc->gpiocontrol) | GPIO_CTRL_EPA_EN_MASK);
>>>
>>> This is what you already implement in ai_epa_4313war
>>>
>>>
>>> 3) si_pmu_synth_pwrsw_4313_war
>>> I don't think it's implemented.
>>>
>>>
>>> 4) si_btcombo_p250_4313_war
>>> I also don't think it's implemented
>>>
>>>
>>> The last one (si_btcombo_p250_4313_war) looks promising, the comment
>>> above the function says:
>>> /** WL/BT control for 4313 btcombo boards>= P250 */
>>> I guess you need to re-implement this function and call it somewhere
>>> in brcmsmac.
>>
>> Hi,
>>
>> I just wanted to ask if there is any progress on this issue since I
>> haven't
>> heard anything for a month. Please let me know if you need any additional
>> information.
>
> I had a bit of problem with the mmiotrace files. Well, my (virtual)
> linux machine had as it ended up swapping on my disk and went down the
> drain.
>
> I still wanted to look at items 3) and 4) that Rafal mentioned although
> item 4) does not seems to apply to Michael's 4313 it may help yours. I
> submitted a patch to get counter statistics from the 802.11 core on the
> chip [1] as I am curious whether that will show a possible lead.
>
> Regards,
> Arend

+ links

patch [1] depends on patch [2]

[1]
https://git.kernel.org/cgit/linux/kernel/git/linville/wireless-next.git/commit/drivers/net/wireless/brcm80211?id=3fe33c4ce
[2]
https://git.kernel.org/cgit/linux/kernel/git/linville/wireless-next.git/commit/drivers/net/wireless/brcm80211?id=9146782b1b

2014-11-30 12:04:35

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 26-11-14 10:52, Michael Tokarev wrote:
> I'm sorry this took so long - I was AFK during weekend and had
> to deal with a huge backlog after that. Now it is all sorted.
>
> 23.11.2014 12:43, Arend van Spriel wrote:
>> On 19-11-14 22:00, Michael Tokarev wrote:
> []
>> Well, it shows tx looks ok, but with download there is not much of that
>> going on. At least no large packets. However, I did find some missing
>> pieces related to bt-coex. Given that you device is a wifi-bt combo card
>> that is likely an issue for you. One of the missing pieces looks in
>> sprom for parameters and that is provided by bcma. However, it does not
>> seem to extract bt-coex related stuff. So I have attached a patch based
>> on 3.18-rc5 for bcma that dumps the sprom contents. Could you sent that
>> content to me.
>
> Here we go. I had to replace pr_debug with pr_err - haven't looked yet,
> but the thing is that pr_debug isn't even being compiled into the kernel
> here, all the messages are not present in the compiled modules.

Thanks. Did not find what I was looking for, but I started working on
integrating btcoex related functionality. The attached patch will print
some info so I can focus on the required functionality for your device.
It is based on 3.18-rc5.

Regards,
Arend

> [ 525.693474] bcma: bcmasprom:
> [ 525.693528] bcma:
>
> [ 525.693592] bcma: 2801
> [ 525.693613] bcma: 0000
> [ 525.693659] bcma: 1795
> [ 525.693679] bcma: 103C
> [ 525.693725] bcma: 0070
> [ 525.693746] bcma: EDBE
> [ 525.693791] bcma: 0000
> [ 525.693811] bcma: 2BC4
> [ 525.693856] bcma: 2A64
> [ 525.693877] bcma: 2964
> [ 525.693922] bcma:
>
> [ 525.693938] bcma: 2C64
> [ 525.693984] bcma: 3CE7
> [ 525.694004] bcma: 46FF
> [ 525.694049] bcma: 47FF
> [ 525.694070] bcma: 0C00
> [ 525.694115] bcma: 0820
> [ 525.694136] bcma: 0030
> [ 525.694181] bcma: 1002
> [ 525.694202] bcma: 9F28
> [ 525.694247] bcma: 5D44
> [ 525.694267] bcma:
>
> [ 525.694329] bcma: 8080
> [ 525.694349] bcma: 1D8F
> [ 525.694395] bcma: 0032
> [ 525.694415] bcma: 0100
> [ 525.694461] bcma: DF00
> [ 525.694481] bcma: 71F5
> [ 525.694526] bcma: 8400
> [ 525.694547] bcma: 0083
> [ 525.694592] bcma: 8500
> [ 525.694613] bcma: 2010
> [ 525.694658] bcma:
>
> [ 525.694674] bcma: 0001
> [ 525.694719] bcma: 0000
> [ 525.694740] bcma: 0000
> [ 525.694785] bcma: 0000
> [ 525.694805] bcma: 0000
> [ 525.694850] bcma: 0000
> [ 525.694871] bcma: 0000
> [ 525.694916] bcma: 0000
> [ 525.694937] bcma: 0000
> [ 525.694982] bcma: 0000
> [ 525.695002] bcma:
>
> [ 525.695063] bcma: 0000
> [ 525.695084] bcma: 0000
> [ 525.695129] bcma: 1008
> [ 525.695150] bcma: 0305
> [ 525.695195] bcma: 0000
> [ 525.695215] bcma: 0000
> [ 525.695261] bcma: 0000
> [ 525.695281] bcma: 0000
> [ 525.695326] bcma: 4727
> [ 525.695347] bcma: 8000
> [ 525.695392] bcma:
>
> [ 525.695409] bcma: 0002
> [ 525.695454] bcma: 0000
> [ 525.695474] bcma: 1800
> [ 525.695520] bcma: 1800
> [ 525.695561] bcma: 0000
> [ 525.695610] bcma: 0000
> [ 525.695631] bcma: 0000
> [ 525.695677] bcma: 0000
> [ 525.695698] bcma: 0000
> [ 525.695746] bcma: 0000
> [ 525.695766] bcma:
>
> [ 525.695827] bcma: 0000
> [ 525.695848] bcma: 0000
> [ 525.695893] bcma: 0000
> [ 525.695914] bcma: 0000
> [ 525.695961] bcma: 5372
> [ 525.695982] bcma: 1107
> [ 525.696027] bcma: 2201
> [ 525.696048] bcma: 0040
> [ 525.696093] bcma: 0884
> [ 525.696116] bcma: 0000
> [ 525.696161] bcma:
>
> [ 525.696178] bcma: E006
> [ 525.696223] bcma: E659
> [ 525.696244] bcma: 5F5A
> [ 525.696290] bcma: 5856
> [ 525.696310] bcma: 0001
> [ 525.696356] bcma: FFFF
> [ 525.696376] bcma: 83FF
> [ 525.696422] bcma: FFFF
> [ 525.696443] bcma: 0003
> [ 525.696488] bcma: 0202
> [ 525.696508] bcma:
>
> [ 525.696570] bcma: FFFF
> [ 525.696590] bcma: 0011
> [ 525.698381] bcma: 017A
> [ 525.698402] bcma: 0000
> [ 525.700181] bcma: 0000
> [ 525.700202] bcma: 0000
> [ 525.701936] bcma: 0000
> [ 525.701957] bcma: 0201
> [ 525.703650] bcma: 0000
> [ 525.703672] bcma: 7800
> [ 525.705278] bcma:
>
> [ 525.706808] bcma: 6410
> [ 525.708296] bcma: E398
> [ 525.708318] bcma: 0008
> [ 525.709774] bcma: 0000
> [ 525.709796] bcma: 0000
> [ 525.711186] bcma: 0000
> [ 525.711207] bcma: 0044
> [ 525.712532] bcma: 2400
> [ 525.712556] bcma: FCF7
> [ 525.713867] bcma: 0089
> [ 525.713888] bcma:
>
> [ 525.716500] bcma: 0000
> [ 525.716524] bcma: 0000
> [ 525.717834] bcma: 0000
> [ 525.717855] bcma: 0000
> [ 525.719195] bcma: 0000
> [ 525.719217] bcma: 0000
> [ 525.720530] bcma: 0000
> [ 525.720551] bcma: 0000
> [ 525.721862] bcma: 0000
> [ 525.721882] bcma: 0000
> [ 525.723176] bcma:
>
> [ 525.724400] bcma: 0000
> [ 525.725678] bcma: 0000
> [ 525.725699] bcma: 0048
> [ 525.726996] bcma: FED2
> [ 525.727017] bcma: 15D9
> [ 525.728308] bcma: FAC6
> [ 525.728329] bcma: 0000
> [ 525.729642] bcma: 0000
> [ 525.729664] bcma: 0000
> [ 525.730958] bcma: 0000
> [ 525.730978] bcma:
>
> [ 525.733526] bcma: 0000
> [ 525.733549] bcma: 0000
> [ 525.734827] bcma: 0000
> [ 525.734848] bcma: 0000
> [ 525.736155] bcma: 0000
> [ 525.736179] bcma: 0000
> [ 525.737466] bcma: 0000
> [ 525.737487] bcma: 0000
> [ 525.738764] bcma: 0000
> [ 525.738785] bcma: 0000
> [ 525.740049] bcma:
>
> [ 525.741240] bcma: 0000
> [ 525.742501] bcma: 0000
> [ 525.742522] bcma: 0000
> [ 525.743806] bcma: 0000
> [ 525.743827] bcma: 0000
> [ 525.745111] bcma: 0000
> [ 525.745132] bcma: 0000
> [ 525.746433] bcma: 0000
> [ 525.746456] bcma: 0000
> [ 525.747725] bcma: 0000
> [ 525.747746] bcma:
>
> [ 525.750251] bcma: 0000
> [ 525.750272] bcma: 0000
> [ 525.751532] bcma: 0000
> [ 525.751553] bcma: 0000
> [ 525.752847] bcma: 0000
> [ 525.752871] bcma: 0000
> [ 525.754150] bcma: 0000
> [ 525.754171] bcma: 0000
> [ 525.755441] bcma: 0000
> [ 525.755462] bcma: 0000
> [ 525.756717] bcma:
>
> [ 525.757900] bcma: 0000
> [ 525.759148] bcma: 0000
> [ 525.759170] bcma: 0000
> [ 525.760436] bcma: 0000
> [ 525.760457] bcma: 0000
> [ 525.761720] bcma: 0000
> [ 525.761741] bcma: 0000
> [ 525.763023] bcma: 0000
> [ 525.763047] bcma: 0000
> [ 525.764301] bcma: 0000
> [ 525.764321] bcma:
>
> [ 525.766790] bcma: 0000
> [ 525.766813] bcma: 1111
> [ 525.768057] bcma: 1111
> [ 525.768078] bcma: 0000
> [ 525.769355] bcma: 0000
> [ 525.769378] bcma: 0000
> [ 525.770631] bcma: 0000
> [ 525.770652] bcma: 0000
> [ 525.771898] bcma: 0000
> [ 525.771919] bcma: 2222
> [ 525.773158] bcma:
>
> [ 525.774325] bcma: 3222
> [ 525.775540] bcma: 0000
> [ 525.775561] bcma: 0000
> [ 525.776816] bcma: 0000
> [ 525.776840] bcma: 0000
> [ 525.778089] bcma: 0000
> [ 525.778110] bcma: 0000
> [ 525.779355] bcma: 0000
> [ 525.779380] bcma: 0000
> [ 525.780600] bcma: 0000
> [ 525.780621] bcma:
>
> [ 525.783015] bcma: 0000
> [ 525.783038] bcma: 0000
> [ 525.784247] bcma: 0000
> [ 525.784268] bcma: 0000
> [ 525.785500] bcma: 0000
> [ 525.785521] bcma: 0000
> [ 525.786759] bcma: 0000
> [ 525.786781] bcma: 0000
> [ 525.787995] bcma: 0000
> [ 525.788016] bcma: 0000
> [ 525.789217] bcma:
>
> [ 525.790337] bcma: 0000
> [ 525.791505] bcma: 0000
> [ 525.791525] bcma: 0000
> [ 525.792740] bcma: 0000
> [ 525.792765] bcma: 0000
> [ 525.793965] bcma: 0000
> [ 525.793986] bcma: 0000
> [ 525.795168] bcma: 0000
> [ 525.795189] bcma: 0000
> [ 525.796375] bcma: 0000
> [ 525.796399] bcma:
>
> [ 525.798682] bcma: 0000
> [ 525.798703] bcma: 0000
> [ 525.799885] bcma: 0000
> [ 525.799906] bcma: 0000
> [ 525.801038] bcma: 0000
> [ 525.801058] bcma: 0000
> [ 525.802177] bcma: 0000
> [ 525.802197] bcma: 0000
> [ 525.803320] bcma: 0000
> [ 525.803340] bcma: 0000
> [ 525.804433] bcma:
>
> [ 525.805460] bcma: 0000
> [ 525.806547] bcma: 0000
> [ 525.806567] bcma: 0000
> [ 525.807671] bcma: 0000
> [ 525.807691] bcma: 0000
> [ 525.808777] bcma: 0000
> [ 525.808796] bcma: 0000
> [ 525.809899] bcma: 0000
> [ 525.809919] bcma: 0000
> [ 525.821789] bcma: bus0: Bus registered
>
> Thanks,
>
> /mjt
>


Attachments:
0001-brcmsmac-obtain-more-btcoex-related-details.patch (9.28 kB)

2014-11-19 09:04:33

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

18.11.2014 01:36, Maximilian Engelhardt wrote:
[]
> I just wanted to ask if there is any progress on this issue since I haven't
> heard anything for a month. Please let me know if you need any additional
> information.

I've no idea if there's any progress. Meanwhile I've an easy way of
testing of my brcm4313 card in a mini-itx board with mini-PCIe slot.
It works rather nicely and the stalls are easy to trigger.
Running 3.16 kernel right now, tried to d/load a file from the
AP, -- boom, it stalled after 77Kb.

Since the previous discussion apparently ended prematurely and no patches
to try emerged, I don't have anything to try on it...

Thanks,

/mjt

2014-11-23 09:43:09

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 19-11-14 22:00, Michael Tokarev wrote:
> 19.11.2014 22:58, Michael Tokarev wrote:
>> 19.11.2014 20:54, Arend van Spriel wrote:
> []
>>> I submitted two patches upstream and additionally I have attached two other that are still under review. Could you try these patches and sent me the content of the two debugfs files 'macstat' and 'hardware' after a stall has occurred.
>>
>> You didn't tell which kernel it is based on. So I tried it on 3.16,
>
> Ok, I misunderstood you apparently, -- I only tried 2 patches,
> while I should try all 4. So here it goes.
>
> The hardware info again:
>
>> chipnum 0x4313
>> chiprev 0x1
>> chippackage 0x8
>> corerev 0x18
>> boardid 0x1795
>> boardvendor 0x103c
>> boardrev P107
>> boardflags 0x402201
>> boardflags2 0x884
>> ucoderev 0x262032c
>> radiorev 0x1
>> phytype 0x8
>> phyrev 0x1
>> anarev 0xa
>> nvramrev 8
>
> Macstat:
>
> txallfrm: 287
> txrtsfrm: 118
> txctsfrm: 25
> txackfrm: 60
> txdnlfrm: 0
> txbcnfrm: 0
> txfunfl[8]: 0 0 0 0 0 0 0 0
> txtplunfl: 0
> txphyerr: 0
> pktengrxducast: 0
> pktengrxdmcast: 0
> rxfrmtoolong: 330
> rxfrmtooshrt: 16
> rxinvmachdr: 722
> rxbadfcs: 4306
> rxbadplcp: 7257
> rxcrsglitch: 61757
> rxstrt: 6667
> rxdfrmucastmbss: 41
> rxmfrmucastmbss: 25
> rxcfrmucast: 116
> rxrtsucast: 0
> rxctsucast: 59
> rxackucast: 19
> rxdfrmocast: 70
> rxmfrmocast: 84
> rxcfrmocast: 211
> rxrtsocast: 3
> rxctsocast: 20
> rxdfrmmcast: 9
> rxmfrmmcast: 1486
> rxcfrmmcast: 0
> rxbeaconmbss: 377
> rxdfrmucastobss: 0
> rxbeaconobss: 1086
> rxrsptmout: 94
> bcntxcancl: 0
> rxf0ovfl: 0
> rxf1ovfl: 0
> rxf2ovfl: 0
> txsfovfl: 0
> pmqovfl: 0
> rxcgprqfrm: 0
> rxcgprsqovfl: 0
> txcgprsfail: 0
> txcgprssuc: 0
> prs_timeout: 0
> rxnack: 0
> frmscons: 0
> txnack: 0
> txglitch_nack: 38
> txburst: 4
> bphy_rxcrsglitch: 2
> phywatchdog: 0
> bphy_badplcp: 0
>
>
> As far as I can see, the stats are never updated during stall,
> no numbers are changing, at least while the download is waiting
> for the next packet. Sometimes wpa_supplicant does something
> little, so some stats gets updated, eg, this is how it looks like
> after about 2..3 minutes:
>
> txallfrm: 420
> txrtsfrm: 201
> txctsfrm: 25
> txackfrm: 69
> txdnlfrm: 0
> txbcnfrm: 0
> txfunfl[8]: 0 0 0 0 0 0 0 0
> txtplunfl: 0
> txphyerr: 0
> pktengrxducast: 0
> pktengrxdmcast: 0
> rxfrmtoolong: 1908
> rxfrmtooshrt: 73
> rxinvmachdr: 4115
> rxbadfcs: 15064
> rxbadplcp: 42368
> rxcrsglitch: 36620
> rxstrt: 26393
> rxdfrmucastmbss: 48
> rxmfrmucastmbss: 27
> rxcfrmucast: 158
> rxrtsucast: 0
> rxctsucast: 92
> rxackucast: 25
> rxdfrmocast: 113
> rxmfrmocast: 390
> rxcfrmocast: 962
> rxrtsocast: 38
> rxctsocast: 59
> rxdfrmmcast: 48
> rxmfrmmcast: 7681
> rxcfrmmcast: 0
> rxbeaconmbss: 1505
> rxdfrmucastobss: 0
> rxbeaconobss: 6059
> rxrsptmout: 171
> bcntxcancl: 0
> rxf0ovfl: 0
> rxf1ovfl: 0
> rxf2ovfl: 0
> txsfovfl: 0
> pmqovfl: 0
> rxcgprqfrm: 0
> rxcgprsqovfl: 0
> txcgprsfail: 0
> txcgprssuc: 0
> prs_timeout: 0
> rxnack: 0
> frmscons: 0
> txnack: 0
> txglitch_nack: 41
> txburst: 4
> bphy_rxcrsglitch: 5
> phywatchdog: 0
> bphy_badplcp: 0
>
>
> This is with 3.18-tobe kernel (current Linus git).
>
> Dunno if this is helpful or not...

Well, it shows tx looks ok, but with download there is not much of that
going on. At least no large packets. However, I did find some missing
pieces related to bt-coex. Given that you device is a wifi-bt combo card
that is likely an issue for you. One of the missing pieces looks in
sprom for parameters and that is provided by bcma. However, it does not
seem to extract bt-coex related stuff. So I have attached a patch based
on 3.18-rc5 for bcma that dumps the sprom contents. Could you sent that
content to me.

Regards,
Arend

> Thanks,
>
> /mjt
>


Attachments:
0001-bcma-dump-raw-sprom-content-for-debugging.patch (981.00 B)

2014-11-19 17:54:25

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 11/19/14 10:04, Michael Tokarev wrote:
> 18.11.2014 01:36, Maximilian Engelhardt wrote:
> []
>> I just wanted to ask if there is any progress on this issue since I haven't
>> heard anything for a month. Please let me know if you need any additional
>> information.
>
> I've no idea if there's any progress. Meanwhile I've an easy way of
> testing of my brcm4313 card in a mini-itx board with mini-PCIe slot.
> It works rather nicely and the stalls are easy to trigger.
> Running 3.16 kernel right now, tried to d/load a file from the
> AP, -- boom, it stalled after 77Kb.
>
> Since the previous discussion apparently ended prematurely and no patches
> to try emerged, I don't have anything to try on it...

In our last email exchange I got the impression you switch to Intel
board and did not want to keep replacing cards for testing. Nice to hear
you have an alternative setup for this and I assume are willing to do
some testing.

I submitted two patches upstream and additionally I have attached two
other that are still under review. Could you try these patches and sent
me the content of the two debugfs files 'macstat' and 'hardware' after a
stall has occurred.

Regards,
Arend


Attachments:
0001-brcmutil-add-helper-function-to-format-board-revisio.patch (2.00 kB)
0002-brcmsmac-extend-hardware-info-shown-in-debugfs.patch (2.43 kB)
Download all attachments

2014-11-17 22:44:32

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Thursday 09 October 2014 10:21:12 Rafał Miłecki wrote:
> On 9 October 2014 09:52, Arend van Spriel <[email protected]> wrote:
> > I have been staring at differences brcmsmac and our internal driver (which
> > wl is derived from as well). Would you be able to make an mmiotrace
> > loading
> > wl and brcmsmac.
>
> Arend,
>
> As you noticed earlier, this is a WiFi card with BT. I've checked
> siutils.c from SDK 7.14.43.7 (got it from Netgear R8000) and it has
> three BCM4313 workarounds:
>
>
> 1) si_doattach
> SI_MSG(("Applying 4313 WARs\n"));
> si_pmu_chipcontrol(sih, 0, CCTRL_4313_12MA_LED_DRIVE,
> CCTRL_4313_12MA_LED_DRIVE);
>
> It's already implemented in bcma, see driver_chipcommon_pmu.c
>
>
> 2) si_epa_4313war
> /* EPA Fix */
> W_REG(sii->osh, &cc->gpiocontrol,
> R_REG(sii->osh, &cc->gpiocontrol) | GPIO_CTRL_EPA_EN_MASK);
>
> This is what you already implement in ai_epa_4313war
>
>
> 3) si_pmu_synth_pwrsw_4313_war
> I don't think it's implemented.
>
>
> 4) si_btcombo_p250_4313_war
> I also don't think it's implemented
>
>
> The last one (si_btcombo_p250_4313_war) looks promising, the comment
> above the function says:
> /** WL/BT control for 4313 btcombo boards >= P250 */
> I guess you need to re-implement this function and call it somewhere
> in brcmsmac.

Hi,

I just wanted to ask if there is any progress on this issue since I haven't
heard anything for a month. Please let me know if you need any additional
information.

Greetings,
Maxi


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-11-19 19:58:37

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

19.11.2014 20:54, Arend van Spriel wrote:
[]
> In our last email exchange I got the impression you switch to Intel board and did not want to keep replacing cards for testing.

I especially wrote that I have several days to try things out and
if you'll be quick it will be possible for me to test things.
You never replied before now (which is some more months later).

> Nice to hear you have an alternative setup for this and I assume are willing to do some testing.
>
> I submitted two patches upstream and additionally I have attached two other that are still under review. Could you try these patches and sent me the content of the two debugfs files 'macstat' and 'hardware' after a stall has occurred.

You didn't tell which kernel it is based on. So I tried it on 3.16,
ofcourse the patches didn't apply so I hand-edited the debug
printf in drivers/net/wireless/brcm80211/brcmsmac/debug.c (in
3.16 it didn't use seq_printf yet). So now I have a `hardware'
file (in brcmsmac/bcma0:0/ subdir in debugfs), but not
macstat. Here's the contents `hardware' one:

chipnum 0x4313
chiprev 0x1
chippackage 0x8
corerev 0x18
boardid 0x1795
boardvendor 0x103c
boardrev P107
boardflags 0x402201
boardflags2 0x884
ucoderev 0x262032c
radiorev 0x1
phytype 0x8
phyrev 0x1
anarev 0xa
nvramrev 8


Since there's no macstats, I guess it is not very useful,
so before digging for too deep, I ask which kernel do you
want me to try here.

Thanks,

/mjt

2014-11-19 21:00:32

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

19.11.2014 22:58, Michael Tokarev wrote:
> 19.11.2014 20:54, Arend van Spriel wrote:
[]
>> I submitted two patches upstream and additionally I have attached two other that are still under review. Could you try these patches and sent me the content of the two debugfs files 'macstat' and 'hardware' after a stall has occurred.
>
> You didn't tell which kernel it is based on. So I tried it on 3.16,

Ok, I misunderstood you apparently, -- I only tried 2 patches,
while I should try all 4. So here it goes.

The hardware info again:

> chipnum 0x4313
> chiprev 0x1
> chippackage 0x8
> corerev 0x18
> boardid 0x1795
> boardvendor 0x103c
> boardrev P107
> boardflags 0x402201
> boardflags2 0x884
> ucoderev 0x262032c
> radiorev 0x1
> phytype 0x8
> phyrev 0x1
> anarev 0xa
> nvramrev 8

Macstat:

txallfrm: 287
txrtsfrm: 118
txctsfrm: 25
txackfrm: 60
txdnlfrm: 0
txbcnfrm: 0
txfunfl[8]: 0 0 0 0 0 0 0 0
txtplunfl: 0
txphyerr: 0
pktengrxducast: 0
pktengrxdmcast: 0
rxfrmtoolong: 330
rxfrmtooshrt: 16
rxinvmachdr: 722
rxbadfcs: 4306
rxbadplcp: 7257
rxcrsglitch: 61757
rxstrt: 6667
rxdfrmucastmbss: 41
rxmfrmucastmbss: 25
rxcfrmucast: 116
rxrtsucast: 0
rxctsucast: 59
rxackucast: 19
rxdfrmocast: 70
rxmfrmocast: 84
rxcfrmocast: 211
rxrtsocast: 3
rxctsocast: 20
rxdfrmmcast: 9
rxmfrmmcast: 1486
rxcfrmmcast: 0
rxbeaconmbss: 377
rxdfrmucastobss: 0
rxbeaconobss: 1086
rxrsptmout: 94
bcntxcancl: 0
rxf0ovfl: 0
rxf1ovfl: 0
rxf2ovfl: 0
txsfovfl: 0
pmqovfl: 0
rxcgprqfrm: 0
rxcgprsqovfl: 0
txcgprsfail: 0
txcgprssuc: 0
prs_timeout: 0
rxnack: 0
frmscons: 0
txnack: 0
txglitch_nack: 38
txburst: 4
bphy_rxcrsglitch: 2
phywatchdog: 0
bphy_badplcp: 0


As far as I can see, the stats are never updated during stall,
no numbers are changing, at least while the download is waiting
for the next packet. Sometimes wpa_supplicant does something
little, so some stats gets updated, eg, this is how it looks like
after about 2..3 minutes:

txallfrm: 420
txrtsfrm: 201
txctsfrm: 25
txackfrm: 69
txdnlfrm: 0
txbcnfrm: 0
txfunfl[8]: 0 0 0 0 0 0 0 0
txtplunfl: 0
txphyerr: 0
pktengrxducast: 0
pktengrxdmcast: 0
rxfrmtoolong: 1908
rxfrmtooshrt: 73
rxinvmachdr: 4115
rxbadfcs: 15064
rxbadplcp: 42368
rxcrsglitch: 36620
rxstrt: 26393
rxdfrmucastmbss: 48
rxmfrmucastmbss: 27
rxcfrmucast: 158
rxrtsucast: 0
rxctsucast: 92
rxackucast: 25
rxdfrmocast: 113
rxmfrmocast: 390
rxcfrmocast: 962
rxrtsocast: 38
rxctsocast: 59
rxdfrmmcast: 48
rxmfrmmcast: 7681
rxcfrmmcast: 0
rxbeaconmbss: 1505
rxdfrmucastobss: 0
rxbeaconobss: 6059
rxrsptmout: 171
bcntxcancl: 0
rxf0ovfl: 0
rxf1ovfl: 0
rxf2ovfl: 0
txsfovfl: 0
pmqovfl: 0
rxcgprqfrm: 0
rxcgprsqovfl: 0
txcgprsfail: 0
txcgprssuc: 0
prs_timeout: 0
rxnack: 0
frmscons: 0
txnack: 0
txglitch_nack: 41
txburst: 4
bphy_rxcrsglitch: 5
phywatchdog: 0
bphy_badplcp: 0


This is with 3.18-tobe kernel (current Linus git).

Dunno if this is helpful or not...

Thanks,

/mjt

2014-11-26 09:52:31

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

I'm sorry this took so long - I was AFK during weekend and had
to deal with a huge backlog after that. Now it is all sorted.

23.11.2014 12:43, Arend van Spriel wrote:
> On 19-11-14 22:00, Michael Tokarev wrote:
[]
> Well, it shows tx looks ok, but with download there is not much of that
> going on. At least no large packets. However, I did find some missing
> pieces related to bt-coex. Given that you device is a wifi-bt combo card
> that is likely an issue for you. One of the missing pieces looks in
> sprom for parameters and that is provided by bcma. However, it does not
> seem to extract bt-coex related stuff. So I have attached a patch based
> on 3.18-rc5 for bcma that dumps the sprom contents. Could you sent that
> content to me.

Here we go. I had to replace pr_debug with pr_err - haven't looked yet,
but the thing is that pr_debug isn't even being compiled into the kernel
here, all the messages are not present in the compiled modules.

[ 525.693474] bcma: bcmasprom:
[ 525.693528] bcma:

[ 525.693592] bcma: 2801
[ 525.693613] bcma: 0000
[ 525.693659] bcma: 1795
[ 525.693679] bcma: 103C
[ 525.693725] bcma: 0070
[ 525.693746] bcma: EDBE
[ 525.693791] bcma: 0000
[ 525.693811] bcma: 2BC4
[ 525.693856] bcma: 2A64
[ 525.693877] bcma: 2964
[ 525.693922] bcma:

[ 525.693938] bcma: 2C64
[ 525.693984] bcma: 3CE7
[ 525.694004] bcma: 46FF
[ 525.694049] bcma: 47FF
[ 525.694070] bcma: 0C00
[ 525.694115] bcma: 0820
[ 525.694136] bcma: 0030
[ 525.694181] bcma: 1002
[ 525.694202] bcma: 9F28
[ 525.694247] bcma: 5D44
[ 525.694267] bcma:

[ 525.694329] bcma: 8080
[ 525.694349] bcma: 1D8F
[ 525.694395] bcma: 0032
[ 525.694415] bcma: 0100
[ 525.694461] bcma: DF00
[ 525.694481] bcma: 71F5
[ 525.694526] bcma: 8400
[ 525.694547] bcma: 0083
[ 525.694592] bcma: 8500
[ 525.694613] bcma: 2010
[ 525.694658] bcma:

[ 525.694674] bcma: 0001
[ 525.694719] bcma: 0000
[ 525.694740] bcma: 0000
[ 525.694785] bcma: 0000
[ 525.694805] bcma: 0000
[ 525.694850] bcma: 0000
[ 525.694871] bcma: 0000
[ 525.694916] bcma: 0000
[ 525.694937] bcma: 0000
[ 525.694982] bcma: 0000
[ 525.695002] bcma:

[ 525.695063] bcma: 0000
[ 525.695084] bcma: 0000
[ 525.695129] bcma: 1008
[ 525.695150] bcma: 0305
[ 525.695195] bcma: 0000
[ 525.695215] bcma: 0000
[ 525.695261] bcma: 0000
[ 525.695281] bcma: 0000
[ 525.695326] bcma: 4727
[ 525.695347] bcma: 8000
[ 525.695392] bcma:

[ 525.695409] bcma: 0002
[ 525.695454] bcma: 0000
[ 525.695474] bcma: 1800
[ 525.695520] bcma: 1800
[ 525.695561] bcma: 0000
[ 525.695610] bcma: 0000
[ 525.695631] bcma: 0000
[ 525.695677] bcma: 0000
[ 525.695698] bcma: 0000
[ 525.695746] bcma: 0000
[ 525.695766] bcma:

[ 525.695827] bcma: 0000
[ 525.695848] bcma: 0000
[ 525.695893] bcma: 0000
[ 525.695914] bcma: 0000
[ 525.695961] bcma: 5372
[ 525.695982] bcma: 1107
[ 525.696027] bcma: 2201
[ 525.696048] bcma: 0040
[ 525.696093] bcma: 0884
[ 525.696116] bcma: 0000
[ 525.696161] bcma:

[ 525.696178] bcma: E006
[ 525.696223] bcma: E659
[ 525.696244] bcma: 5F5A
[ 525.696290] bcma: 5856
[ 525.696310] bcma: 0001
[ 525.696356] bcma: FFFF
[ 525.696376] bcma: 83FF
[ 525.696422] bcma: FFFF
[ 525.696443] bcma: 0003
[ 525.696488] bcma: 0202
[ 525.696508] bcma:

[ 525.696570] bcma: FFFF
[ 525.696590] bcma: 0011
[ 525.698381] bcma: 017A
[ 525.698402] bcma: 0000
[ 525.700181] bcma: 0000
[ 525.700202] bcma: 0000
[ 525.701936] bcma: 0000
[ 525.701957] bcma: 0201
[ 525.703650] bcma: 0000
[ 525.703672] bcma: 7800
[ 525.705278] bcma:

[ 525.706808] bcma: 6410
[ 525.708296] bcma: E398
[ 525.708318] bcma: 0008
[ 525.709774] bcma: 0000
[ 525.709796] bcma: 0000
[ 525.711186] bcma: 0000
[ 525.711207] bcma: 0044
[ 525.712532] bcma: 2400
[ 525.712556] bcma: FCF7
[ 525.713867] bcma: 0089
[ 525.713888] bcma:

[ 525.716500] bcma: 0000
[ 525.716524] bcma: 0000
[ 525.717834] bcma: 0000
[ 525.717855] bcma: 0000
[ 525.719195] bcma: 0000
[ 525.719217] bcma: 0000
[ 525.720530] bcma: 0000
[ 525.720551] bcma: 0000
[ 525.721862] bcma: 0000
[ 525.721882] bcma: 0000
[ 525.723176] bcma:

[ 525.724400] bcma: 0000
[ 525.725678] bcma: 0000
[ 525.725699] bcma: 0048
[ 525.726996] bcma: FED2
[ 525.727017] bcma: 15D9
[ 525.728308] bcma: FAC6
[ 525.728329] bcma: 0000
[ 525.729642] bcma: 0000
[ 525.729664] bcma: 0000
[ 525.730958] bcma: 0000
[ 525.730978] bcma:

[ 525.733526] bcma: 0000
[ 525.733549] bcma: 0000
[ 525.734827] bcma: 0000
[ 525.734848] bcma: 0000
[ 525.736155] bcma: 0000
[ 525.736179] bcma: 0000
[ 525.737466] bcma: 0000
[ 525.737487] bcma: 0000
[ 525.738764] bcma: 0000
[ 525.738785] bcma: 0000
[ 525.740049] bcma:

[ 525.741240] bcma: 0000
[ 525.742501] bcma: 0000
[ 525.742522] bcma: 0000
[ 525.743806] bcma: 0000
[ 525.743827] bcma: 0000
[ 525.745111] bcma: 0000
[ 525.745132] bcma: 0000
[ 525.746433] bcma: 0000
[ 525.746456] bcma: 0000
[ 525.747725] bcma: 0000
[ 525.747746] bcma:

[ 525.750251] bcma: 0000
[ 525.750272] bcma: 0000
[ 525.751532] bcma: 0000
[ 525.751553] bcma: 0000
[ 525.752847] bcma: 0000
[ 525.752871] bcma: 0000
[ 525.754150] bcma: 0000
[ 525.754171] bcma: 0000
[ 525.755441] bcma: 0000
[ 525.755462] bcma: 0000
[ 525.756717] bcma:

[ 525.757900] bcma: 0000
[ 525.759148] bcma: 0000
[ 525.759170] bcma: 0000
[ 525.760436] bcma: 0000
[ 525.760457] bcma: 0000
[ 525.761720] bcma: 0000
[ 525.761741] bcma: 0000
[ 525.763023] bcma: 0000
[ 525.763047] bcma: 0000
[ 525.764301] bcma: 0000
[ 525.764321] bcma:

[ 525.766790] bcma: 0000
[ 525.766813] bcma: 1111
[ 525.768057] bcma: 1111
[ 525.768078] bcma: 0000
[ 525.769355] bcma: 0000
[ 525.769378] bcma: 0000
[ 525.770631] bcma: 0000
[ 525.770652] bcma: 0000
[ 525.771898] bcma: 0000
[ 525.771919] bcma: 2222
[ 525.773158] bcma:

[ 525.774325] bcma: 3222
[ 525.775540] bcma: 0000
[ 525.775561] bcma: 0000
[ 525.776816] bcma: 0000
[ 525.776840] bcma: 0000
[ 525.778089] bcma: 0000
[ 525.778110] bcma: 0000
[ 525.779355] bcma: 0000
[ 525.779380] bcma: 0000
[ 525.780600] bcma: 0000
[ 525.780621] bcma:

[ 525.783015] bcma: 0000
[ 525.783038] bcma: 0000
[ 525.784247] bcma: 0000
[ 525.784268] bcma: 0000
[ 525.785500] bcma: 0000
[ 525.785521] bcma: 0000
[ 525.786759] bcma: 0000
[ 525.786781] bcma: 0000
[ 525.787995] bcma: 0000
[ 525.788016] bcma: 0000
[ 525.789217] bcma:

[ 525.790337] bcma: 0000
[ 525.791505] bcma: 0000
[ 525.791525] bcma: 0000
[ 525.792740] bcma: 0000
[ 525.792765] bcma: 0000
[ 525.793965] bcma: 0000
[ 525.793986] bcma: 0000
[ 525.795168] bcma: 0000
[ 525.795189] bcma: 0000
[ 525.796375] bcma: 0000
[ 525.796399] bcma:

[ 525.798682] bcma: 0000
[ 525.798703] bcma: 0000
[ 525.799885] bcma: 0000
[ 525.799906] bcma: 0000
[ 525.801038] bcma: 0000
[ 525.801058] bcma: 0000
[ 525.802177] bcma: 0000
[ 525.802197] bcma: 0000
[ 525.803320] bcma: 0000
[ 525.803340] bcma: 0000
[ 525.804433] bcma:

[ 525.805460] bcma: 0000
[ 525.806547] bcma: 0000
[ 525.806567] bcma: 0000
[ 525.807671] bcma: 0000
[ 525.807691] bcma: 0000
[ 525.808777] bcma: 0000
[ 525.808796] bcma: 0000
[ 525.809899] bcma: 0000
[ 525.809919] bcma: 0000
[ 525.821789] bcma: bus0: Bus registered

Thanks,

/mjt

2014-12-21 11:38:15

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/21/14 11:27, Michael Tokarev wrote:
> [73327.029460] brcmsmac bcma0:1: hardware: SECI

Well,

The piece of info is small, but it is there ;-)

Thanks,
Arend

2014-12-21 14:24:32

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Sunday 21 December 2014 15:13:50 Arend van Spriel wrote:
> On 12/21/14 15:08, Maximilian Engelhardt wrote:
> > On Sunday 21 December 2014 11:12:40 Arend van Spriel wrote:
> >> On 12/21/14 10:58, Michael Tokarev wrote:
> >>> 16.12.2014 19:51, Arend van Spriel wrote:
> >>>> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please
> >>>> remove that call as it causes endless recursion and eventually reboot.>
> >>>
> >>> Ok, that was easy. Now it loads, but wifi link still
> >>> does not work, stalling as before. What we're looking
> >>> at now?
> >>
> >> The patch is just to provide me with extra bt-coex related information
> >> in the kernel log. So if you can provide that to me I have to info
> >> needed to look in the proprietary code base to determine what is missing.
> >>
> >> Regards,
> >> Arend
> >
> > Hi Arend,
>
> > here is the output from my card:
> Thanks. It shows you have have the same bt-coex version as Michael. I am
> not familiar with bluetooth side of things. Are you both using bluetooth
> on 4313?
>
> Regards,
> Arend

I don't know. I think I have Bluetooth somehow enabled but I'm not really
using it. I definitely don't have any Bluetooth devices connected. I could try
to unload/disable Bluetooth it to see if it makes any difference.

Greetings,
Maxi


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-12-03 12:43:37

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/02/14 22:40, Michael Tokarev wrote:
> 30.11.2014 15:04, Arend van Spriel wrote:
>
>> Thanks. Did not find what I was looking for, but I started working on
>> integrating btcoex related functionality. The attached patch will print
>> some info so I can focus on the required functionality for your device.
>> It is based on 3.18-rc5.
>
> With this patch applied against 3.18-rc5, the machine instantly reboots
> once brcmsmac module is loaded. I'm still debugging this.

Argh. Probably the register access I added end up in limbo land or some
other stupid mistake. I will double check my patch.

Regards,
Arend

> Thanks,
>
> /mjt


2014-12-02 21:40:16

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

30.11.2014 15:04, Arend van Spriel wrote:

> Thanks. Did not find what I was looking for, but I started working on
> integrating btcoex related functionality. The attached patch will print
> some info so I can focus on the required functionality for your device.
> It is based on 3.18-rc5.

With this patch applied against 3.18-rc5, the machine instantly reboots
once brcmsmac module is loaded. I'm still debugging this.

Thanks,

/mjt

2014-12-16 16:51:13

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/03/14 13:43, Arend van Spriel wrote:
> On 12/02/14 22:40, Michael Tokarev wrote:
>> 30.11.2014 15:04, Arend van Spriel wrote:
>>
>>> Thanks. Did not find what I was looking for, but I started working on
>>> integrating btcoex related functionality. The attached patch will print
>>> some info so I can focus on the required functionality for your device.
>>> It is based on 3.18-rc5.
>>
>> With this patch applied against 3.18-rc5, the machine instantly reboots
>> once brcmsmac module is loaded. I'm still debugging this.

Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please
remove that call as it causes endless recursion and eventually reboot.

Regards,
Arend

> Argh. Probably the register access I added end up in limbo land or some
> other stupid mistake. I will double check my patch.
>
> Regards,
> Arend
>
>> Thanks,
>>
>> /mjt
>


2014-12-21 10:12:43

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/21/14 10:58, Michael Tokarev wrote:
> 16.12.2014 19:51, Arend van Spriel wrote:
>
>> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please remove that call as it causes endless recursion and eventually reboot.
>
> Ok, that was easy. Now it loads, but wifi link still
> does not work, stalling as before. What we're looking
> at now?

The patch is just to provide me with extra bt-coex related information
in the kernel log. So if you can provide that to me I have to info
needed to look in the proprietary code base to determine what is missing.

Regards,
Arend

> (To have a common base, I applied this bt-coex patch to
> 3.18.0 kernel. I can also apply the previously mentioned
> debugging/stats patch too).
>
> Thanks,
>
> /mjt


2014-12-21 09:58:51

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

16.12.2014 19:51, Arend van Spriel wrote:

> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please remove that call as it causes endless recursion and eventually reboot.

Ok, that was easy. Now it loads, but wifi link still
does not work, stalling as before. What we're looking
at now?

(To have a common base, I applied this bt-coex patch to
3.18.0 kernel. I can also apply the previously mentioned
debugging/stats patch too).

Thanks,

/mjt

2014-12-21 14:13:54

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/21/14 15:08, Maximilian Engelhardt wrote:
> On Sunday 21 December 2014 11:12:40 Arend van Spriel wrote:
>> On 12/21/14 10:58, Michael Tokarev wrote:
>>> 16.12.2014 19:51, Arend van Spriel wrote:
>>>> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please
>>>> remove that call as it causes endless recursion and eventually reboot.>
>>> Ok, that was easy. Now it loads, but wifi link still
>>> does not work, stalling as before. What we're looking
>>> at now?
>>
>> The patch is just to provide me with extra bt-coex related information
>> in the kernel log. So if you can provide that to me I have to info
>> needed to look in the proprietary code base to determine what is missing.
>>
>> Regards,
>> Arend
>
> Hi Arend,
>
> here is the output from my card:

Thanks. It shows you have have the same bt-coex version as Michael. I am
not familiar with bluetooth side of things. Are you both using bluetooth
on 4313?

Regards,
Arend

> [ 5167.720041] cfg80211: Calling CRDA to update world regulatory domain
> [ 5167.737243] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
> [ 5167.737271] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
> [ 5167.737290] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
> [ 5167.737324] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
> [ 5167.737407] bcma: bus0: Found rev 8 PMU (capabilities 0x084C3008)
> [ 5167.737417] bcma: bus0: SPROM offset 0x830
> [ 5167.739392] bcma: bcmasprom:
> [ 5167.739396] bcma:
>
> [ 5167.739400] bcma: 2801
> [ 5167.739402] bcma: 0000
> [ 5167.739404] bcma: 0608
> [ 5167.739405] bcma: 14E4
> [ 5167.739408] bcma: 0070
> [ 5167.739409] bcma: EDBE
> [ 5167.739411] bcma: 0000
> [ 5167.739412] bcma: 2BC4
> [ 5167.739414] bcma: 2A64
> [ 5167.739416] bcma: 2964
> [ 5167.739417] bcma:
>
> [ 5167.739419] bcma: 2C64
> [ 5167.739421] bcma: 3CE7
> [ 5167.739422] bcma: 46FF
> [ 5167.739424] bcma: 47FF
> [ 5167.739425] bcma: 0C00
> [ 5167.739427] bcma: 0820
> [ 5167.739429] bcma: 0030
> [ 5167.739430] bcma: 1002
> [ 5167.739432] bcma: 9F28
> [ 5167.739434] bcma: 5D44
> [ 5167.739435] bcma:
>
> [ 5167.739438] bcma: 8080
> [ 5167.739439] bcma: 1D8F
> [ 5167.739441] bcma: 0032
> [ 5167.739442] bcma: 0100
> [ 5167.739444] bcma: DF00
> [ 5167.739445] bcma: 71F5
> [ 5167.739447] bcma: 8400
> [ 5167.739448] bcma: 0083
> [ 5167.739450] bcma: 8500
> [ 5167.739452] bcma: 2010
> [ 5167.739453] bcma:
>
> [ 5167.739455] bcma: 0001
> [ 5167.739457] bcma: 0000
> [ 5167.739458] bcma: 0000
> [ 5167.739460] bcma: 0000
> [ 5167.739461] bcma: 0000
> [ 5167.739463] bcma: 0000
> [ 5167.739464] bcma: 0000
> [ 5167.739466] bcma: 0000
> [ 5167.739467] bcma: 0000
> [ 5167.739469] bcma: 0000
> [ 5167.739470] bcma:
>
> [ 5167.739473] bcma: 0000
> [ 5167.739474] bcma: 0000
> [ 5167.739476] bcma: 1008
> [ 5167.739477] bcma: 0305
> [ 5167.739479] bcma: 0000
> [ 5167.739480] bcma: 0000
> [ 5167.739482] bcma: 0000
> [ 5167.739484] bcma: 0000
> [ 5167.739485] bcma: 4727
> [ 5167.739487] bcma: 8000
> [ 5167.739488] bcma:
>
> [ 5167.739490] bcma: 0002
> [ 5167.739492] bcma: 0000
> [ 5167.739493] bcma: 1F30
> [ 5167.739495] bcma: 1800
> [ 5167.739496] bcma: 0000
> [ 5167.739498] bcma: 0000
> [ 5167.739499] bcma: 0000
> [ 5167.739501] bcma: 0000
> [ 5167.739502] bcma: 0000
> [ 5167.739504] bcma: 0000
> [ 5167.739505] bcma:
>
> [ 5167.739508] bcma: 0000
> [ 5167.739509] bcma: 0000
> [ 5167.739511] bcma: 0000
> [ 5167.739512] bcma: 0000
> [ 5167.739514] bcma: 5372
> [ 5167.739515] bcma: 1109
> [ 5167.739517] bcma: 2201
> [ 5167.739519] bcma: 0040
> [ 5167.739520] bcma: 0884
> [ 5167.739522] bcma: 0000
> [ 5167.739523] bcma:
>
> [ 5167.739525] bcma: C014
> [ 5167.739526] bcma: 3DC1
> [ 5167.739528] bcma: 809D
> [ 5167.739530] bcma: 5856
> [ 5167.739531] bcma: 0001
> [ 5167.739533] bcma: FFFF
> [ 5167.739534] bcma: 83FF
> [ 5167.739536] bcma: FFFF
> [ 5167.739537] bcma: 0003
> [ 5167.739539] bcma: 0202
> [ 5167.739540] bcma:
>
> [ 5167.739543] bcma: FFFF
> [ 5167.739544] bcma: 0011
> [ 5167.739546] bcma: 017A
> [ 5167.739547] bcma: 0000
> [ 5167.739549] bcma: 0000
> [ 5167.739550] bcma: 0000
> [ 5167.739552] bcma: 0000
> [ 5167.739553] bcma: 0201
> [ 5167.739555] bcma: 0000
> [ 5167.739556] bcma: 7800
> [ 5167.739558] bcma:
>
> [ 5167.739559] bcma: 01FF
> [ 5167.739561] bcma: E398
> [ 5167.739563] bcma: 0008
> [ 5167.739564] bcma: 0000
> [ 5167.739566] bcma: 0000
> [ 5167.739568] bcma: 0000
> [ 5167.739569] bcma: 0044
> [ 5167.739571] bcma: 2400
> [ 5167.739572] bcma: FCF7
> [ 5167.739574] bcma: 0089
> [ 5167.739575] bcma:
>
> [ 5167.739578] bcma: 0000
> [ 5167.739579] bcma: 0000
> [ 5167.739581] bcma: 0000
> [ 5167.739582] bcma: 0000
> [ 5167.739584] bcma: 0000
> [ 5167.739585] bcma: 0000
> [ 5167.739587] bcma: 0000
> [ 5167.739588] bcma: 0000
> [ 5167.739590] bcma: 0000
> [ 5167.739591] bcma: 0000
> [ 5167.739593] bcma:
>
> [ 5167.739594] bcma: 0000
> [ 5167.739596] bcma: 0000
> [ 5167.739597] bcma: 0048
> [ 5167.739599] bcma: FED2
> [ 5167.739600] bcma: 15D9
> [ 5167.739602] bcma: FAC6
> [ 5167.739604] bcma: 0000
> [ 5167.739605] bcma: 0000
> [ 5167.739607] bcma: 0000
> [ 5167.739608] bcma: 0000
> [ 5167.739610] bcma:
>
> [ 5167.739612] bcma: 0000
> [ 5167.739614] bcma: 0000
> [ 5167.739615] bcma: 0000
> [ 5167.739617] bcma: 0000
> [ 5167.739618] bcma: 0000
> [ 5167.739620] bcma: 0000
> [ 5167.739622] bcma: 0000
> [ 5167.739623] bcma: 0000
> [ 5167.739625] bcma: 0000
> [ 5167.739626] bcma: 0000
> [ 5167.739627] bcma:
>
> [ 5167.739629] bcma: 0000
> [ 5167.739631] bcma: 0000
> [ 5167.739632] bcma: 0000
> [ 5167.739634] bcma: 0000
> [ 5167.739635] bcma: 0000
> [ 5167.739637] bcma: 0000
> [ 5167.739638] bcma: 0000
> [ 5167.739640] bcma: 0000
> [ 5167.739641] bcma: 0000
> [ 5167.739643] bcma: 0000
> [ 5167.739644] bcma:
>
> [ 5167.739647] bcma: 0000
> [ 5167.739648] bcma: 0000
> [ 5167.739650] bcma: 0000
> [ 5167.739651] bcma: 0000
> [ 5167.739653] bcma: 0000
> [ 5167.739654] bcma: 0000
> [ 5167.739656] bcma: 0000
> [ 5167.739657] bcma: 0000
> [ 5167.739659] bcma: 0000
> [ 5167.739660] bcma: 0000
> [ 5167.739662] bcma:
>
> [ 5167.739663] bcma: 0000
> [ 5167.739665] bcma: 0000
> [ 5167.739666] bcma: 0000
> [ 5167.739668] bcma: 0000
> [ 5167.739669] bcma: 0000
> [ 5167.739671] bcma: 0000
> [ 5167.739672] bcma: 0000
> [ 5167.739674] bcma: 0000
> [ 5167.739676] bcma: 0000
> [ 5167.739677] bcma: 0000
> [ 5167.739679] bcma:
>
> [ 5167.739681] bcma: 0000
> [ 5167.739682] bcma: 1111
> [ 5167.739684] bcma: 1111
> [ 5167.739686] bcma: 0000
> [ 5167.739687] bcma: 0000
> [ 5167.739689] bcma: 0000
> [ 5167.739690] bcma: 0000
> [ 5167.739692] bcma: 0000
> [ 5167.739693] bcma: 0000
> [ 5167.739695] bcma: 2222
> [ 5167.739696] bcma:
>
> [ 5167.739698] bcma: 3222
> [ 5167.739700] bcma: 0000
> [ 5167.739701] bcma: 0000
> [ 5167.739703] bcma: 0000
> [ 5167.739704] bcma: 0000
> [ 5167.739706] bcma: 0000
> [ 5167.739707] bcma: 0000
> [ 5167.739709] bcma: 0000
> [ 5167.739710] bcma: 0000
> [ 5167.739712] bcma: 0000
> [ 5167.739713] bcma:
>
> [ 5167.739716] bcma: 0000
> [ 5167.739717] bcma: 0000
> [ 5167.739719] bcma: 0000
> [ 5167.739720] bcma: 0000
> [ 5167.739722] bcma: 0000
> [ 5167.739723] bcma: 0000
> [ 5167.739725] bcma: 0000
> [ 5167.739726] bcma: 0000
> [ 5167.739728] bcma: 0000
> [ 5167.739729] bcma: 0000
> [ 5167.739731] bcma:
>
> [ 5167.739732] bcma: 0000
> [ 5167.739734] bcma: 0000
> [ 5167.739735] bcma: 0000
> [ 5167.739737] bcma: 0000
> [ 5167.739738] bcma: 0000
> [ 5167.739740] bcma: 0000
> [ 5167.739741] bcma: 0000
> [ 5167.739743] bcma: 0000
> [ 5167.739744] bcma: 0000
> [ 5167.739746] bcma: 0000
> [ 5167.739748] bcma:
>
> [ 5167.739750] bcma: 0000
> [ 5167.739751] bcma: 0000
> [ 5167.739753] bcma: 0000
> [ 5167.739755] bcma: 0000
> [ 5167.739756] bcma: 0000
> [ 5167.739758] bcma: 0000
> [ 5167.739759] bcma: 0000
> [ 5167.739761] bcma: 0000
> [ 5167.739762] bcma: 0000
> [ 5167.739764] bcma: 0000
> [ 5167.739765] bcma:
>
> [ 5167.739767] bcma: 0000
> [ 5167.739768] bcma: 0000
> [ 5167.739770] bcma: 0000
> [ 5167.739772] bcma: 0000
> [ 5167.739773] bcma: 0000
> [ 5167.739775] bcma: 0000
> [ 5167.739776] bcma: 0000
> [ 5167.739778] bcma: 0000
> [ 5167.739779] bcma: 0000
> [ 5167.739782] bcma: bus0: Found SPROM revision 8
> [ 5167.752730] bcma: bus0: GPIO driver not activated
> [ 5167.752738] bcma: bus0: Bus registered
> [ 5167.765209] brcmsmac bcma0:0: mfg 4bf core 812 rev 24 class 0 irq 17
> [ 5167.765319] bcma: bus0: Switched to core: 0x812
> [ 5167.766135] brcmsmac bcma0:0: hardware: SECI
> [ 5167.766559] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [ 5167.786115] cfg80211: World regulatory domain updated:
> [ 5167.786128] cfg80211: DFS Master region: unset
> [ 5167.786131] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 5167.786137] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.786141] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.786144] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.786148] cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.786152] cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
> [ 5167.786155] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
> [ 5167.786159] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.786162] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
> [ 5167.794806] cfg80211: Calling CRDA for country: DE
> [ 5167.810110] cfg80211: Regulatory domain changed to country: DE
> [ 5167.810122] cfg80211: DFS Master region: ETSI
> [ 5167.810125] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 5167.810131] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.810134] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
> [ 5167.810139] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz), (N/A, 2000 mBm), (0 s)
> [ 5167.810142] cfg80211: (5470000 KHz - 5725000 KHz @ 80000 KHz), (N/A, 2698 mBm), (0 s)
> [ 5167.810146] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
>
>
> Greetings,
> Maxi


2014-12-21 17:34:39

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Sunday 21 December 2014 16:03:17 Arend van Spriel wrote:
> On 12/21/14 15:24, Maximilian Engelhardt wrote:
> > On Sunday 21 December 2014 15:13:50 Arend van Spriel wrote:
> >> On 12/21/14 15:08, Maximilian Engelhardt wrote:
> >>> On Sunday 21 December 2014 11:12:40 Arend van Spriel wrote:
> >>>> On 12/21/14 10:58, Michael Tokarev wrote:
> >>>>> 16.12.2014 19:51, Arend van Spriel wrote:
> >>>>>> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please
> >>>>>> remove that call as it causes endless recursion and eventually
> >>>>>> reboot.>
> >>>>>
> >>>>> Ok, that was easy. Now it loads, but wifi link still
> >>>>> does not work, stalling as before. What we're looking
> >>>>> at now?
> >>>>
> >>>> The patch is just to provide me with extra bt-coex related information
> >>>> in the kernel log. So if you can provide that to me I have to info
> >>>> needed to look in the proprietary code base to determine what is
> >>>> missing.
> >>>>
> >>>> Regards,
> >>>> Arend
> >>>
> >>> Hi Arend,
> >>
> >>> here is the output from my card:
> >> Thanks. It shows you have have the same bt-coex version as Michael. I am
> >> not familiar with bluetooth side of things. Are you both using bluetooth
> >> on 4313?
> >>
> >> Regards,
> >> Arend
> >
> > I don't know. I think I have Bluetooth somehow enabled but I'm not really
> > using it. I definitely don't have any Bluetooth devices connected. I could
> > try to unload/disable Bluetooth it to see if it makes any difference.
>
> That would be useful to know.
>

I did a test with all Bluetooth modules unloaded that I could find but
throughput was still very low (about 4 Mbit/s with brcmsmac, my atheros USB
stick archived about 110 Mbit/s).

Greetings,
Maxi


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-12-21 14:08:48

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On Sunday 21 December 2014 11:12:40 Arend van Spriel wrote:
> On 12/21/14 10:58, Michael Tokarev wrote:
> > 16.12.2014 19:51, Arend van Spriel wrote:
> >> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please
> >> remove that call as it causes endless recursion and eventually reboot.>
> > Ok, that was easy. Now it loads, but wifi link still
> > does not work, stalling as before. What we're looking
> > at now?
>
> The patch is just to provide me with extra bt-coex related information
> in the kernel log. So if you can provide that to me I have to info
> needed to look in the proprietary code base to determine what is missing.
>
> Regards,
> Arend

Hi Arend,

here is the output from my card:

[ 5167.720041] cfg80211: Calling CRDA to update world regulatory domain
[ 5167.737243] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[ 5167.737271] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[ 5167.737290] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[ 5167.737324] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[ 5167.737407] bcma: bus0: Found rev 8 PMU (capabilities 0x084C3008)
[ 5167.737417] bcma: bus0: SPROM offset 0x830
[ 5167.739392] bcma: bcmasprom:
[ 5167.739396] bcma:

[ 5167.739400] bcma: 2801
[ 5167.739402] bcma: 0000
[ 5167.739404] bcma: 0608
[ 5167.739405] bcma: 14E4
[ 5167.739408] bcma: 0070
[ 5167.739409] bcma: EDBE
[ 5167.739411] bcma: 0000
[ 5167.739412] bcma: 2BC4
[ 5167.739414] bcma: 2A64
[ 5167.739416] bcma: 2964
[ 5167.739417] bcma:

[ 5167.739419] bcma: 2C64
[ 5167.739421] bcma: 3CE7
[ 5167.739422] bcma: 46FF
[ 5167.739424] bcma: 47FF
[ 5167.739425] bcma: 0C00
[ 5167.739427] bcma: 0820
[ 5167.739429] bcma: 0030
[ 5167.739430] bcma: 1002
[ 5167.739432] bcma: 9F28
[ 5167.739434] bcma: 5D44
[ 5167.739435] bcma:

[ 5167.739438] bcma: 8080
[ 5167.739439] bcma: 1D8F
[ 5167.739441] bcma: 0032
[ 5167.739442] bcma: 0100
[ 5167.739444] bcma: DF00
[ 5167.739445] bcma: 71F5
[ 5167.739447] bcma: 8400
[ 5167.739448] bcma: 0083
[ 5167.739450] bcma: 8500
[ 5167.739452] bcma: 2010
[ 5167.739453] bcma:

[ 5167.739455] bcma: 0001
[ 5167.739457] bcma: 0000
[ 5167.739458] bcma: 0000
[ 5167.739460] bcma: 0000
[ 5167.739461] bcma: 0000
[ 5167.739463] bcma: 0000
[ 5167.739464] bcma: 0000
[ 5167.739466] bcma: 0000
[ 5167.739467] bcma: 0000
[ 5167.739469] bcma: 0000
[ 5167.739470] bcma:

[ 5167.739473] bcma: 0000
[ 5167.739474] bcma: 0000
[ 5167.739476] bcma: 1008
[ 5167.739477] bcma: 0305
[ 5167.739479] bcma: 0000
[ 5167.739480] bcma: 0000
[ 5167.739482] bcma: 0000
[ 5167.739484] bcma: 0000
[ 5167.739485] bcma: 4727
[ 5167.739487] bcma: 8000
[ 5167.739488] bcma:

[ 5167.739490] bcma: 0002
[ 5167.739492] bcma: 0000
[ 5167.739493] bcma: 1F30
[ 5167.739495] bcma: 1800
[ 5167.739496] bcma: 0000
[ 5167.739498] bcma: 0000
[ 5167.739499] bcma: 0000
[ 5167.739501] bcma: 0000
[ 5167.739502] bcma: 0000
[ 5167.739504] bcma: 0000
[ 5167.739505] bcma:

[ 5167.739508] bcma: 0000
[ 5167.739509] bcma: 0000
[ 5167.739511] bcma: 0000
[ 5167.739512] bcma: 0000
[ 5167.739514] bcma: 5372
[ 5167.739515] bcma: 1109
[ 5167.739517] bcma: 2201
[ 5167.739519] bcma: 0040
[ 5167.739520] bcma: 0884
[ 5167.739522] bcma: 0000
[ 5167.739523] bcma:

[ 5167.739525] bcma: C014
[ 5167.739526] bcma: 3DC1
[ 5167.739528] bcma: 809D
[ 5167.739530] bcma: 5856
[ 5167.739531] bcma: 0001
[ 5167.739533] bcma: FFFF
[ 5167.739534] bcma: 83FF
[ 5167.739536] bcma: FFFF
[ 5167.739537] bcma: 0003
[ 5167.739539] bcma: 0202
[ 5167.739540] bcma:

[ 5167.739543] bcma: FFFF
[ 5167.739544] bcma: 0011
[ 5167.739546] bcma: 017A
[ 5167.739547] bcma: 0000
[ 5167.739549] bcma: 0000
[ 5167.739550] bcma: 0000
[ 5167.739552] bcma: 0000
[ 5167.739553] bcma: 0201
[ 5167.739555] bcma: 0000
[ 5167.739556] bcma: 7800
[ 5167.739558] bcma:

[ 5167.739559] bcma: 01FF
[ 5167.739561] bcma: E398
[ 5167.739563] bcma: 0008
[ 5167.739564] bcma: 0000
[ 5167.739566] bcma: 0000
[ 5167.739568] bcma: 0000
[ 5167.739569] bcma: 0044
[ 5167.739571] bcma: 2400
[ 5167.739572] bcma: FCF7
[ 5167.739574] bcma: 0089
[ 5167.739575] bcma:

[ 5167.739578] bcma: 0000
[ 5167.739579] bcma: 0000
[ 5167.739581] bcma: 0000
[ 5167.739582] bcma: 0000
[ 5167.739584] bcma: 0000
[ 5167.739585] bcma: 0000
[ 5167.739587] bcma: 0000
[ 5167.739588] bcma: 0000
[ 5167.739590] bcma: 0000
[ 5167.739591] bcma: 0000
[ 5167.739593] bcma:

[ 5167.739594] bcma: 0000
[ 5167.739596] bcma: 0000
[ 5167.739597] bcma: 0048
[ 5167.739599] bcma: FED2
[ 5167.739600] bcma: 15D9
[ 5167.739602] bcma: FAC6
[ 5167.739604] bcma: 0000
[ 5167.739605] bcma: 0000
[ 5167.739607] bcma: 0000
[ 5167.739608] bcma: 0000
[ 5167.739610] bcma:

[ 5167.739612] bcma: 0000
[ 5167.739614] bcma: 0000
[ 5167.739615] bcma: 0000
[ 5167.739617] bcma: 0000
[ 5167.739618] bcma: 0000
[ 5167.739620] bcma: 0000
[ 5167.739622] bcma: 0000
[ 5167.739623] bcma: 0000
[ 5167.739625] bcma: 0000
[ 5167.739626] bcma: 0000
[ 5167.739627] bcma:

[ 5167.739629] bcma: 0000
[ 5167.739631] bcma: 0000
[ 5167.739632] bcma: 0000
[ 5167.739634] bcma: 0000
[ 5167.739635] bcma: 0000
[ 5167.739637] bcma: 0000
[ 5167.739638] bcma: 0000
[ 5167.739640] bcma: 0000
[ 5167.739641] bcma: 0000
[ 5167.739643] bcma: 0000
[ 5167.739644] bcma:

[ 5167.739647] bcma: 0000
[ 5167.739648] bcma: 0000
[ 5167.739650] bcma: 0000
[ 5167.739651] bcma: 0000
[ 5167.739653] bcma: 0000
[ 5167.739654] bcma: 0000
[ 5167.739656] bcma: 0000
[ 5167.739657] bcma: 0000
[ 5167.739659] bcma: 0000
[ 5167.739660] bcma: 0000
[ 5167.739662] bcma:

[ 5167.739663] bcma: 0000
[ 5167.739665] bcma: 0000
[ 5167.739666] bcma: 0000
[ 5167.739668] bcma: 0000
[ 5167.739669] bcma: 0000
[ 5167.739671] bcma: 0000
[ 5167.739672] bcma: 0000
[ 5167.739674] bcma: 0000
[ 5167.739676] bcma: 0000
[ 5167.739677] bcma: 0000
[ 5167.739679] bcma:

[ 5167.739681] bcma: 0000
[ 5167.739682] bcma: 1111
[ 5167.739684] bcma: 1111
[ 5167.739686] bcma: 0000
[ 5167.739687] bcma: 0000
[ 5167.739689] bcma: 0000
[ 5167.739690] bcma: 0000
[ 5167.739692] bcma: 0000
[ 5167.739693] bcma: 0000
[ 5167.739695] bcma: 2222
[ 5167.739696] bcma:

[ 5167.739698] bcma: 3222
[ 5167.739700] bcma: 0000
[ 5167.739701] bcma: 0000
[ 5167.739703] bcma: 0000
[ 5167.739704] bcma: 0000
[ 5167.739706] bcma: 0000
[ 5167.739707] bcma: 0000
[ 5167.739709] bcma: 0000
[ 5167.739710] bcma: 0000
[ 5167.739712] bcma: 0000
[ 5167.739713] bcma:

[ 5167.739716] bcma: 0000
[ 5167.739717] bcma: 0000
[ 5167.739719] bcma: 0000
[ 5167.739720] bcma: 0000
[ 5167.739722] bcma: 0000
[ 5167.739723] bcma: 0000
[ 5167.739725] bcma: 0000
[ 5167.739726] bcma: 0000
[ 5167.739728] bcma: 0000
[ 5167.739729] bcma: 0000
[ 5167.739731] bcma:

[ 5167.739732] bcma: 0000
[ 5167.739734] bcma: 0000
[ 5167.739735] bcma: 0000
[ 5167.739737] bcma: 0000
[ 5167.739738] bcma: 0000
[ 5167.739740] bcma: 0000
[ 5167.739741] bcma: 0000
[ 5167.739743] bcma: 0000
[ 5167.739744] bcma: 0000
[ 5167.739746] bcma: 0000
[ 5167.739748] bcma:

[ 5167.739750] bcma: 0000
[ 5167.739751] bcma: 0000
[ 5167.739753] bcma: 0000
[ 5167.739755] bcma: 0000
[ 5167.739756] bcma: 0000
[ 5167.739758] bcma: 0000
[ 5167.739759] bcma: 0000
[ 5167.739761] bcma: 0000
[ 5167.739762] bcma: 0000
[ 5167.739764] bcma: 0000
[ 5167.739765] bcma:

[ 5167.739767] bcma: 0000
[ 5167.739768] bcma: 0000
[ 5167.739770] bcma: 0000
[ 5167.739772] bcma: 0000
[ 5167.739773] bcma: 0000
[ 5167.739775] bcma: 0000
[ 5167.739776] bcma: 0000
[ 5167.739778] bcma: 0000
[ 5167.739779] bcma: 0000
[ 5167.739782] bcma: bus0: Found SPROM revision 8
[ 5167.752730] bcma: bus0: GPIO driver not activated
[ 5167.752738] bcma: bus0: Bus registered
[ 5167.765209] brcmsmac bcma0:0: mfg 4bf core 812 rev 24 class 0 irq 17
[ 5167.765319] bcma: bus0: Switched to core: 0x812
[ 5167.766135] brcmsmac bcma0:0: hardware: SECI
[ 5167.766559] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 5167.786115] cfg80211: World regulatory domain updated:
[ 5167.786128] cfg80211: DFS Master region: unset
[ 5167.786131] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 5167.786137] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.786141] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.786144] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.786148] cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.786152] cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 5167.786155] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 5167.786159] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.786162] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 5167.794806] cfg80211: Calling CRDA for country: DE
[ 5167.810110] cfg80211: Regulatory domain changed to country: DE
[ 5167.810122] cfg80211: DFS Master region: ETSI
[ 5167.810125] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 5167.810131] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.810134] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 5167.810139] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz), (N/A, 2000 mBm), (0 s)
[ 5167.810142] cfg80211: (5470000 KHz - 5725000 KHz @ 80000 KHz), (N/A, 2698 mBm), (0 s)
[ 5167.810146] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)


Greetings,
Maxi


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-12-21 10:27:17

by Michael Tokarev

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

[Trimming Cc list a bit]

21.12.2014 13:12, Arend van Spriel wrote:
> On 12/21/14 10:58, Michael Tokarev wrote:
>> 16.12.2014 19:51, Arend van Spriel wrote:
>>
>>> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please remove that call as it causes endless recursion and eventually reboot.
>>
>> Ok, that was easy. Now it loads, but wifi link still
>> does not work, stalling as before. What we're looking
>> at now?
>
> The patch is just to provide me with extra bt-coex related information in the kernel log. So if you can provide that to me I have to info needed to look in the proprietary code base to determine what is missing.

I don't really see any additional info, but it might be just me.

Here's the dmesg contents of loading brcmsmac module with debug=1,
adding an IP address to the wlan0 interface and running a simple
download (which stalls after about 4..6Kb transferred):

[73321.062190] cfg80211: Calling CRDA to update world regulatory domain
[73326.973828] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[73326.979264] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[73326.984760] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[73326.990242] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[73326.995741] bcma: bus0: Found rev 8 PMU (capabilities 0x084C3008)
[73326.995754] bcma: bus0: SPROM offset 0x830
[73326.997645] bcma: bus0: Found SPROM revision 8
[73327.008110] bcma: bus0: GPIO driver not activated
[73327.008117] bcma: bus0: Bus registered
[73327.016533] Support for cores revisions 0x17 and 0x18 disabled by module param allhwsupport=0. Try b43.allhwsupport=1
[73327.021981] b43: probe of bcma0:1 failed with error -524
[73327.027507] Broadcom 43xx driver loaded [ Features: PNL ]
[73327.028594] brcmsmac bcma0:1: mfg 4bf core 812 rev 24 class 0 irq 19
[73327.028620] ieee80211 phy4: brcms_c_protection_upd: idx 2, val -1
[73327.028623] ieee80211 phy4: brcms_c_protection_upd: idx 1, val 0
[73327.028626] ieee80211 phy4: brcms_c_protection_upd: idx 12, val -1
[73327.028629] ieee80211 phy4: brcms_c_protection_upd: idx 11, val 0
[73327.028632] ieee80211 phy4: brcms_c_protection_upd: idx 14, val -1
[73327.028635] ieee80211 phy4: brcms_c_protection_upd: idx 13, val 0
[73327.028638] ieee80211 phy4: brcms_c_protection_upd: idx 15, val -1
[73327.028641] ieee80211 phy4: brcms_c_protection_upd: idx 4, val 2
[73327.028647] brcmsmac bcma0:1: brcms_b_attach wl0: vendor 0x14e4 device 0x4727
[73327.028660] brcmsmac bcma0:1: brcms_b_corereset wl0: core reset
[73327.028667] bcma: bus0: Switched to core: 0x812
[73327.029223] brcmsmac bcma0:1: brcms_b_phy_reset wl0: reset phy
[73327.029227] brcmsmac bcma0:1: brcms_b_core_phypll_ctl wl0
[73327.029259] brcmsmac bcma0:1: brcms_b_corereset wl0: core reset
[73327.029364] brcmsmac bcma0:1: brcms_b_phy_reset wl0: reset phy
[73327.029367] brcmsmac bcma0:1: brcms_b_core_phypll_ctl wl0
[73327.029410] brcmsmac bcma0:1: brcms_b_attach wl0: phy 8/1 radio 2064/1
[73327.029460] brcmsmac bcma0:1: hardware: SECI
[73327.029464] brcmsmac bcma0:1: brcms_c_coredisable wl0: disable core
[73327.029490] brcmsmac bcma0:1: brcms_b_core_phypll_ctl wl0
[73327.029529] ieee80211 phy4: brcms_c_protection_upd: idx 15, val 0
[73327.029534] ieee80211 phy4: brcms_c_protection_upd: idx 3, val 1
[73327.029537] ieee80211 phy4: brcms_c_protection_upd: idx 10, val 1
[73327.029549] ieee80211 phy4: brcms_c_protection_upd: idx 3, val 1
[73327.029820] ieee80211 phy4: Selected rate control algorithm 'minstrel_ht'
[73327.121616] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
[73327.121626] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)
[73327.122195] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[73328.179594] wlan0: authenticate with 64:70:02:29:d9:30
[73328.183927] wlan0: capabilities/regulatory prevented using AP HT/VHT configuration, downgraded
[73328.187684] wlan0: send auth to 64:70:02:29:d9:30 (try 1/3)
[73328.193289] wlan0: authenticated
[73328.198793] wlan0: associate with 64:70:02:29:d9:30 (try 1/3)
[73328.207394] wlan0: RX AssocResp from 64:70:02:29:d9:30 (capab=0x411 status=0 aid=2)
[73328.211734] brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: associated
[73328.215616] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: true (implement)
[73328.219433] wlan0: associated
[73328.223264] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[73328.282197] ieee80211 phy4: brcms_c_protection_upd: idx 11, val 0
[73328.285855] ieee80211 phy4: brcms_c_protection_upd: idx 13, val 4
[73328.289431] ieee80211 phy4: brcms_c_protection_upd: idx 16, val 0
[73332.121259] net_ratelimit: 36 callbacks suppressed
[73332.125201] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73333.125295] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73334.129073] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73335.133022] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73336.137011] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73337.141095] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73338.145078] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73339.148965] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73340.152950] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73341.156936] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73342.161074] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73343.165180] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73344.168951] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73345.172948] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73346.176862] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73347.181006] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73348.185025] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73349.188991] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73350.193073] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73351.196894] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73352.200874] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73353.204712] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73354.208701] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73355.212685] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73356.216671] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73357.220657] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73358.224644] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73359.228630] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73360.232616] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73361.236665] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73362.240808] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73363.244823] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73364.248710] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73365.252750] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73366.256533] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73367.260517] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73368.264505] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73369.268541] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73370.272476] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73371.276467] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73372.280717] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73373.284704] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73374.288692] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73375.292669] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73376.296626] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73377.300630] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73378.304613] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73379.308647] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73380.312571] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73381.316529] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73382.320534] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73383.324516] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73384.328514] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73385.332477] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73386.336434] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73387.340438] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73388.344397] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73389.348401] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73390.352382] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73391.356417] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73392.360340] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73393.364394] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73394.368307] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73395.372293] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73396.376270] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73397.380238] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73398.384330] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73399.388338] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73400.392406] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73401.396274] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73402.400268] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73403.404281] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73404.408146] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73405.412177] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73406.416229] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73407.420182] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73408.424230] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73409.428026] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73410.432095] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73411.436110] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73412.439986] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73413.219752] brcmsmac bcma0:1: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
[73413.444021] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73414.448001] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73415.451912] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73416.455863] brcmsmac bcma0:1: brcms_c_watchdog wl0
[73417.460056] brcmsmac bcma0:1: brcms_c_watchdog wl0


I also noticed the following:

o Watchdog calls itself wl0 while interface name is wlan0.
Might be a good idea to change it.

o what does "capabilities/regulatory prevented using AP HT/VHT configuration, downgraded"
mean?

Thanks,

/mjt

2014-12-01 22:06:37

by Maximilian Engelhardt

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

Hi Arend,

sorry for my late reply, it took me a bit to get the modules compiled with
your patches. Here is the information from my card. During this test I had
very bad performance with my wifi connection with big latency and lots of
packet loss.

[ 1642.407735] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[ 1642.407766] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[ 1642.407794] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[ 1642.407829] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[ 1642.407913] bcma: bus0: Found rev 8 PMU (capabilities 0x084C3008)
[ 1642.407978] bcma: bus0: SPROM offset 0x830
[ 1642.410625] bcma: bcmasprom:
[ 1642.410630] bcma:

[ 1642.410635] bcma: 2801
[ 1642.410637] bcma: 0000
[ 1642.410640] bcma: 0608
[ 1642.410642] bcma: 14E4
[ 1642.410645] bcma: 0070
[ 1642.410647] bcma: EDBE
[ 1642.410649] bcma: 0000
[ 1642.410651] bcma: 2BC4
[ 1642.410654] bcma: 2A64
[ 1642.410655] bcma: 2964
[ 1642.410658] bcma:

[ 1642.410659] bcma: 2C64
[ 1642.410662] bcma: 3CE7
[ 1642.410663] bcma: 46FF
[ 1642.410666] bcma: 47FF
[ 1642.410667] bcma: 0C00
[ 1642.410670] bcma: 0820
[ 1642.410671] bcma: 0030
[ 1642.410674] bcma: 1002
[ 1642.410676] bcma: 9F28
[ 1642.410678] bcma: 5D44
[ 1642.410679] bcma:

[ 1642.410683] bcma: 8080
[ 1642.410684] bcma: 1D8F
[ 1642.410687] bcma: 0032
[ 1642.410689] bcma: 0100
[ 1642.410691] bcma: DF00
[ 1642.410693] bcma: 71F5
[ 1642.410695] bcma: 8400
[ 1642.410697] bcma: 0083
[ 1642.410699] bcma: 8500
[ 1642.410701] bcma: 2010
[ 1642.410703] bcma:

[ 1642.410705] bcma: 0001
[ 1642.410707] bcma: 0000
[ 1642.410709] bcma: 0000
[ 1642.410711] bcma: 0000
[ 1642.410713] bcma: 0000
[ 1642.410715] bcma: 0000
[ 1642.410717] bcma: 0000
[ 1642.410719] bcma: 0000
[ 1642.410721] bcma: 0000
[ 1642.410723] bcma: 0000
[ 1642.410724] bcma:

[ 1642.410728] bcma: 0000
[ 1642.410730] bcma: 0000
[ 1642.410732] bcma: 1008
[ 1642.410734] bcma: 0305
[ 1642.410736] bcma: 0000
[ 1642.410738] bcma: 0000
[ 1642.410740] bcma: 0000
[ 1642.410742] bcma: 0000
[ 1642.410744] bcma: 4727
[ 1642.410746] bcma: 8000
[ 1642.410748] bcma:

[ 1642.410749] bcma: 0002
[ 1642.410752] bcma: 0000
[ 1642.410753] bcma: 1F30
[ 1642.410756] bcma: 1800
[ 1642.410757] bcma: 0000
[ 1642.410760] bcma: 0000
[ 1642.410761] bcma: 0000
[ 1642.410764] bcma: 0000
[ 1642.410765] bcma: 0000
[ 1642.410768] bcma: 0000
[ 1642.410769] bcma:

[ 1642.410773] bcma: 0000
[ 1642.410774] bcma: 0000
[ 1642.410777] bcma: 0000
[ 1642.410778] bcma: 0000
[ 1642.410781] bcma: 5372
[ 1642.410782] bcma: 1109
[ 1642.410785] bcma: 2201
[ 1642.410786] bcma: 0040
[ 1642.410789] bcma: 0884
[ 1642.410790] bcma: 0000
[ 1642.410793] bcma:

[ 1642.410794] bcma: C014
[ 1642.410797] bcma: 3DC1
[ 1642.410798] bcma: 809D
[ 1642.410801] bcma: 5856
[ 1642.410802] bcma: 0001
[ 1642.410805] bcma: FFFF
[ 1642.410807] bcma: 83FF
[ 1642.410809] bcma: FFFF
[ 1642.410811] bcma: 0003
[ 1642.410813] bcma: 0202
[ 1642.410814] bcma:

[ 1642.410818] bcma: FFFF
[ 1642.410819] bcma: 0011
[ 1642.410822] bcma: 017A
[ 1642.410824] bcma: 0000
[ 1642.410826] bcma: 0000
[ 1642.410828] bcma: 0000
[ 1642.410830] bcma: 0000
[ 1642.410832] bcma: 0201
[ 1642.410834] bcma: 0000
[ 1642.410836] bcma: 7800
[ 1642.410838] bcma:

[ 1642.410839] bcma: 01FF
[ 1642.410842] bcma: E398
[ 1642.410844] bcma: 0008
[ 1642.410846] bcma: 0000
[ 1642.410848] bcma: 0000
[ 1642.410850] bcma: 0000
[ 1642.410852] bcma: 0044
[ 1642.410854] bcma: 2400
[ 1642.410856] bcma: FCF7
[ 1642.410858] bcma: 0089
[ 1642.410860] bcma:

[ 1642.410863] bcma: 0000
[ 1642.410865] bcma: 0000
[ 1642.410867] bcma: 0000
[ 1642.410869] bcma: 0000
[ 1642.410871] bcma: 0000
[ 1642.410873] bcma: 0000
[ 1642.410875] bcma: 0000
[ 1642.410877] bcma: 0000
[ 1642.410879] bcma: 0000
[ 1642.410881] bcma: 0000
[ 1642.410883] bcma:

[ 1642.410884] bcma: 0000
[ 1642.410887] bcma: 0000
[ 1642.410888] bcma: 0048
[ 1642.410891] bcma: FED2
[ 1642.410892] bcma: 15D9
[ 1642.410895] bcma: FAC6
[ 1642.410897] bcma: 0000
[ 1642.410899] bcma: 0000
[ 1642.410901] bcma: 0000
[ 1642.410903] bcma: 0000
[ 1642.410904] bcma:

[ 1642.410908] bcma: 0000
[ 1642.410909] bcma: 0000
[ 1642.410912] bcma: 0000
[ 1642.410913] bcma: 0000
[ 1642.410916] bcma: 0000
[ 1642.410917] bcma: 0000
[ 1642.410920] bcma: 0000
[ 1642.410921] bcma: 0000
[ 1642.410924] bcma: 0000
[ 1642.410925] bcma: 0000
[ 1642.410927] bcma:

[ 1642.410929] bcma: 0000
[ 1642.410931] bcma: 0000
[ 1642.410933] bcma: 0000
[ 1642.410935] bcma: 0000
[ 1642.410937] bcma: 0000
[ 1642.410939] bcma: 0000
[ 1642.410941] bcma: 0000
[ 1642.410943] bcma: 0000
[ 1642.410945] bcma: 0000
[ 1642.410947] bcma: 0000
[ 1642.410949] bcma:

[ 1642.410952] bcma: 0000
[ 1642.410954] bcma: 0000
[ 1642.410956] bcma: 0000
[ 1642.410958] bcma: 0000
[ 1642.410960] bcma: 0000
[ 1642.410962] bcma: 0000
[ 1642.410964] bcma: 0000
[ 1642.410966] bcma: 0000
[ 1642.410968] bcma: 0000
[ 1642.410970] bcma: 0000
[ 1642.410972] bcma:

[ 1642.410974] bcma: 0000
[ 1642.410976] bcma: 0000
[ 1642.410978] bcma: 0000
[ 1642.410980] bcma: 0000
[ 1642.410982] bcma: 0000
[ 1642.410984] bcma: 0000
[ 1642.410986] bcma: 0000
[ 1642.410988] bcma: 0000
[ 1642.410990] bcma: 0000
[ 1642.410992] bcma: 0000
[ 1642.410994] bcma:

[ 1642.410997] bcma: 0000
[ 1642.410999] bcma: 1111
[ 1642.411001] bcma: 1111
[ 1642.411003] bcma: 0000
[ 1642.411005] bcma: 0000
[ 1642.411007] bcma: 0000
[ 1642.411009] bcma: 0000
[ 1642.411010] bcma: 0000
[ 1642.411013] bcma: 0000
[ 1642.411015] bcma: 2222
[ 1642.411017] bcma:

[ 1642.411018] bcma: 3222
[ 1642.411021] bcma: 0000
[ 1642.411022] bcma: 0000
[ 1642.411025] bcma: 0000
[ 1642.411026] bcma: 0000
[ 1642.411029] bcma: 0000
[ 1642.411030] bcma: 0000
[ 1642.411033] bcma: 0000
[ 1642.411034] bcma: 0000
[ 1642.411037] bcma: 0000
[ 1642.411038] bcma:

[ 1642.411041] bcma: 0000
[ 1642.411043] bcma: 0000
[ 1642.411045] bcma: 0000
[ 1642.411047] bcma: 0000
[ 1642.411050] bcma: 0000
[ 1642.411051] bcma: 0000
[ 1642.411054] bcma: 0000
[ 1642.411055] bcma: 0000
[ 1642.411058] bcma: 0000
[ 1642.411059] bcma: 0000
[ 1642.411061] bcma:

[ 1642.411063] bcma: 0000
[ 1642.411065] bcma: 0000
[ 1642.411067] bcma: 0000
[ 1642.411069] bcma: 0000
[ 1642.411071] bcma: 0000
[ 1642.411073] bcma: 0000
[ 1642.411075] bcma: 0000
[ 1642.411077] bcma: 0000
[ 1642.411079] bcma: 0000
[ 1642.411081] bcma: 0000
[ 1642.411083] bcma:

[ 1642.411086] bcma: 0000
[ 1642.411088] bcma: 0000
[ 1642.411090] bcma: 0000
[ 1642.411092] bcma: 0000
[ 1642.411094] bcma: 0000
[ 1642.411096] bcma: 0000
[ 1642.411098] bcma: 0000
[ 1642.411100] bcma: 0000
[ 1642.411102] bcma: 0000
[ 1642.411104] bcma: 0000
[ 1642.411106] bcma:

[ 1642.411107] bcma: 0000
[ 1642.411110] bcma: 0000
[ 1642.411111] bcma: 0000
[ 1642.411114] bcma: 0000
[ 1642.411115] bcma: 0000
[ 1642.411118] bcma: 0000
[ 1642.411119] bcma: 0000
[ 1642.411122] bcma: 0000
[ 1642.411123] bcma: 0000
[ 1642.411127] bcma: bus0: Found SPROM revision 8
[ 1642.434510] bcma: bus0: GPIO driver not activated
[ 1642.434518] bcma: bus0: Bus registered
[ 1642.449971] brcmsmac bcma0:0: mfg 4bf core 812 rev 24 class 0 irq 17
[ 1642.450095] bcma: bus0: Switched to core: 0x812
[ 1642.451446] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'




[ 4112.897927] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[ 4112.898113] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
[ 4112.899832] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 4113.830658] wlan0: authenticate with e8:de:27:44:3b:33
[ 4113.830764] wlan0: send auth to e8:de:27:44:3b:33 (try 1/3)
[ 4113.832620] wlan0: authenticated
[ 4113.833859] wlan0: associate with e8:de:27:44:3b:33 (try 1/3)
[ 4113.837231] wlan0: RX AssocResp from e8:de:27:44:3b:33 (capab=0x431 status=0 aid=1)
[ 4113.837591] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: associated
[ 4113.837752] brcmsmac bcma0:0: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
[ 4113.837861] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: true (implement)
[ 4113.838209] wlan0: associated
[ 4113.838228] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 4113.838771] cfg80211: Calling CRDA for country: DE
[ 4113.847285] cfg80211: Regulatory domain changed to country: DE
[ 4113.847298] cfg80211: DFS Master region: ETSI
[ 4113.847302] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 4113.847308] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 4113.847313] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 4113.847318] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz), (N/A, 2000 mBm), (0 s)
[ 4113.847322] cfg80211: (5470000 KHz - 5725000 KHz @ 80000 KHz), (N/A, 2698 mBm), (0 s)
[ 4113.847327] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)



$ cat brcmsmac/bcma0\:0/hardware
chipnum 0x4313
chiprev 0x1
chippackage 0x8
corerev 0x18
boardid 0x608
boardvendor 0x14e4
boardrev P109
boardflags 0x402201
boardflags2 0x884
ucoderev 0x262032c
radiorev 0x1
phytype 0x8
phyrev 0x1
anarev 0xa
nvramrev 8


$ cat brcmsmac/bcma0\:0/macstat
txallfrm: 1622
txrtsfrm: 739
txctsfrm: 269
txackfrm: 128
txdnlfrm: 0
txbcnfrm: 0
txfunfl[8]: 0 0 0 0 0 0 0 0
txtplunfl: 0
txphyerr: 0
pktengrxducast: 0
pktengrxdmcast: 0
rxfrmtoolong: 927
rxfrmtooshrt: 158
rxinvmachdr: 3145
rxbadfcs: 7459
rxbadplcp: 28631
rxcrsglitch: 945
rxstrt: 17138
rxdfrmucastmbss: 112
rxmfrmucastmbss: 16
rxcfrmucast: 745
rxrtsucast: 269
rxctsucast: 311
rxackucast: 38
rxdfrmocast: 21
rxmfrmocast: 16
rxcfrmocast: 7664
rxrtsocast: 379
rxctsocast: 6351
rxdfrmmcast: 5
rxmfrmmcast: 141
rxcfrmmcast: 0
rxbeaconmbss: 47
rxdfrmucastobss: 0
rxbeaconobss: 55
rxrsptmout: 650
bcntxcancl: 0
rxf0ovfl: 0
rxf1ovfl: 0
rxf2ovfl: 0
txsfovfl: 0
pmqovfl: 0
rxcgprqfrm: 0
rxcgprsqovfl: 0
txcgprsfail: 0
txcgprssuc: 0
prs_timeout: 0
rxnack: 0
frmscons: 0
txnack: 0
txglitch_nack: 127
txburst: 0
bphy_rxcrsglitch: 1
phywatchdog: 0
bphy_badplcp: 0


Attachments:
signature.asc (819.00 B)
This is a digitally signed message part.

2014-12-21 10:17:39

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/21/14 11:00, Michael Tokarev wrote:
> Attaching a picture of the board, too. One of the two similar
> boards I have (another has lenovo sticker on it).
>
> Also available as http://www.corpit.ru/mjt/BRCM94313HMGB.JPG
>
> (I wonder if broadcom does not have any of these cards anymore... ;)

Probably in US, but we are in an office in the Netherlands and do not
have every flavor of board available. I will dive into some boxes again
with this info.

Thanks,
Arend

2014-12-21 15:03:20

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 12/21/14 15:24, Maximilian Engelhardt wrote:
> On Sunday 21 December 2014 15:13:50 Arend van Spriel wrote:
>> On 12/21/14 15:08, Maximilian Engelhardt wrote:
>>> On Sunday 21 December 2014 11:12:40 Arend van Spriel wrote:
>>>> On 12/21/14 10:58, Michael Tokarev wrote:
>>>>> 16.12.2014 19:51, Arend van Spriel wrote:
>>>>>> Hmm. The function brcms_btc_ecicoex_enab() is calling itself. Please
>>>>>> remove that call as it causes endless recursion and eventually reboot.>
>>>>>
>>>>> Ok, that was easy. Now it loads, but wifi link still
>>>>> does not work, stalling as before. What we're looking
>>>>> at now?
>>>>
>>>> The patch is just to provide me with extra bt-coex related information
>>>> in the kernel log. So if you can provide that to me I have to info
>>>> needed to look in the proprietary code base to determine what is missing.
>>>>
>>>> Regards,
>>>> Arend
>>>
>>> Hi Arend,
>>
>>> here is the output from my card:
>> Thanks. It shows you have have the same bt-coex version as Michael. I am
>> not familiar with bluetooth side of things. Are you both using bluetooth
>> on 4313?
>>
>> Regards,
>> Arend
>
> I don't know. I think I have Bluetooth somehow enabled but I'm not really
> using it. I definitely don't have any Bluetooth devices connected. I could try
> to unload/disable Bluetooth it to see if it makes any difference.

That would be useful to know.

Thanks,
Arend

> Greetings,
> Maxi
>


2015-03-10 21:27:26

by Arend van Spriel

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

On 03/09/15 21:54, Daniel Glöckner wrote:
> Hi Arend,
>
> On Sun, Dec 21, 2014 at 06:34:24PM +0100, Maximilian Engelhardt wrote:
>> On Sunday 21 December 2014 16:03:17 Arend van Spriel wrote:
>>> On 12/21/14 15:24, Maximilian Engelhardt wrote:
>>>> On Sunday 21 December 2014 15:13:50 Arend van Spriel wrote:
>>>>> Thanks. It shows you have have the same bt-coex version as Michael. I am
>>>>> not familiar with bluetooth side of things. Are you both using bluetooth
>>>>> on 4313?
>>>>>
>>>>> Regards,
>>>>> Arend
>>>>
>>>> I don't know. I think I have Bluetooth somehow enabled but I'm not really
>>>> using it. I definitely don't have any Bluetooth devices connected. I could
>>>> try to unload/disable Bluetooth it to see if it makes any difference.
>>>
>>> That would be useful to know.
>>>
>>
>> I did a test with all Bluetooth modules unloaded that I could find but
>> throughput was still very low (about 4 Mbit/s with brcmsmac, my atheros USB
>> stick archived about 110 Mbit/s).
>
> any update on this issue?
> One of my relatives would like to get rid of that Ralink wifi stick she
> has been carrying around for 1.5 years now since the internal wifi in her
> Thinkpad E130 suffers from this problem.

I did get my hands on same device as Michael has/had and it now sits in
my developement laptop. Just need to find some time to give it a spin.

Regards,
Arend

> Best regards,
>
> Daniel


2015-03-09 20:54:43

by Daniel Glöckner

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

Hi Arend,

On Sun, Dec 21, 2014 at 06:34:24PM +0100, Maximilian Engelhardt wrote:
> On Sunday 21 December 2014 16:03:17 Arend van Spriel wrote:
> > On 12/21/14 15:24, Maximilian Engelhardt wrote:
> > > On Sunday 21 December 2014 15:13:50 Arend van Spriel wrote:
> > >> Thanks. It shows you have have the same bt-coex version as Michael. I am
> > >> not familiar with bluetooth side of things. Are you both using bluetooth
> > >> on 4313?
> > >>
> > >> Regards,
> > >> Arend
> > >
> > > I don't know. I think I have Bluetooth somehow enabled but I'm not really
> > > using it. I definitely don't have any Bluetooth devices connected. I could
> > > try to unload/disable Bluetooth it to see if it makes any difference.
> >
> > That would be useful to know.
> >
>
> I did a test with all Bluetooth modules unloaded that I could find but
> throughput was still very low (about 4 Mbit/s with brcmsmac, my atheros USB
> stick archived about 110 Mbit/s).

any update on this issue?
One of my relatives would like to get rid of that Ralink wifi stick she
has been carrying around for 1.5 years now since the internal wifi in her
Thinkpad E130 suffers from this problem.

Best regards,

Daniel

2015-09-27 16:44:13

by Jonathan Biegert

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac: only semi-working?

Hi,

I've got a Lenovo Thinkpad Edge E135 (from Germany) which came with the
same WiFi-Chip the OP has [1], a BCM4313. I'd like to help debugging so
this chip will finally work properly.

Similary to the OP, the device frequently stalls after some time of use.
On my system [2], this means wpa_supplicant reports an association, but
subsequently no DHCP lease can be obtained. Once this state is reached,
it stays like that. Sometimes unloading the kernel module(s) helps,
sometimes only unload,suspend (S3),load.
Since reading in this thread about bluetooth-issues, I reduced the pain
with the card by disabling bluetooth [5].
I'm still not sure if the error is totally reproducible, I hope so for
debugging.

Please instruct me what/how to generate debug info, apart from [5] and [6].
When responding, please Cc me, I'm not subscribed.

Jonathan Biegert

[1] lspci -v -nnk
02:00.0 Network controller [0280]: Broadcom Corporation BCM4313
802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
Subsystem: Broadcom Corporation Device [14e4:0608]
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at f0a00000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [58] Vendor Specific Information: Len=78 <?>
Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [d0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Virtual Channel
Capabilities: [160] Device Serial Number 00-00-9d-ff-ff-48-20-68
Capabilities: [16c] Power Budgeting <?>
Kernel driver in use: bcma-pci-bridge
Kernel modules: bcma

[2] Archlinux, currently kernel 4.1.6 (distro default), no
NetworkManager, only dhcpcd which starts wpa_supplicant on demand [3].

[3] dhcpcd hook:
<http://roy.marples.name/projects/dhcpcd/artifact/7e81b56d47ff681b>

[4] rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: yes
Hard blocked: no
20: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
21: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no

[5] cat /sys/kernel/debug/brcmsmac/bcma0:1/hardware
chipnum 0x4313
chiprev 0x1
chippackage 0x8
corerev 0x18
boardid 0x608
boardvendor 0x14e4
boardrev P109
boardflags 0x402201
boardflags2 0x884
ucoderev 0x262032c
radiorev 0x1
phytype 0x8
phyrev 0x1
anarev 0xa
nvramrev 8

[6] Kernel log (journalctl -k) from a stall, augmented with some related
journal messages:

> 16:00:12 larsa dhcpcd[13130]: wlan0: carrier lost
> 16:00:12 larsa kernel: brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: disassociated
> 16:00:12 larsa kernel: brcmsmac bcma0:1: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
> 16:00:12 larsa kernel: brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)
> 16:00:12 larsa kernel: cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
> 16:00:13 larsa kernel: wlan0: authenticate with b0:48:7a:d1:6c:0c
> 16:00:13 larsa kernel: wlan0: send auth to b0:48:7a:d1:6c:0c (try 1/3)
> 16:00:13 larsa kernel: wlan0: send auth to b0:48:7a:d1:6c:0c (try 2/3)
> 16:00:14 larsa kernel: wlan0: send auth to b0:48:7a:d1:6c:0c (try 3/3)
> 16:00:14 larsa kernel: wlan0: authentication with b0:48:7a:d1:6c:0c timed out
> 16:00:15 larsa kernel: wlan0: authenticate with b0:48:7a:d1:6c:0c
> 16:00:15 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 1/3)
> 16:00:15 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 2/3)
> 16:00:15 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 3/3)
> 16:00:16 larsa kernel: wlan0: authentication with b0:48:7a:d1:6c:0c timed out
> 16:00:18 larsa kernel: wlan0: authenticate with b0:48:7a:d1:6c:0c
> 16:00:18 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 1/3)
> 16:00:18 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 2/3)
> 16:00:18 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 3/3)
> 16:00:18 larsa kernel: wlan0: authentication with b0:48:7a:d1:6c:0c timed out
> 16:00:30 larsa kernel: wlan0: authenticate with b0:48:7a:d1:6c:0c
> 16:00:30 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 1/3)
> 16:00:30 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 2/3)
> 16:00:31 larsa kernel: wlan0: direct probe to b0:48:7a:d1:6c:0c (try 3/3)
> 16:00:31 larsa kernel: wlan0: authentication with b0:48:7a:d1:6c:0c timed out
> 16:00:54 larsa kernel: wlan0: authenticate with b0:48:7a:d1:6c:0c
> 16:00:54 larsa kernel: wlan0: send auth to b0:48:7a:d1:6c:0c (try 1/3)
> 16:00:54 larsa kernel: wlan0: authenticated
> 16:00:54 larsa kernel: wlan0: associate with b0:48:7a:d1:6c:0c (try 1/3)
> 16:00:54 larsa kernel: wlan0: RX AssocResp from b0:48:7a:d1:6c:0c (capab=0x431 status=0 aid=3)
> 16:00:54 larsa kernel: brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: associated
> 16:00:54 larsa kernel: brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: true (implement)
> 16:00:54 larsa kernel: wlan0: associated
> 16:00:54 larsa kernel: cfg80211: Calling CRDA to update world regulatory domain
> 16:00:54 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 159/256 dur 1778/1504
> 16:00:55 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 159/256 dur 1778/1504
> 16:00:56 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 159/256 dur 1778/1504
> 16:00:56 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 137/256 dur 1602/1504
> 16:00:56 larsa dhcpcd[13130]: wlan0: carrier acquired
> 16:00:56 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 153/256 dur 1730/1504
> 16:00:57 larsa kernel: cfg80211: Calling CRDA to update world regulatory domain
> 16:00:57 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 153/256 dur 1730/1504
> 16:00:58 larsa kernel: brcmsmac bcma0:1: wl0: brcms_c_d11hdrs_mac80211: txop exceeded phylen 153/256 dur 1730/1504
> 16:00:59 larsa dhcpcd[13130]: wlan0: carrier lost
> 16:00:59 larsa kernel: wlan0: deauthenticated from b0:48:7a:d1:6c:0c (Reason: 2=PREV_AUTH_NOT_VALID)
> 16:00:59 larsa kernel: brcmsmac bcma0:1: brcmsmac: brcms_ops_bss_info_changed: disassociated
> 16:00:59 larsa kernel: brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)

2016-03-14 16:40:29

by Daniel Glöckner

[permalink] [raw]
Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

Happy new year!

On Tue, Mar 10, 2015 at 10:27:18PM +0100, Arend van Spriel wrote:
> On 03/09/15 21:54, Daniel Gl?ckner wrote:
> >On Sun, Dec 21, 2014 at 06:34:24PM +0100, Maximilian Engelhardt wrote:
> >>On Sunday 21 December 2014 16:03:17 Arend van Spriel wrote:
> >>>On 12/21/14 15:24, Maximilian Engelhardt wrote:
> >>>>On Sunday 21 December 2014 15:13:50 Arend van Spriel wrote:
> >>>>>Thanks. It shows you have have the same bt-coex version as Michael. I am
> >>>>>not familiar with bluetooth side of things. Are you both using bluetooth
> >>>>>on 4313?
> >>>>>
> >>>>>Regards,
> >>>>>Arend
> >>>>
> >>>>I don't know. I think I have Bluetooth somehow enabled but I'm not really
> >>>>using it. I definitely don't have any Bluetooth devices connected. I could
> >>>>try to unload/disable Bluetooth it to see if it makes any difference.
> >>>
> >>>That would be useful to know.
> >>>
> >>
> >>I did a test with all Bluetooth modules unloaded that I could find but
> >>throughput was still very low (about 4 Mbit/s with brcmsmac, my atheros USB
> >>stick archived about 110 Mbit/s).
> >
> >any update on this issue?
> >One of my relatives would like to get rid of that Ralink wifi stick she
> >has been carrying around for 1.5 years now since the internal wifi in her
> >Thinkpad E130 suffers from this problem.
>
> I did get my hands on same device as Michael has/had and it now sits
> in my developement laptop. Just need to find some time to give it a
> spin.

Is there any hope for this device?
The Thinkpad is still in use.

Best regards,

Daniel

Subject: Re: BCM4313 & brcmsmac & 3.12: only semi-working?

I'am in kernel 5.8.3.

Today I updated from .2 to .3.
I had not used wireless from a long time (+1 year) in this notebook.
So when I successfully connected to the router, and started browsing,
I had a complete freeze of my system. Not even ssh access.
Later I had the same complete freeze when I closed the lid; when I
went back to the device it was completely frozen.
journalctl -b -1 --system does not throw anything significant, no
indication of a kernel panic.

Now I am back to wired connection and no problems so far. So I suspect
it's the wireless card.

l$ sudo lspci -vnn -d 14e4:
02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries
BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
Subsystem: Askey Computer Corp. Device [144f:7179]
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at e1500000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [58] Vendor Specific Information: Len=78 <?>
Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [d0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Virtual Channel
Capabilities: [160] Device Serial Number 00-00-9f-ff-ff-be-b4-74
Capabilities: [16c] Power Budgeting <?>
Kernel modules: bcma

For now I have blacklisted this modules just in case.
b43
brcmsmac
bcma
mac80211

Has anyone been experiencing this issue in the aforementioned kernel version?