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: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
matthieu castet 2010-02-28 15:31:21 +01:00 committed by John W. Linville
parent 85373ee817
commit 3bc819e8d4

View file

@ -3193,6 +3193,8 @@ static void airo_print_status(const char *devname, u16 status)
{
u8 reason = status & 0xFF;
switch (status & 0xFF00) {
case STAT_NOBEACON:
switch (status) {
case STAT_NOBEACON:
airo_print_dbg(devname, "link lost (missed beacons)");
@ -3207,6 +3209,11 @@ static void airo_print_status(const char *devname, u16 status)
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;
case STAT_DEAUTH:
airo_print_dbg(devname, "deauthenticated (reason: %d)", reason);
break;
@ -3221,7 +3228,11 @@ static void airo_print_status(const char *devname, u16 status)
airo_print_dbg(devname, "authentication failed (reason: %d)",
reason);
break;
case STAT_ASSOC:
case STAT_REASSOC:
break;
default:
airo_print_dbg(devname, "unknow status %x\n", status);
break;
}
}