mac80211: Assign a default mesh beaconing interval.
authorJavier Cardona <javier@cozybit.com>
Mon, 10 Aug 2009 19:15:51 +0000 (12:15 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:14:01 +0000 (09:14 -0400)
The mesh stack was enabling beaconing without specifying an interval.  This
patch defines a default beaconing interval of 1s.

Incidentally, this fixes mesh beaconing in mac80211_hwsim devices.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh.c
net/mac80211/mesh.h

index 10d93386042a7b5c11a1cf458a8d1699653e1aaf..25d0065778efc3b042a61ae3f8b0d0da2a842c3a 100644 (file)
@@ -525,9 +525,11 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
        struct ieee80211_local *local = sdata->local;
 
        ifmsh->housekeeping = true;
-       ieee80211_queue_work(&local->hw, &ifmsh->work);
+       queue_work(local->hw, &ifmsh->work);
+       sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL;
        ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON |
-                                               BSS_CHANGED_BEACON_ENABLED);
+                                               BSS_CHANGED_BEACON_ENABLED |
+                                               BSS_CHANGED_BEACON_INT);
 }
 
 void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
index 2ebd74cb0380660359c108555c5b539af86bfe81..4241925095c7758c9214b730c6883838e10f37e7 100644 (file)
@@ -174,6 +174,7 @@ struct mesh_rmc {
  */
 #define MESH_PATH_REFRESH_TIME                 1000
 #define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME)
+#define MESH_DEFAULT_BEACON_INTERVAL           1000    /* in 1024 us units */
 
 #define MESH_MAX_PREQ_RETRIES 4
 #define MESH_PATH_EXPIRE (600 * HZ)