[3.5.y.z,extended,stable] Patch "mac80211: fix ethtool stats for non-station interfaces" has been added to staging queue

Message ID 1375609762-10744-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques Aug. 4, 2013, 9:49 a.m.
This is a note to let you know that I have just added a patch titled

    mac80211: fix ethtool stats for non-station interfaces

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 6d6015ce0c8635589a42e5edd17d028a1a71129d Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes@sipsolutions.net>
Date: Mon, 8 Jul 2013 10:43:31 +0200
Subject: [PATCH] mac80211: fix ethtool stats for non-station interfaces

commit e13bae4f807401729b3f27c7e882a96b8b292809 upstream.

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.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
 net/mac80211/cfg.c | 2 ++
 1 file changed, 2 insertions(+)



diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 56386f1..0042e61 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -561,6 +561,8 @@  static void ieee80211_get_et_stats(struct wiphy *wiphy,
 			if (sta->sdata->dev != dev)

+			sinfo.filled = 0;
+			sta_set_sinfo(sta, &sinfo);
 			i = 0;