diff mbox

iw: don't print DFS states of disabled frequencies

Message ID 1364296189-10386-1-git-send-email-zefir.kurtisi@neratec.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Zefir Kurtisi March 26, 2013, 11:09 a.m. UTC
Also, fix indentation.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 info.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

Comments

Johannes Berg March 26, 2013, 12:20 p.m. UTC | #1
On Tue, 2013-03-26 at 12:09 +0100, Zefir Kurtisi wrote:
> Also, fix indentation.

Applied.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/info.c b/info.c
index 3d4eaeb..209e882 100644
--- a/info.c
+++ b/info.c
@@ -183,17 +183,18 @@  next:
 						printf(")");
 					printf("\n");
 
-				if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]) {
-					enum nl80211_dfs_state state = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]);
-					unsigned long time;
-
-					printf("\t\t\t  DFS state: %s", dfs_state_name(state));
-					if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_TIME]) {
-						time = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_DFS_TIME]);
-						printf(" (for %lu sec)", time/1000);
+					if (!tb_freq[NL80211_FREQUENCY_ATTR_DISABLED] && tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]) {
+						enum nl80211_dfs_state state = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]);
+						unsigned long time;
+
+						printf("\t\t\t  DFS state: %s", dfs_state_name(state));
+						if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_TIME]) {
+							time = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_DFS_TIME]);
+							printf(" (for %lu sec)", time/1000);
+						}
+						printf("\n");
 					}
-					printf("\n");
-				}
+
 				}
 			}