diff mbox

[RFC,5/5,v2] cfg80211/mac80211: add mesh join/leave commands

Message ID AANLkTi=8yikvhvbUS86FZabM5qXbZ1LNHeT+2JQGU+QS@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Javier Cardona Dec. 2, 2010, 9:24 p.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 107a0cb..2de6976 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -246,7 +246,8 @@  void ieee80211_bss_info_change_notify(struct
ieee80211_sub_if_data *sdata,
                                        !!sdata->u.ibss.presp;
                                break;
                        case NL80211_IFTYPE_MESH_POINT:
-                               sdata->vif.bss_conf.enable_beacon = true;
+                               sdata->vif.bss_conf.enable_beacon =
+                                       !!sdata->u.mesh.mesh_id_len;
                                break;
                        default:
                                /* not reached */
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index d814fab..63e1188 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)
 void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
 {
        struct ieee80211_local *local = sdata->local;
+       struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+
+       ifmsh->mesh_id_len = 0;
+       ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
+       sta_info_flush(local, NULL);

        del_timer_sync(&sdata->u.mesh.housekeeping_timer);