Search Linux Wireless

Re: [PATCH] mac80211: set carrier_on for ibss vifs only while joined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-11-08 at 17:42 +0200, Eliad Peller wrote:
> On Tue, Nov 8, 2011 at 5:27 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> > On Tue, 2011-11-08 at 15:36 +0200, Eliad Peller wrote:
> >> mac80211 should set carrier_on for ibss vifs
> >> only while they are joined (similar to sta vifs)
> >
> >> --- a/net/mac80211/ibss.c
> >> +++ b/net/mac80211/ibss.c
> >> @@ -97,6 +97,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
> >>       /* if merging, indicate to driver that we leave the old IBSS */
> >>       if (sdata->vif.bss_conf.ibss_joined) {
> >>               sdata->vif.bss_conf.ibss_joined = false;
> >> +             netif_carrier_off(sdata->dev);
> >>               ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IBSS);
> >>       }
> >>
> >> @@ -207,6 +208,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
> >>       bss = cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel,
> >>                                       mgmt, skb->len, 0, GFP_KERNEL);
> >>       cfg80211_put_bss(bss);
> >> +     netif_carrier_on(sdata->dev);
> >>       cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL);
> >
> > Do we really need to toggle the carrier here? While we merge, shouldn't
> > we just keep it up, just maybe stop the queues?
> >
> technically, we leave the ibss and then rejoin (unlike roaming). so i
> guess setting the carrier on/off makes sense as well.
> do you prefer stopping the queues instead?

No, I don't really know :)

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux