diff options
author | Marco Porsch <marco@cozybit.com> | 2013-01-07 10:04:51 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-16 16:44:04 -0500 |
commit | 9bdbf04db099c11bbbaea9dcea7465c508531fb8 (patch) | |
tree | 777ad3519262076879f8a5a7c068a2704808d8f5 /net/wireless/nl80211.c | |
parent | eac70c135def117849faa7cc8b7ccb941498085f (diff) |
{cfg,nl,mac}80211: set beacon interval and DTIM period on mesh join
Move the default mesh beacon interval and DTIM period to cfg80211
and make them accessible to nl80211. This enables setting both
values when joining an MBSS.
Previously the DTIM parameter was not set by mac80211 so the
driver's default value was used.
Signed-off-by: Marco Porsch <marco@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ceb27fda9ec5..d5842eb35aec 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -6669,6 +6669,21 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info) | |||
6669 | nla_get_u32(info->attrs[NL80211_ATTR_MCAST_RATE]))) | 6669 | nla_get_u32(info->attrs[NL80211_ATTR_MCAST_RATE]))) |
6670 | return -EINVAL; | 6670 | return -EINVAL; |
6671 | 6671 | ||
6672 | if (info->attrs[NL80211_ATTR_BEACON_INTERVAL]) { | ||
6673 | setup.beacon_interval = | ||
6674 | nla_get_u32(info->attrs[NL80211_ATTR_BEACON_INTERVAL]); | ||
6675 | if (setup.beacon_interval < 10 || | ||
6676 | setup.beacon_interval > 10000) | ||
6677 | return -EINVAL; | ||
6678 | } | ||
6679 | |||
6680 | if (info->attrs[NL80211_ATTR_DTIM_PERIOD]) { | ||
6681 | setup.dtim_period = | ||
6682 | nla_get_u32(info->attrs[NL80211_ATTR_DTIM_PERIOD]); | ||
6683 | if (setup.dtim_period < 1 || setup.dtim_period > 100) | ||
6684 | return -EINVAL; | ||
6685 | } | ||
6686 | |||
6672 | if (info->attrs[NL80211_ATTR_MESH_SETUP]) { | 6687 | if (info->attrs[NL80211_ATTR_MESH_SETUP]) { |
6673 | /* parse additional setup parameters if given */ | 6688 | /* parse additional setup parameters if given */ |
6674 | err = nl80211_parse_mesh_setup(info, &setup); | 6689 | err = nl80211_parse_mesh_setup(info, &setup); |