diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-04-20 12:49:22 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-05-07 20:49:59 +0200 |
commit | bfb27814e3d89a6abf362542bc4b26d84debc5b6 (patch) | |
tree | bbf8dfcc2d580e9b0be71eba8023633ecc2ecf96 /net/mac80211 | |
parent | mac80211: clean up rate info bandwidth setting (diff) | |
download | linux-bfb27814e3d89a6abf362542bc4b26d84debc5b6.tar.xz linux-bfb27814e3d89a6abf362542bc4b26d84debc5b6.zip |
mac80211: ethtool: memset the whole sinfo struct to 0
Rather than just setting the valid flags to 0 set the
whole struct to 0 since other places might rely on it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ethtool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c index 9cc986deda61..08408520c3f8 100644 --- a/net/mac80211/ethtool.c +++ b/net/mac80211/ethtool.c @@ -4,6 +4,7 @@ * Copied from cfg.c - originally * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> * Copyright 2014 Intel Corporation (Author: Johannes Berg) + * Copyright (C) 2018 Intel Corporation * * This file is GPLv2 as found in COPYING. */ @@ -106,7 +107,7 @@ static void ieee80211_get_stats(struct net_device *dev, if (!(sta && !WARN_ON(sta->sdata->dev != dev))) goto do_survey; - sinfo.filled = 0; + memset(&sinfo, 0, sizeof(sinfo)); sta_set_sinfo(sta, &sinfo); i = 0; @@ -133,7 +134,7 @@ static void ieee80211_get_stats(struct net_device *dev, if (sta->sdata->dev != dev) continue; - sinfo.filled = 0; + memset(&sinfo, 0, sizeof(sinfo)); sta_set_sinfo(sta, &sinfo); i = 0; ADD_STA_STATS(sta); |