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:27:34 +0100	[thread overview]
Message-ID: <1320766054.24797.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1320759419-20743-1-git-send-email-eliad@wizery.com> (sfid-20111108_143735_222438_9B54C70A)

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?

johannes


  reply	other threads:[~2011-11-08 15:27 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 [this message]
2011-11-08 15:42   ` Eliad Peller
2011-11-08 15:57     ` Johannes Berg

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=1320766054.24797.2.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