linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend Van Spriel <arend.vanspriel@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: brcm80211 development <brcm80211-dev-list@broadcom.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Brett Rudley <brudley@broadcom.com>,
	Arend van Spriel <arend@broadcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
	Hante Meuleman <meuleman@broadcom.com>
Subject: Re: Problem with brcmfmac removing extra interface
Date: Wed, 23 Mar 2016 11:44:59 +0100	[thread overview]
Message-ID: <56F273AB.2060001@broadcom.com> (raw)
In-Reply-To: <CACna6ryFGQT56QGxsMF=a5Qi+eDp+3mByoxTQidWrxR6qRpBmA@mail.gmail.com>

On 23-3-2016 9:47, Rafał Miłecki wrote:
> On 22 March 2016 at 21:24, Arend van Spriel
> <arend.vanspriel@broadcom.com> wrote:
>> On 22-3-2016 7:36, Rafał Miłecki wrote:
>>> On 3 March 2016 at 23:37, Rafał Miłecki <zajec5@gmail.com> wrote:
>>>> brcmfmac in general is not capable of removing interfaces. If you take
>>>> a look at brcmf_cfg80211_del_iface implementation, you'll see it
>>>> returns -EOPNOTSUPP (except for p2p interfaces).
>>>>
>>>> However there is problem in handling NL80211_CMD_STOP_AP (with the
>>>> brcmf_cfg80211_stop_ap callback). Current implementation calls
>>>> brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1)
>>>> if mbss support is enabled/used.
>>>>
>>>> Above call results in firmware generating BRCMF_E_LINK event. This
>>>> event is handled with the following forward-traced functions chain:
>>>> 1) brcmf_notify_connect_status
>>>> 2) brcmf_notify_connect_status_ap
>>>> 3) brcmf_remove_interface
>>>> 4) brcmf_del_if
>>>> 5) brcmf_net_detach
>>>> 6) unregister_netdev
>>>>
>>>> So the result of NL80211_CMD_STOP_AP is interface being removed. The
>>>> problem with this behavior is that interface can't be recreated after
>>>> that:
>>>> # iw phy phy1 interface add wlan1-1 type __ap
>>>> [ 3602.929199] brcmfmac: brcmf_ap_add_vif: timeout occurred
>>>> command failed: I/O error (-5)
>>>>
>>>> I hit this problem when trying to restart hostapd using BCM43602 and 2 BSSes.
>>>>
>>>> Could you analyze this problem and see if you see some way of solving
>>>> this problem, please?
>>>
>>> Hi, any ideas / help regarding this issue?
>>
>> Restarting hostapd obviously is a valid scenario. My guess is we would
>> need to avoid interface removal in brcmf_notify_connect_status_ap. But
>> first I would like to know in which state the firmware is upon
>> brcmf_ap_add_vif. Can you provide a full log with FWCON debug level enabled?
> 
> Sure, hope it helps!

Ah. Actually would like to see some driver logging as well so
'debug=0x101410'.

> 3) killall hostapd
> [  234.424528] device wlan1-1 left promiscuous mode
> [  234.429453] br-lan: port 3(wlan1-1) entered disabled state
> [  234.842185] brcmfmac: CONSOLE: 026816.727 wl0: link down (wl0)
> [  234.842224] brcmfmac: CONSOLE: 026816.727 wl0: link down (wl0.2)

This part at least is interesting and I would like to know how brcmfmac
deals with this order of events.

Regards,
Arend

  reply	other threads:[~2016-03-23 10:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 22:37 Problem with brcmfmac removing extra interface Rafał Miłecki
2016-03-22  6:36 ` Rafał Miłecki
2016-03-22 20:24   ` Arend van Spriel
2016-03-23  8:47     ` Rafał Miłecki
2016-03-23 10:44       ` Arend Van Spriel [this message]
2016-03-23 19:13         ` Rafał Miłecki
2016-05-06 22:43           ` Rafał Miłecki
2016-05-24 19:49           ` Arend Van Spriel
2016-05-25  7:56             ` Rafał Miłecki

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=56F273AB.2060001@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=arend@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=meuleman@broadcom.com \
    --cc=zajec5@gmail.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).