-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
35f4962
commit bfb2781
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* Copied from cfg.c - originally | ||
* Copyright 2006-2010 Johannes Berg <[email protected]> | ||
* 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); | ||
|