Commit 3bc819e8 authored by matthieu castet's avatar matthieu castet Committed by John W. Linville

airo : fix printing status info

For some status, reason is encoded in the low byte, but airo_print_status forgot tp mask low byte in status parsing.

This make it only work when reason is 0.
Signed-off-by: default avatarMatthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 85373ee8
...@@ -3193,19 +3193,26 @@ static void airo_print_status(const char *devname, u16 status) ...@@ -3193,19 +3193,26 @@ static void airo_print_status(const char *devname, u16 status)
{ {
u8 reason = status & 0xFF; u8 reason = status & 0xFF;
switch (status) { switch (status & 0xFF00) {
case STAT_NOBEACON: case STAT_NOBEACON:
airo_print_dbg(devname, "link lost (missed beacons)"); switch (status) {
break; case STAT_NOBEACON:
case STAT_MAXRETRIES: airo_print_dbg(devname, "link lost (missed beacons)");
case STAT_MAXARL: break;
airo_print_dbg(devname, "link lost (max retries)"); case STAT_MAXRETRIES:
break; case STAT_MAXARL:
case STAT_FORCELOSS: airo_print_dbg(devname, "link lost (max retries)");
airo_print_dbg(devname, "link lost (local choice)"); break;
break; case STAT_FORCELOSS:
case STAT_TSFSYNC: airo_print_dbg(devname, "link lost (local choice)");
airo_print_dbg(devname, "link lost (TSF sync lost)"); break;
case STAT_TSFSYNC:
airo_print_dbg(devname, "link lost (TSF sync lost)");
break;
default:
airo_print_dbg(devname, "unknow status %x\n", status);
break;
}
break; break;
case STAT_DEAUTH: case STAT_DEAUTH:
airo_print_dbg(devname, "deauthenticated (reason: %d)", reason); airo_print_dbg(devname, "deauthenticated (reason: %d)", reason);
...@@ -3221,7 +3228,11 @@ static void airo_print_status(const char *devname, u16 status) ...@@ -3221,7 +3228,11 @@ static void airo_print_status(const char *devname, u16 status)
airo_print_dbg(devname, "authentication failed (reason: %d)", airo_print_dbg(devname, "authentication failed (reason: %d)",
reason); reason);
break; break;
case STAT_ASSOC:
case STAT_REASSOC:
break;
default: default:
airo_print_dbg(devname, "unknow status %x\n", status);
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment