3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-14 16:09:24 +01:00

monitor: Print "None" for empty p2p flags

This commit is contained in:
Andrew Zaborowski 2019-07-15 16:12:52 +02:00 committed by Denis Kenzior
parent ce9e61d727
commit 2a5c2cec46

View File

@ -2784,10 +2784,10 @@ static void print_p2p_device_capability(unsigned int level, const char *label,
return;
}
print_attr(level, "%s:", label);
caps = *(const uint8_t *) data;
print_attr(level, "%s:%s", label, !caps ? " None" : "");
CHECK_CAPS_BIT(P2P_DEVICE_CAP_SVC_DISCOVERY,
"Service Discovery");
CHECK_CAPS_BIT(P2P_DEVICE_CAP_CLIENT_DISCOVERABILITY,
@ -2817,10 +2817,10 @@ static void print_p2p_capability(unsigned int level, const char *label,
print_p2p_device_capability(level, "P2P Device Capability", data++, 1);
print_attr(level, "P2P Group Capability:");
caps = *(const uint8_t *) data++;
print_attr(level, "P2P Group Capability:%s", !caps ? " None" : "");
CHECK_CAPS_BIT(P2P_GROUP_CAP_GO,
"P2P Group Owner");
CHECK_CAPS_BIT(P2P_GROUP_CAP_PERSISTENT_GROUP,
@ -2907,8 +2907,6 @@ static void print_p2p_manageability(unsigned int level, const char *label,
return;
}
print_attr(level, "%s:", label);
#define CHECK_BIT(v, str) \
if (val & (v)) { \
print_attr(level + 1, "%s", (str)); \
@ -2917,6 +2915,8 @@ static void print_p2p_manageability(unsigned int level, const char *label,
val = *(const uint8_t *) data;
print_attr(level, "%s:%s", label, !val ? " None" : "");
CHECK_BIT(P2P_MANAGEABILITY_DEVICE_MGMT, "P2P Device Management");
CHECK_BIT(P2P_MANAGEABILITY_CROSS_CONNECT,
"Cross Connection Permitted");