X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=net%2Fmac80211%2Fsta_info.c;h=7199b9d5b2f45995ca92d11aebfa6ed273075aef;hb=051007d9e281cd8ea603a4cc4c96b0170b26c7e9;hp=d743645a17b587d790a4254cb6bad32e05271300;hpb=09f4114e02aac9cbf40553a17580b07ab29715d8;p=deliverable%2Flinux.git diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index d743645a17b5..7199b9d5b2f4 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -104,6 +104,16 @@ static void cleanup_single_sta(struct sta_info *sta) * neither mac80211 nor the driver can reference this * sta struct any more except by still existing timers * associated with this station that we clean up below. + * + * Note though that this still uses the sdata and even + * calls the driver in AP and mesh mode, so interfaces + * of those types mush use call sta_info_flush_cleanup() + * (typically via sta_info_flush()) before deconfiguring + * the driver. + * + * In station mode, nothing happens here so it doesn't + * have to (and doesn't) do that, this is intentional to + * speed up roaming. */ if (test_sta_flag(sta, WLAN_STA_PS_STA)) { @@ -887,14 +897,8 @@ void sta_info_stop(struct ieee80211_local *local) del_timer_sync(&local->sta_cleanup); } -/** - * sta_info_flush - flush matching STA entries from the STA table - * - * Returns the number of removed STA entries. - * - * @sdata: sdata to remove all stations from - */ -int sta_info_flush(struct ieee80211_sub_if_data *sdata) + +int sta_info_flush_defer(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; struct sta_info *sta, *tmp; @@ -911,12 +915,15 @@ int sta_info_flush(struct ieee80211_sub_if_data *sdata) } mutex_unlock(&local->sta_mtx); + return ret; +} + +void sta_info_flush_cleanup(struct ieee80211_sub_if_data *sdata) +{ rcu_barrier(); ieee80211_cleanup_sdata_stas(sdata); cancel_work_sync(&sdata->cleanup_stations_wk); - - return ret; } void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,