mac80211: fix harmless station flush warning
authorJohannes Berg <johannes.berg@intel.com>
Fri, 15 Feb 2013 10:47:50 +0000 (11:47 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 18 Feb 2013 12:48:40 +0000 (13:48 +0100)
If an interface is set down while authenticating or
associating, there's a station entry that will be
removed by the flushing in do_stop() and that will
cause a warning. It's otherwise harmless, but avoid
the warning by calling ieee80211_mgd_stop() first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c

index a1f7194295fedc33b5220be58a03a8244cb5e62d..2c059e54e88575bf1364a17b9a9bc2f020c5a7a6 100644 (file)
@@ -696,6 +696,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
 
        ieee80211_roc_purge(sdata);
 
+       if (sdata->vif.type == NL80211_IFTYPE_STATION)
+               ieee80211_mgd_stop(sdata);
+
        /*
         * Remove all stations associated with this interface.
         *
@@ -783,8 +786,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
                        }
                }
                spin_unlock_irqrestore(&ps->bc_buf.lock, flags);
-       } else if (sdata->vif.type == NL80211_IFTYPE_STATION) {
-               ieee80211_mgd_stop(sdata);
        }
 
        if (going_down)