linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org
Subject: Re: [PATCH 4/6] nl80211: user_mpm overrides auto_open_plinks
Date: Mon, 04 Mar 2013 16:10:48 +0100	[thread overview]
Message-ID: <1362409848.21028.16.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1362204172-28307-4-git-send-email-thomas@cozybit.com> (sfid-20130302_070418_378350_47836780)

On Fri, 2013-03-01 at 22:02 -0800, Thomas Pedersen wrote:
> If the user requested a userspace MPM, automatically
> disable auto_open_plinks to fully disable the kernel MPM.
> 
> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
> ---
>  include/uapi/linux/nl80211.h |    6 ++++--
>  net/wireless/nl80211.c       |    3 +++
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
> index 8134c6a..79da871 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -2467,8 +2467,10 @@ enum nl80211_mesh_power_mode {
>   * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
>   *	point.
>   *
> - * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically
> - *	open peer links when we detect compatible mesh peers.
> + * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically open
> + *	peer links when we detect compatible mesh peers. Disabled if
> + *	@NL80211_MESH_SETUP_USERSPACE_MPM or @NL80211_MESH_SETUP_USERSPACE_AMPE are
> + *	set.
>   *
>   * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
>   *	containing a PREQ that an MP can send to a particular destination (path
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index e3f2489..bd73231 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -7422,6 +7422,9 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
>  			return err;
>  	}
>  
> +	if (setup.user_mpm)
> +		cfg.auto_open_plinks = false;

Maybe you should reject the invalid configuration instead?

johannes


  reply	other threads:[~2013-03-04 15:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02  6:02 [PATCH 1/6] nl80211: explicit userspace MPM Thomas Pedersen
2013-03-02  6:02 ` [PATCH 2/6] cfg80211: rename mesh station types Thomas Pedersen
2013-03-02  6:02 ` [PATCH 3/6] mac80211: support userspace MPM Thomas Pedersen
2013-03-02  6:02 ` [PATCH 4/6] nl80211: user_mpm overrides auto_open_plinks Thomas Pedersen
2013-03-04 15:10   ` Johannes Berg [this message]
2013-03-04 20:04     ` Thomas Pedersen
2013-03-04 20:07       ` Johannes Berg
2013-03-02  6:02 ` [PATCH 5/6] mac80211: disallow changing auto_open_plinks Thomas Pedersen
2013-03-02  6:02 ` [PATCH 6/6] mac80211: init mesh timer for user authed STAs Thomas Pedersen
2013-03-04 15:11   ` Johannes Berg
2013-03-04 20:05     ` Thomas Pedersen
2013-03-04 21:10       ` Thomas Pedersen
2013-03-05 18:55         ` Johannes Berg
2013-03-05 18:59   ` Johannes Berg
2013-03-04 15:09 ` [PATCH 1/6] nl80211: explicit userspace MPM Johannes Berg
2013-03-04 19:59   ` Thomas Pedersen

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=1362409848.21028.16.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=devel@lists.open80211s.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=thomas@cozybit.com \
    /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).