diff options
author | Thomas Pedersen <thomas@cozybit.com> | 2013-03-04 13:06:13 -0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 16:36:13 +0100 |
commit | d37bb18ae3a3fa7ef239aad533742a8b07eae15f (patch) | |
tree | e36f11d0356b5ef78b456d80831485f9fff8f579 | |
parent | a6dad6a26e15f2f9269eea41b756c8cf0971b2bc (diff) | |
download | linux-d37bb18ae3a3fa7ef239aad533742a8b07eae15f.tar.gz linux-d37bb18ae3a3fa7ef239aad533742a8b07eae15f.tar.bz2 linux-d37bb18ae3a3fa7ef239aad533742a8b07eae15f.zip |
nl80211: user_mpm overrides auto_open_plinks
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | include/uapi/linux/nl80211.h | 6 | ||||
-rw-r--r-- | 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 8134c6a96f57..79da8710448e 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 946b2e7acdf2..f924d45af1b8 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7449,6 +7449,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; + if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) { err = nl80211_parse_chandef(rdev, info, &setup.chandef); if (err) |