All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Jouni Malinen <j@w1.fi>,
	"hostap@lists.shmoo.com" <hostap@lists.shmoo.com>,
	Hante Meuleman <meuleman@broadcom.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] nl80211: report new station / assoc event for the correct BSS
Date: Sun, 14 Dec 2014 10:25:45 +0100	[thread overview]
Message-ID: <548D5799.306@broadcom.com> (raw)
In-Reply-To: <CACna6rxzRg3oak6Zg=KDV2LyRQfobS40oEWdESXAqXC6YVHTJA@mail.gmail.com>

On 12/13/14 23:31, Rafał Miłecki wrote:
> On 6 December 2014 at 16:06, Rafał Miłecki<zajec5@gmail.com>  wrote:
>> drv->ctx always points to the first BSS and we should report event using
>> BSS related to the interface we got NL80211_CMD_NEW_STATION from.
>> This fixes STA association for drivers using NL80211_CMD_NEW_STATION and
>> multiple virtual interfaces.
>>
>> Before:
>> nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0-1 (ifindex:7)
>> nl80211: New station 02:00:00:00:01:00
>> wlan0: STA 02:00:00:00:01:00 IEEE 802.11: associated
>>
>> After:
>> nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0-1 (ifindex:7)
>> nl80211: New station 02:00:00:00:01:00
>> wlan0-1: STA 02:00:00:00:01:00 IEEE 802.11: associated
>>
>> Signed-off-by: Rafał Miłecki<zajec5@gmail.com>
>> ---
>> Hi guys :)
>>
>> I recently heard about possible problems with handling BSS-es from Arend and was
>> working with nl80211 / hostapd anyway, so decided to take a look at this.
>>
>> I think I found some bug in handling events that can be exposed when using
>> multiple virtual interfaces, hardware authentication and cfg80211_new_sta (which
>> gets translated into NL80211_CMD_NEW_STATION).
>>
>> As you can see in the log called "Before", hostapd was getting event from
>> wlan0-1 but then association was happening on the wlan0. This was breaking AP
>> mode on virtual interfaces (BSS other than the first one).
>>
>> Please note, that this bug (I believe it's a bug) won't be exposed when running
>> mac80211_hwsim. In such case authentication is handled in hostapd and assoc
>> happens in handle_assoc_cb (not hostapd_notif_assoc) which handles BSS-es
>> correctly.
>>
>> If you review this patch and it appears to be OK, I guess we will need similar
>> modification for other events.
>
> Any opinions on this?

I would say you are right in your analysis. I have not tried this patch. 
I will ask Hante as he added Multiple-BSSID support. I assume this bug 
is not visible to any mac80211-based driver, right?

Regards,
Arend

       reply	other threads:[~2014-12-14  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1417878395-19235-1-git-send-email-zajec5@gmail.com>
     [not found] ` <CACna6rxzRg3oak6Zg=KDV2LyRQfobS40oEWdESXAqXC6YVHTJA@mail.gmail.com>
2014-12-14  9:25   ` Arend van Spriel [this message]
2014-12-14 15:46     ` [PATCH] nl80211: report new station / assoc event for the correct BSS Jouni Malinen
2014-12-14 20:11     ` 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=548D5799.306@broadcom.com \
    --to=arend@broadcom.com \
    --cc=hostap@lists.shmoo.com \
    --cc=j@w1.fi \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.