* [PATCH] airo : fix printing status info
@ 2010-02-28 14:31 matthieu castet
0 siblings, 0 replies; only message in thread
From: matthieu castet @ 2010-02-28 14:31 UTC (permalink / raw)
To: linux-wireless; +Cc: Dan Williams
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
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>
[-- Attachment #2: airo_status.diff --]
[-- Type: text/x-diff, Size: 1482 bytes --]
Index: airo.c
===================================================================
--- 1/drivers/net/wireless/airo.c
+++ 2/drivers/net/wireless/airo.c
@@ -3325,20 +3325,27 @@
{
u8 reason = status & 0xFF;
- switch (status) {
+ switch (status & 0xFF00) {
case STAT_NOBEACON:
- airo_print_dbg(devname, "link lost (missed beacons)");
+ switch (status) {
+ case STAT_NOBEACON:
+ airo_print_dbg(devname, "link lost (missed beacons)");
+ break;
+ case STAT_MAXRETRIES:
+ case STAT_MAXARL:
+ airo_print_dbg(devname, "link lost (max retries)");
+ break;
+ case STAT_FORCELOSS:
+ airo_print_dbg(devname, "link lost (local choice)");
+ 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;
- case STAT_MAXRETRIES:
- case STAT_MAXARL:
- airo_print_dbg(devname, "link lost (max retries)");
- break;
- case STAT_FORCELOSS:
- airo_print_dbg(devname, "link lost (local choice)");
- break;
- case STAT_TSFSYNC:
- airo_print_dbg(devname, "link lost (TSF sync lost)");
- break;
case STAT_DEAUTH:
airo_print_dbg(devname, "deauthenticated (reason: %d)", reason);
break;
@@ -3353,7 +3360,11 @@
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;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-28 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28 14:31 [PATCH] airo : fix printing status info matthieu castet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).