]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - info.c
print more feature flags
[thirdparty/iw.git] / info.c
diff --git a/info.c b/info.c
index 50a90736f6bdf7e983463125d10231cf6a63ffaf..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;
@@ -446,7 +452,8 @@ broken_combination:
 static int handle_info(struct nl80211_state *state,
                       struct nl_cb *cb,
                       struct nl_msg *msg,
-                      int argc, char **argv)
+                      int argc, char **argv,
+                      enum id_input id)
 {
        nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_phy_handler, NULL);