Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: set carrier_on for ibss vifs only while joined
Date: Tue, 08 Nov 2011 16:57:07 +0100	[thread overview]
Message-ID: <1320767827.24797.12.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAB3XZEcGPTzvnTg7DtG8q0E3pGT8KH+tozaO4ZtMGHyQNks_8A@mail.gmail.com> (sfid-20111108_164248_475276_2CC7F1B7)

On Tue, 2011-11-08 at 17:42 +0200, Eliad Peller wrote:
> On Tue, Nov 8, 2011 at 5:27 PM, Johannes Berg <johannes@sipsolutions.net> 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


      reply	other threads:[~2011-11-08 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 13:36 [PATCH] mac80211: set carrier_on for ibss vifs only while joined Eliad Peller
2011-11-08 15:27 ` Johannes Berg
2011-11-08 15:42   ` Eliad Peller
2011-11-08 15:57     ` Johannes Berg [this message]

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=1320767827.24797.12.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=eliad@wizery.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