On Thu, 09 Sep 2010 16:01:27 -0700, Ben Greear <greearb@xxxxxxxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html