]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
suppress flags on disabled channels
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 18 Jan 2009 17:13:54 +0000 (18:13 +0100)
committerJohannes Berg <johannes@sipsolutions.net>
Sun, 18 Jan 2009 17:13:54 +0000 (18:13 +0100)
info.c

diff --git a/info.c b/info.c
index cbc3086df148aac1668ab837f9e88cd56a61d96d..bf3b8bd83363ee003ffa0ddc366982e43f8cad24 100644 (file)
--- a/info.c
+++ b/info.c
@@ -151,14 +151,17 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
                                printf(" (%.1f dBm)", 0.01 * nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_MAX_TX_POWER]));
 
                        open = 0;
-                       if (tb_freq[NL80211_FREQUENCY_ATTR_DISABLED])
+                       if (tb_freq[NL80211_FREQUENCY_ATTR_DISABLED]) {
                                print_flag("disabled", &open);
+                               goto next;
+                       }
                        if (tb_freq[NL80211_FREQUENCY_ATTR_PASSIVE_SCAN])
                                print_flag("passive scanning", &open);
                        if (tb_freq[NL80211_FREQUENCY_ATTR_NO_IBSS])
                                print_flag("no IBSS", &open);
                        if (tb_freq[NL80211_FREQUENCY_ATTR_RADAR])
                                print_flag("radar detection", &open);
+ next:
                        if (open)
                                printf(")");
                        printf("\n");