From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: RFC: Allow multiple STA connected to same AP.
Date: Fri, 10 Sep 2010 01:08:38 +0200 [thread overview]
Message-ID: <9b3afa510682d20c031f85f20345abd7@localhost> (raw)
In-Reply-To: <4C896747.6090905@candelatech.com>
On Thu, 09 Sep 2010 16:01:27 -0700, Ben Greear <greearb@candelatech.com>
wrote:
>>> + /* If we have more than one virtual station, turn on
>> PROMISC_IN_BSS
>>> + * --Ben
>>> + */
>>> + list_for_each_entry_rcu(sdata,&local->interfaces, list) {
>>> + if (!sdata->dev || !netif_running(sdata->dev))
>>> + continue;
>>> +
>>> + if (sdata->vif.type == NL80211_IFTYPE_STATION) {
>>> + avifs++;
>>> + if (avifs> 1)
>>> + break;
>>> + }
>>> + }
>>> + if (avifs> 1)
>>> + new_flags |= FIF_PROMISC_IN_BSS;
>>> +
>>
>> This seems weird. Why do you need to be *promisc* within a given
>> BSS if you are multiple stations? You already have two MAC addrs
>> that you need to accept, so that should be fine, i.e. you don't
>> need to be promisc in the BSS. If ath9k needs to, it should be in
>> the driver. So NAK on this change for sure.
>
> This seems to let the driver receive pkts for the 'real' mac on
> wlan0 and also the arbitrary mac on the second STA interface.
>
> If there is supposed to be some other way for the driver to
> figure out it's supposed to go promisc, please let me know and
> I'll try to debug it.
But you can do the exact same thing in the driver. I just think
it doesn't belong into mac80211, since mac80211 doesn't need you
to be promisc, it just needs you to receive frames for those *two*
addresses that you've added. And you already know about those,
since you were notified about the interfaces going up and down
and associating etc.
>>> @@ -440,7 +440,7 @@ int sta_info_insert_rcu(struct sta_info *sta)
>>> __acquires(RCU)
>>>
>>> spin_lock_irqsave(&local->sta_lock, flags);
>>> /* check if STA exists already */
>>> - if (sta_info_get_bss(sdata, sta->sta.addr)) {
>>> + if (sta_info_get(sdata, sta->sta.addr)) {
>>
>> I don't understand this change. These functions are the same
>> if sdata is in managed mode.
>
> The _bss method returns anything in same bss or with same
> sdata. The sta_info_get only returns if MAC and sdata match.
>
> W/out this change, the second STA fails this check because it
> has same BSS as the first one.
I'll have to look at this, I may misremember the way this works
internally, but this change will certainly break some things
since it'd allow adding the same STA to multiple VLANs that sit
on top of the same BSS.
johannes
next prev parent reply other threads:[~2010-09-09 23:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 22:03 RFC: Allow multiple STA connected to same AP Ben Greear
2010-09-09 22:51 ` Johannes Berg
2010-09-09 23:01 ` Ben Greear
2010-09-09 23:08 ` Johannes Berg [this message]
2010-09-10 4:52 ` Ben Greear
2010-09-10 16:37 ` Johannes Berg
2010-09-10 16:52 ` Ben Greear
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=9b3afa510682d20c031f85f20345abd7@localhost \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
/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).