diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-07-08 04:43:31 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-07-16 02:55:57 -0400 |
commit | e13bae4f807401729b3f27c7e882a96b8b292809 (patch) | |
tree | 684b6ea08bd952005d76debede813d71847d4cfa /net/mac80211 | |
parent | 1cd158573951f737fbc878a35cb5eb47bf9af3d5 (diff) |
mac80211: fix ethtool stats for non-station interfaces
As reported in https://bugzilla.kernel.org/show_bug.cgi?id=60514,
the station loop never initialises 'sinfo' and therefore adds up
a stack values, leaking stack information (the number of times it
adds values is easily obtained another way.)
Fix this by initialising the sinfo for each station to add.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8184d121ff09..43dd7525bfcb 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -666,6 +666,8 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy, | |||
666 | if (sta->sdata->dev != dev) | 666 | if (sta->sdata->dev != dev) |
667 | continue; | 667 | continue; |
668 | 668 | ||
669 | sinfo.filled = 0; | ||
670 | sta_set_sinfo(sta, &sinfo); | ||
669 | i = 0; | 671 | i = 0; |
670 | ADD_STA_STATS(sta); | 672 | ADD_STA_STATS(sta); |
671 | } | 673 | } |