From b5805bf38adaaa457e187e2776b49d4205d71821 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 1 Jul 2009 21:26:42 +0200 Subject: [PATCH] --- yaml --- r: 158867 b: refs/heads/master c: df2b35b65b7142bac2c7add3a1dedde3a373aff3 h: refs/heads/master i: 158865: 930beb879c3dd02c0a41518a696d7c517bbcc637 158863: 27c8b2d21d1ef655320c143115d0684f0b6c9a31 v: v3 --- [refs] | 2 +- trunk/net/wireless/wext.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index aad2956fe4ca..1fa15d3c4abf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c0acf38e0ba42f93d8d56a6db2e2116ea1b23961 +refs/heads/master: df2b35b65b7142bac2c7add3a1dedde3a373aff3 diff --git a/trunk/net/wireless/wext.c b/trunk/net/wireless/wext.c index 252c2010c2e2..5da07e079c20 100644 --- a/trunk/net/wireless/wext.c +++ b/trunk/net/wireless/wext.c @@ -610,6 +610,11 @@ static void wireless_seq_printf_stats(struct seq_file *seq, { /* Get stats from the driver */ struct iw_statistics *stats = get_wireless_stats(dev); + static struct iw_statistics nullstats = {}; + + /* show device if it's wireless regardless of current stats */ + if (!stats && dev->wireless_handlers) + stats = &nullstats; if (stats) { seq_printf(seq, "%6s: %04x %3d%c %3d%c %3d%c %6d %6d %6d " @@ -628,7 +633,9 @@ static void wireless_seq_printf_stats(struct seq_file *seq, stats->discard.nwid, stats->discard.code, stats->discard.fragment, stats->discard.retries, stats->discard.misc, stats->miss.beacon); - stats->qual.updated &= ~IW_QUAL_ALL_UPDATED; + + if (stats != &nullstats) + stats->qual.updated &= ~IW_QUAL_ALL_UPDATED; } }