mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 02:02:33 +01:00
monitor: Print "None" for empty p2p flags
This commit is contained in:
parent
ce9e61d727
commit
2a5c2cec46
@ -2784,10 +2784,10 @@ static void print_p2p_device_capability(unsigned int level, const char *label,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_attr(level, "%s:", label);
|
|
||||||
|
|
||||||
caps = *(const uint8_t *) data;
|
caps = *(const uint8_t *) data;
|
||||||
|
|
||||||
|
print_attr(level, "%s:%s", label, !caps ? " None" : "");
|
||||||
|
|
||||||
CHECK_CAPS_BIT(P2P_DEVICE_CAP_SVC_DISCOVERY,
|
CHECK_CAPS_BIT(P2P_DEVICE_CAP_SVC_DISCOVERY,
|
||||||
"Service Discovery");
|
"Service Discovery");
|
||||||
CHECK_CAPS_BIT(P2P_DEVICE_CAP_CLIENT_DISCOVERABILITY,
|
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_p2p_device_capability(level, "P2P Device Capability", data++, 1);
|
||||||
|
|
||||||
print_attr(level, "P2P Group Capability:");
|
|
||||||
|
|
||||||
caps = *(const uint8_t *) data++;
|
caps = *(const uint8_t *) data++;
|
||||||
|
|
||||||
|
print_attr(level, "P2P Group Capability:%s", !caps ? " None" : "");
|
||||||
|
|
||||||
CHECK_CAPS_BIT(P2P_GROUP_CAP_GO,
|
CHECK_CAPS_BIT(P2P_GROUP_CAP_GO,
|
||||||
"P2P Group Owner");
|
"P2P Group Owner");
|
||||||
CHECK_CAPS_BIT(P2P_GROUP_CAP_PERSISTENT_GROUP,
|
CHECK_CAPS_BIT(P2P_GROUP_CAP_PERSISTENT_GROUP,
|
||||||
@ -2907,8 +2907,6 @@ static void print_p2p_manageability(unsigned int level, const char *label,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_attr(level, "%s:", label);
|
|
||||||
|
|
||||||
#define CHECK_BIT(v, str) \
|
#define CHECK_BIT(v, str) \
|
||||||
if (val & (v)) { \
|
if (val & (v)) { \
|
||||||
print_attr(level + 1, "%s", (str)); \
|
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;
|
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_DEVICE_MGMT, "P2P Device Management");
|
||||||
CHECK_BIT(P2P_MANAGEABILITY_CROSS_CONNECT,
|
CHECK_BIT(P2P_MANAGEABILITY_CROSS_CONNECT,
|
||||||
"Cross Connection Permitted");
|
"Cross Connection Permitted");
|
||||||
|
Loading…
Reference in New Issue
Block a user