summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.c
diff options
context:
space:
mode:
authorJacob Minshall <jacob@cozybit.com>2013-05-29 14:32:36 -0700
committerJohannes Berg <johannes.berg@intel.com>2013-06-03 17:03:18 +0200
commite05ecccdf752122a439b03c3190458d2c8f0bac6 (patch)
treed6f791d3507a28ffe6ac3fba22f9b72219981735 /net/mac80211/mesh.c
parent866403a7bdd3941cbb4e2085d8ac368dcabe800c (diff)
mac80211: set mesh formation field properly
Cap max peerings at 63 in accordance with IEEE-2012 8.4.2.100.7. Triggers a beacon regeneration every time the number of peerings changes. Previously this would only happen if the "accepting peerings" bit changed. Signed-off-by: Jacob Minshall <jacob@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r--net/mac80211/mesh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index b3d1fdd4636..73a597bad6e 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -274,8 +274,7 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata,
*pos++ = ifmsh->mesh_auth_id;
/* Mesh Formation Info - number of neighbors */
neighbors = atomic_read(&ifmsh->estab_plinks);
- /* Number of neighbor mesh STAs or 15 whichever is smaller */
- neighbors = (neighbors > 15) ? 15 : neighbors;
+ neighbors = min_t(int, neighbors, IEEE80211_MAX_MESH_PEERINGS);
*pos++ = neighbors << 1;
/* Mesh capability */
*pos = IEEE80211_MESHCONF_CAPAB_FORWARDING;