]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
print more feature flags
authorJohannes Berg <johannes.berg@intel.com>
Tue, 16 Oct 2012 18:12:37 +0000 (20:12 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Oct 2012 18:13:28 +0000 (20:13 +0200)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
info.c

diff --git a/info.c b/info.c
index f039bba04981f348d4ef359d9bd1f4681fb3c0d2..c4b5de27da1b26af4aabc6d1675a5c9791f1cf76 100644 (file)
--- a/info.c
+++ b/info.c
@@ -432,12 +432,18 @@ broken_combination:
        }
 
        if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
-               if (nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]) &
-                               NL80211_FEATURE_SK_TX_STATUS)
+               unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
+
+               if (features & NL80211_FEATURE_SK_TX_STATUS)
                        printf("\tDevice supports TX status socket option.\n");
-               if (nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]) &
-                               NL80211_FEATURE_HT_IBSS)
+               if (features & NL80211_FEATURE_HT_IBSS)
                        printf("\tDevice supports HT-IBSS.\n");
+               if (features & NL80211_FEATURE_INACTIVITY_TIMER)
+                       printf("\tDevice has client inactivity timer.\n");
+               if (features & NL80211_FEATURE_CELL_BASE_REG_HINTS)
+                       printf("\tDevice accepts cell base station regulatory hints.\n");
+               if (features & NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL)
+                       printf("\tP2P Device uses a channel (of the concurrent ones)\n");
        }
 
        return NL_SKIP;