From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: "S. Gilles" <sgilles@math.umd.edu>,
Franky Lin <franky.lin@broadcom.com>,
Hante Meuleman <hante.meuleman@broadcom.com>,
Chi-Hsien Lin <chi-hsien.lin@cypress.com>,
Wright Feng <wright.feng@cypress.com>,
linux-wireless@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com,
brcm80211-dev-list@cypress.com
Subject: Re: [BUG] brcmfmac: BRCM4354 cannot connect since commit 270a6c1f65
Date: Tue, 11 Jul 2017 14:35:07 +0200 [thread overview]
Message-ID: <d5775426-f1bd-c2ce-89a8-e11472815787@broadcom.com> (raw)
In-Reply-To: <20170711122125.5epcjhcyneiwxyse@number18.npnth.net>
On 11-07-17 14:21, S. Gilles wrote:
> Hi,
>
> I have an Asus C201, which comes with a BRCM4354 (SDIO). On boot,
> dmesg shows
>
> brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Apr 8 2015 13:03:52 version 7.35.79.79 (r547158) FWID 01-7f29997a
>
> Since 270a6c1f65fe68a28a5d39cd405592c550b496c7 (brcmfmac: rework
> headroom check in .start_xmit()), the machine cannot connect to any
> wireless network. I can fully reproduce this, and have bisected it;
> I'm mailing this from the commit before: a833f3d4de. I only have
> access to WPA2 networks, in case it matters. The relevent part of
> dmesg from a bad boot is
>
> [ ... ] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> [ +0.000767] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ +0.905426] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [Jul11 11:02] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ +0.983406] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [Jul11 11:03] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [Jul11 11:05] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ +0.981930] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [Jul11 11:07] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [Jul11 11:09] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ +0.698295] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> ... (etc.)
> [ +0.918891] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [Jul11 11:18] dwmmc_rockchip ff0d0000.dwmmc: Successfully tuned phase to 204
> [ +12.545604] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> ... (etc.)
>
> meanwhile, wpa_cli is full of output like
>
> ...
> <3>CTRL-EVENT-NETWORK-NOT-FOUND
> <3>CTRL-EVENT-SCAN-STARTED
> <3>CTRL-EVENT-SCAN-RESULTS
> <3>CTRL-EVENT-SSID-REENABLED id=1 ssid="{known SSID}"
> <3>Trying to associate with SSID '{known SSID}'
> <3>Associated with {MAC}
> <3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
> <3>Authentication with {MAC} timed out.
> <3>CTRL-EVENT-DISCONNECTED bssid={MAC} reason=3 locally_generated=1
> <3>WPA: 4-Way Handshake failed - pre-shared key may be incorrect
> <3>CTRL-EVENT-SID-TEMP-DISABLED id=1 ssid="{known SSID}" auth_failures=26 duration=120 reason=WRONG_KEY
> <3>CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
> <3>CTRL-EVENT-SCAN-STARTED
> <3>CTRL-EVENT-SCAN-RESULTS
> <4>Failed to initiate sched scan
> <3>CTRL-EVENT-NETWORK-NOT-FOUND
> ...
>
> The `non-BCDC packet received' messages in dmesg occur just before
> the `timed out' messages in wpa_cli.
>
> Please let me know if more information is needed of if there are
> patches I should test.
Looking at the diff of the bad commit, I came up with the patch below.
Can you try it and let me know the result?
Regards,
Arend
---
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index fbcbb43..c3ecec6 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -2053,12 +2053,13 @@ static int brcmf_sdio_txpkt_hdalign(struct
brcmf_sdio *bus, struct sk_buff *pkt)
atomic_inc(&stats->pktcow_failed);
return -ENOMEM;
}
+ head_pad = 0;
}
skb_push(pkt, head_pad);
dat_buf = (u8 *)(pkt->data);
}
memset(dat_buf, 0, head_pad + bus->tx_hdrlen);
- return 0;
+ return head_pad;
}
/**
next prev parent reply other threads:[~2017-07-11 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 12:21 [BUG] brcmfmac: BRCM4354 cannot connect since commit 270a6c1f65 S. Gilles
2017-07-11 12:35 ` Arend van Spriel [this message]
2017-07-11 14:56 ` S. Gilles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5775426-f1bd-c2ce-89a8-e11472815787@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=chi-hsien.lin@cypress.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sgilles@math.umd.edu \
--cc=wright.feng@cypress.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).