monitor: Print Power constraint

This commit is contained in:
Patrik Flykt 2014-12-12 15:51:40 +02:00 committed by Denis Kenzior
parent 87b49f8071
commit afbf098774
1 changed files with 15 additions and 0 deletions

View File

@ -410,6 +410,19 @@ static void print_ie_country(unsigned int level, const char *label,
}
}
static void print_ie_power_constraint(unsigned int level, const char *label,
const void *data, uint16_t size)
{
uint8_t *dB = (uint8_t *)data;
if (!size) {
print_ie_error(level, label, size, -EINVAL);
return;
}
print_attr(level, "%s: %2d dB", label, *dB);
}
static struct attr_entry ie_entry[] = {
{IE_TYPE_SUPPORTED_RATES, "Supported rates",
ATTR_CUSTOM, { .function = print_ie_rate } },
@ -417,6 +430,8 @@ static struct attr_entry ie_entry[] = {
ATTR_CUSTOM, { .function = print_ie_ds } },
{IE_TYPE_COUNTRY, "Country",
ATTR_CUSTOM, { .function = print_ie_country } },
{IE_TYPE_POWER_CONSTRAINT, "Power constraint",
ATTR_CUSTOM, { .function = print_ie_power_constraint } },
{IE_TYPE_EXTENDED_SUPPORTED_RATES, "Extended supported rates",
ATTR_CUSTOM, { .function = print_ie_rate } },
{IE_TYPE_VENDOR_SPECIFIC, "Vendor specific",