diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-02-25 15:40:46 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-27 14:06:42 -0500 |
commit | 3431683759596409427b6726e582f3ee66082728 (patch) | |
tree | 736901410602632b4d3dbc33b019366829561487 /net/mac80211/sta_info.c | |
parent | 54e4ffb2abb3c086637cbc75a2bfe55a8ce987c8 (diff) |
mac80211: fix sta_info_flush() return value
The comment for sta_info_flush() states
"Returns the number of removed STA entries"
but that isn't actually true. Consequently,
the warning when a station is still around
on interface removal can never trigger and
this delayed finding the timer issue the
previous patch fixed. Fix the return value
here to make that warning useful again.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 4034ee616022..98613c8f08cf 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -865,8 +865,10 @@ int sta_info_flush(struct ieee80211_local *local, | |||
865 | 865 | ||
866 | mutex_lock(&local->sta_mtx); | 866 | mutex_lock(&local->sta_mtx); |
867 | list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { | 867 | list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { |
868 | if (!sdata || sdata == sta->sdata) | 868 | if (!sdata || sdata == sta->sdata) { |
869 | WARN_ON(__sta_info_destroy(sta)); | 869 | WARN_ON(__sta_info_destroy(sta)); |
870 | ret++; | ||
871 | } | ||
870 | } | 872 | } |
871 | mutex_unlock(&local->sta_mtx); | 873 | mutex_unlock(&local->sta_mtx); |
872 | 874 | ||