aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.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/iface.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/iface.c')
-rw-r--r--net/mac80211/iface.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 96e27f1e79f..f0f11bb794a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -268,9 +268,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
268 goto err_stop; 268 goto err_stop;
269 } 269 }
270 270
271 if (ieee80211_vif_is_mesh(&sdata->vif)) { 271 if (sdata->vif.type == NL80211_IFTYPE_AP) {
272 ieee80211_start_mesh(sdata);
273 } else if (sdata->vif.type == NL80211_IFTYPE_AP) {
274 local->fif_pspoll++; 272 local->fif_pspoll++;
275 local->fif_probe_req++; 273 local->fif_probe_req++;
276 274
@@ -495,10 +493,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
495 ieee80211_adjust_monitor_flags(sdata, -1); 493 ieee80211_adjust_monitor_flags(sdata, -1);
496 ieee80211_configure_filter(local); 494 ieee80211_configure_filter(local);
497 break; 495 break;
498 case NL80211_IFTYPE_MESH_POINT:
499 if (ieee80211_vif_is_mesh(&sdata->vif))
500 ieee80211_stop_mesh(sdata);
501 /* fall through */
502 default: 496 default:
503 flush_work(&sdata->work); 497 flush_work(&sdata->work);
504 /* 498 /*
@@ -1188,12 +1182,6 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
1188 if (ret) 1182 if (ret)
1189 goto fail; 1183 goto fail;
1190 1184
1191 if (ieee80211_vif_is_mesh(&sdata->vif) &&
1192 params && params->mesh_id_len)
1193 ieee80211_sdata_set_mesh_id(sdata,
1194 params->mesh_id_len,
1195 params->mesh_id);
1196
1197 mutex_lock(&local->iflist_mtx); 1185 mutex_lock(&local->iflist_mtx);
1198 list_add_tail_rcu(&sdata->list, &local->interfaces); 1186 list_add_tail_rcu(&sdata->list, &local->interfaces);
1199 mutex_unlock(&local->iflist_mtx); 1187 mutex_unlock(&local->iflist_mtx);