summaryrefslogtreecommitdiff
path: root/net/wireless/mesh.c
diff options
context:
space:
mode:
authorAshok Nagarajan <ashok@cozybit.com>2013-06-03 17:33:36 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2013-06-11 12:24:36 (GMT)
commitffb3cf3000aa12facdccbdfcb10bfebda7199209 (patch)
treec53a2391c5750b5e9547e9122cabb412c5d43ea6 /net/wireless/mesh.c
parent66de671374f003467b5ef7c65ecbe1930480c8c9 (diff)
downloadlinux-ffb3cf3000aa12facdccbdfcb10bfebda7199209.tar.xz
{nl,mac,cfg}80211: Allow user to configure basic rates for mesh
Currently mesh uses mandatory rates as the default basic rates. Allow basic rates to be configured during mesh join. Basic rates are applied only if channel is also provided with mesh join command. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> [some whitespace fixes, refuse basic rates w/o channel] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mesh.c')
-rw-r--r--net/wireless/mesh.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index 0daaf72..30c4920 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -162,6 +162,16 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
setup->chandef.center_freq1 = setup->chandef.chan->center_freq;
}
+ /*
+ * check if basic rates are available otherwise use mandatory rates as
+ * basic rates
+ */
+ if (!setup->basic_rates) {
+ struct ieee80211_supported_band *sband =
+ rdev->wiphy.bands[setup->chandef.chan->band];
+ setup->basic_rates = ieee80211_mandatory_rates(sband);
+ }
+
if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef))
return -EINVAL;