aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-11-28 09:15:11 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:04:58 -0800
commit0b3c07ff6467e6055ca3dd2239494ada96303274 (patch)
treec6a00ed81c29f8d19ddeaa95d983227dc3d1d80d /drivers/net/wireless/libertas/cmdresp.c
parenta7d0adae40d0effc1484261a66fb703eb7e840b5 (diff)
libertas: less eventcause shifts
* only shift eventcause once * convert mac events to decimal, as this is what the firmware manual uses in section 6.1, too Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 5165c91897a..90f1c4974fa 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -916,12 +916,12 @@ int lbs_process_event(struct lbs_private *priv)
lbs_deb_enter(LBS_DEB_CMD);
spin_lock_irq(&adapter->driver_lock);
- eventcause = adapter->eventcause;
+ eventcause = adapter->eventcause >> SBI_EVENT_CAUSE_SHIFT;
spin_unlock_irq(&adapter->driver_lock);
- lbs_deb_cmd("event cause 0x%x\n", eventcause);
+ lbs_deb_cmd("event cause %d\n", eventcause);
- switch (eventcause >> SBI_EVENT_CAUSE_SHIFT) {
+ switch (eventcause) {
case MACREG_INT_CODE_LINK_SENSED:
lbs_deb_cmd("EVENT: MACREG_INT_CODE_LINK_SENSED\n");
break;
@@ -936,7 +936,7 @@ int lbs_process_event(struct lbs_private *priv)
lbs_mac_event_disconnected(priv);
break;
- case MACREG_INT_CODE_LINK_LOSE_NO_SCAN:
+ case MACREG_INT_CODE_LINK_LOST_NO_SCAN:
lbs_deb_cmd("EVENT: link lost\n");
lbs_mac_event_disconnected(priv);
break;
@@ -1030,8 +1030,7 @@ int lbs_process_event(struct lbs_private *priv)
break;
default:
- lbs_pr_alert("EVENT: unknown event id 0x%04x\n",
- eventcause >> SBI_EVENT_CAUSE_SHIFT);
+ lbs_pr_alert("EVENT: unknown event id %d\n", eventcause);
break;
}