monitor: Actually print management frame subtype

The subtype was only printed if mpdu_validate had returned an error for
the frame, i.e. would not be printed for well formed frames.  This was
probably an intent to avoid printing the frame subtype after all the
conents of the body frame had been printed already, but iwmon only
supports printing of Authentication and Deauthentication frames so far.
This commit is contained in:
Andrew Zaborowski 2017-08-14 14:49:19 +02:00 committed by Denis Kenzior
parent a9cbb95260
commit e6765c1e9b
1 changed files with 11 additions and 5 deletions

View File

@ -2567,6 +2567,8 @@ static void print_frame_type(unsigned int level, const char *label,
print_attr(level + 1, "Type: %s (%u)", str, type);
str = NULL;
switch (subtype) {
case 0x00:
str = "Association request";
@ -2599,12 +2601,16 @@ static void print_frame_type(unsigned int level, const char *label,
str = "Disassociation";
break;
case 0x0b:
str = "Authentication";
print_authentication_mgmt_frame(level + 1, mpdu);
if (mpdu)
print_authentication_mgmt_frame(level + 1, mpdu);
else
str = "Authentication";
break;
case 0x0c:
str = "Deauthentication";
print_deauthentication_mgmt_frame(level + 1, mpdu);
if (mpdu)
print_deauthentication_mgmt_frame(level + 1, mpdu);
else
str = "Deauthentication";
break;
case 0x0d:
str = "Action";
@ -2617,7 +2623,7 @@ static void print_frame_type(unsigned int level, const char *label,
break;
}
if (!mpdu)
if (str)
print_attr(level + 1, "Subtype: %s (%u)", str, subtype);
}