linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [REGRESSION] hostapd 2.4..2.7 broken with 4.18+
@ 2018-12-24 11:09 Russell King - ARM Linux
       [not found] ` <CAF7Mx6r_q7H4ioFLoF1eKHrvmtE0xViG__uDNByaNjrGGJWx+Q@mail.gmail.com>
  0 siblings, 1 reply; 22+ messages in thread
From: Russell King - ARM Linux @ 2018-12-24 11:09 UTC (permalink / raw)
  To: rafal, arend.vanspriel, kvalo
  Cc: linux-wireless, franky.lin, hante.meuleman, chi-hsien.lin,
	wright.feng, brcm80211-dev-list.pdl, brcm80211-dev-list

Hi,

Commit 1204aa17f3b4 ("brcmfmac: set WIPHY_FLAG_HAVE_AP_SME flag")
appears to have broken hostapd 2.4, thereby causing a user visible
regression when upgrading across the 4.18 boundary (e.g. 4.13 to
4.19).

The presence of this flag causes nl80211 to add an additional
attribute to the netlink wiphy reply:

                if ((rdev->wiphy.flags & WIPHY_FLAG_HAVE_AP_SME) &&
                    nla_put_u32(msg, NL80211_ATTR_DEVICE_AP_SME,
                                rdev->wiphy.ap_sme_capa))
                        goto nla_put_failure;

which is then parsed by hostapd using a presence/absence test for
this property (the value of the property is meaningless):

        nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
                  genlmsg_attrlen(gnlh, 0), NULL);
...
        if (tb[NL80211_ATTR_DEVICE_AP_SME])
                info->device_ap_sme = 1;

This causes hostapd to then attempt to subscribe to management
frames (via nl80211_mgmt_subscribe_ap_dev_sme()):

        if (nl80211_register_frame(bss, bss->nl_mgmt,
                                   (WLAN_FC_TYPE_MGMT << 2) |
                                   (WLAN_FC_STYPE_ACTION << 4),
                                   NULL, 0) < 0)

and brcmfmac does not support passing any management frames in AP
mode (brcmf_txrx_stypes[NL80211_IFTYPE_AP] is empty).  That causes
nl80211_register_frame() to fail, and hostapd fails to initialise.

Checking the hostapd versions (including up to 2.7) shows that
nothing has changed, so this change has broken the ability for
hostapd to be used with brcmfmac - thereby causing a user-visible
regression.

Can this commit be reverted to fix this regression please?

Thanks.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: [REGRESSION] hostapd 2.4..2.7 broken with 4.18+
@ 2019-01-18 20:36 Arend van Spriel
  2019-01-18 22:11 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 22+ messages in thread
From: Arend van Spriel @ 2019-01-18 20:36 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Kalle Valo, linux-wireless, brcm80211-dev-list.pdl, Arend van Spriel

On 1/17/2019 11:03 AM, Russell King - ARM Linux admin wrote:> On Wed, Jan 16, 2019 at 02:21:32PM +0100, Arend Van Spriel wrote:
>> The patch below works for me so can you provide the counters file contents
>> after hitting the issue.
> 
> Okay, with the patch fixed, it seems to have failed last night for some
> reason... I'm not sure exactly when it died, possibly about an hour
> after bringing it up.  Here's the full log.

Sorry for the somewhat late response. I wanted to discuss the log with
firmware engineer. Can you tell how many stations were connected to this
AP before and/or when it died? What does "died" mean? From the log I can
only conclude the firmware is not crashing. So I assume by "died" you
mean no data is successfully exchanged between hostapd and stations. This
is probably due to the failing send_key_to_dongle. Could you try the patch
below to be sure about the key configuration that fails.

Regards,
Arend
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index a62c48d..d43d4c0 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -460,6 +460,8 @@ static void convert_key_from_CPU(struct brcmf_wsec_key *key,
 	int err;
 	struct brcmf_wsec_key_le key_le;
 
+	brcmf_err("idx %d algo %d flags %x\n",
+		  key->index, key->algo, key->flags);
 	convert_key_from_CPU(key, &key_le);
 
 	brcmf_netdev_wait_pend8021x(ifp);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-01-18 22:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-24 11:09 [REGRESSION] hostapd 2.4..2.7 broken with 4.18+ Russell King - ARM Linux
     [not found] ` <CAF7Mx6r_q7H4ioFLoF1eKHrvmtE0xViG__uDNByaNjrGGJWx+Q@mail.gmail.com>
2019-01-08 16:40   ` Kalle Valo
2019-01-08 23:26     ` Russell King - ARM Linux
2019-01-09 10:27       ` Arend Van Spriel
2019-01-09 10:56         ` Russell King - ARM Linux
2019-01-11 14:15           ` Russell King - ARM Linux
2019-01-14 11:49             ` Arend Van Spriel
2019-01-14 11:59               ` Arend Van Spriel
2019-01-15 10:59                 ` Russell King - ARM Linux admin
2019-01-15 10:55               ` Russell King - ARM Linux admin
2019-01-16  0:12               ` Russell King - ARM Linux admin
2019-01-16 12:08                 ` Arend Van Spriel
2019-01-16 12:51                   ` Russell King - ARM Linux admin
2019-01-16 12:55                     ` Arend Van Spriel
2019-01-16 13:21                     ` Arend Van Spriel
2019-01-16 13:56                       ` Russell King - ARM Linux admin
2019-01-16 14:11                         ` Russell King - ARM Linux admin
     [not found]                           ` <CAF7Mx6oG0-X=OyrpgYiM-Lt6p+nDpO7X5CWbdaoSieBcc6=57w@mail.gmail.com>
2019-01-16 16:35                             ` Kalle Valo
2019-01-17 10:03                       ` Russell King - ARM Linux admin
2019-01-09 10:29     ` Arend Van Spriel
2019-01-18 20:36 Arend van Spriel
2019-01-18 22:11 ` Russell King - ARM Linux admin

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).