linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: rafal@milecki.pl, arend.vanspriel@broadcom.com, kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, franky.lin@broadcom.com,
	hante.meuleman@broadcom.com, chi-hsien.lin@cypress.com,
	wright.feng@cypress.com, brcm80211-dev-list.pdl@broadcom.com,
	brcm80211-dev-list@cypress.com
Subject: [REGRESSION] hostapd 2.4..2.7 broken with 4.18+
Date: Mon, 24 Dec 2018 11:09:25 +0000	[thread overview]
Message-ID: <20181224110925.GY26090@n2100.armlinux.org.uk> (raw)

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

             reply	other threads:[~2018-12-24 11:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-24 11:09 Russell King - ARM Linux [this message]
     [not found] ` <CAF7Mx6r_q7H4ioFLoF1eKHrvmtE0xViG__uDNByaNjrGGJWx+Q@mail.gmail.com>
2019-01-08 16:40   ` [REGRESSION] hostapd 2.4..2.7 broken with 4.18+ 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

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=20181224110925.GY26090@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=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=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rafal@milecki.pl \
    --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).