]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/mesh.c
fastboot: make the raid autodetect code wait for all devices to init
[karo-tx-linux.git] / net / mac80211 / mesh.c
index 9e47725cc59218743bca76a0085bc46785322d55..8013277924f2d75fca8acca678cbebb079c0f8a4 100644 (file)
@@ -351,7 +351,7 @@ static void ieee80211_mesh_path_timer(unsigned long data)
        struct ieee80211_sub_if_data *sdata =
                (struct ieee80211_sub_if_data *) data;
        struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
-       struct ieee80211_local *local = wdev_priv(&sdata->wdev);
+       struct ieee80211_local *local = sdata->local;
 
        queue_work(local->hw.workqueue, &ifmsh->work);
 }
@@ -448,6 +448,15 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
 void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
 {
        del_timer_sync(&sdata->u.mesh.housekeeping_timer);
+       /*
+        * If the timer fired while we waited for it, it will have
+        * requeued the work. Now the work will be running again
+        * but will not rearm the timer again because it checks
+        * whether the interface is running, which, at this point,
+        * it no longer is.
+        */
+       cancel_work_sync(&sdata->u.mesh.work);
+
        /*
         * When we get here, the interface is marked down.
         * Call synchronize_rcu() to wait for the RX path
@@ -557,7 +566,7 @@ static void ieee80211_mesh_work(struct work_struct *work)
        if (!netif_running(sdata->dev))
                return;
 
-       if (local->sta_sw_scanning || local->sta_hw_scanning)
+       if (local->sw_scanning || local->hw_scanning)
                return;
 
        while ((skb = skb_dequeue(&ifmsh->skb_queue)))