aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-12-03 03:20:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-06 16:01:29 -0500
commit29cbe68c516a48a9a88b3226878570c6cbd83c02 (patch)
tree4774f8a3a244236234a521baa4d1ae5b3e1494ba /net/mac80211/mesh.c
parentbd90fdcc5fbd99a2a778999610420cf793bd1be2 (diff)
cfg80211/mac80211: add mesh join/leave commands
Instead of tying mesh activity to interface up, add join and leave commands for mesh. Since we must be backward compatible, let cfg80211 handle joining a mesh if a mesh ID was pre-configured when the device goes up. Note that this therefore must modify mac80211 as well since mac80211 needs to lose the logic to start the mesh on interface up. We now allow querying mesh parameters before the mesh is connected, which simply returns defaults. Setting them (internally renamed to "update") is only allowed while connected. Specify them with the new mesh join command instead where needed. In mac80211, beaconing must now also follow the mesh enabled/not enabled state, which is done by testing the mesh ID. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r--net/mac80211/mesh.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 0d3234875ac5..63e1188d5062 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -530,6 +530,11 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
530void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) 530void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
531{ 531{
532 struct ieee80211_local *local = sdata->local; 532 struct ieee80211_local *local = sdata->local;
533 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
534
535 ifmsh->mesh_id_len = 0;
536 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
537 sta_info_flush(local, NULL);
533 538
534 del_timer_sync(&sdata->u.mesh.housekeeping_timer); 539 del_timer_sync(&sdata->u.mesh.housekeeping_timer);
535 del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); 540 del_timer_sync(&sdata->u.mesh.mesh_path_root_timer);
@@ -674,27 +679,6 @@ void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
674 ieee80211_mesh_housekeeping_timer, 679 ieee80211_mesh_housekeeping_timer,
675 (unsigned long) sdata); 680 (unsigned long) sdata);
676 681
677 ifmsh->mshcfg.dot11MeshRetryTimeout = MESH_RET_T;
678 ifmsh->mshcfg.dot11MeshConfirmTimeout = MESH_CONF_T;
679 ifmsh->mshcfg.dot11MeshHoldingTimeout = MESH_HOLD_T;
680 ifmsh->mshcfg.dot11MeshMaxRetries = MESH_MAX_RETR;
681 ifmsh->mshcfg.dot11MeshTTL = MESH_TTL;
682 ifmsh->mshcfg.element_ttl = MESH_DEFAULT_ELEMENT_TTL;
683 ifmsh->mshcfg.auto_open_plinks = true;
684 ifmsh->mshcfg.dot11MeshMaxPeerLinks =
685 MESH_MAX_ESTAB_PLINKS;
686 ifmsh->mshcfg.dot11MeshHWMPactivePathTimeout =
687 MESH_PATH_TIMEOUT;
688 ifmsh->mshcfg.dot11MeshHWMPpreqMinInterval =
689 MESH_PREQ_MIN_INT;
690 ifmsh->mshcfg.dot11MeshHWMPnetDiameterTraversalTime =
691 MESH_DIAM_TRAVERSAL_TIME;
692 ifmsh->mshcfg.dot11MeshHWMPmaxPREQretries =
693 MESH_MAX_PREQ_RETRIES;
694 ifmsh->mshcfg.path_refresh_time =
695 MESH_PATH_REFRESH_TIME;
696 ifmsh->mshcfg.min_discovery_timeout =
697 MESH_MIN_DISCOVERY_TIMEOUT;
698 ifmsh->accepting_plinks = true; 682 ifmsh->accepting_plinks = true;
699 ifmsh->preq_id = 0; 683 ifmsh->preq_id = 0;
700 ifmsh->sn = 0; 684 ifmsh->sn = 0;