diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-11-28 03:15:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:04:58 -0500 |
commit | 0b3c07ff6467e6055ca3dd2239494ada96303274 (patch) | |
tree | c6a00ed81c29f8d19ddeaa95d983227dc3d1d80d /drivers/net/wireless/libertas/cmdresp.c | |
parent | a7d0adae40d0effc1484261a66fb703eb7e840b5 (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.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 5165c91897a4..90f1c4974fa7 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) | |||
916 | lbs_deb_enter(LBS_DEB_CMD); | 916 | lbs_deb_enter(LBS_DEB_CMD); |
917 | 917 | ||
918 | spin_lock_irq(&adapter->driver_lock); | 918 | spin_lock_irq(&adapter->driver_lock); |
919 | eventcause = adapter->eventcause; | 919 | eventcause = adapter->eventcause >> SBI_EVENT_CAUSE_SHIFT; |
920 | spin_unlock_irq(&adapter->driver_lock); | 920 | spin_unlock_irq(&adapter->driver_lock); |
921 | 921 | ||
922 | lbs_deb_cmd("event cause 0x%x\n", eventcause); | 922 | lbs_deb_cmd("event cause %d\n", eventcause); |
923 | 923 | ||
924 | switch (eventcause >> SBI_EVENT_CAUSE_SHIFT) { | 924 | switch (eventcause) { |
925 | case MACREG_INT_CODE_LINK_SENSED: | 925 | case MACREG_INT_CODE_LINK_SENSED: |
926 | lbs_deb_cmd("EVENT: MACREG_INT_CODE_LINK_SENSED\n"); | 926 | lbs_deb_cmd("EVENT: MACREG_INT_CODE_LINK_SENSED\n"); |
927 | break; | 927 | break; |
@@ -936,7 +936,7 @@ int lbs_process_event(struct lbs_private *priv) | |||
936 | lbs_mac_event_disconnected(priv); | 936 | lbs_mac_event_disconnected(priv); |
937 | break; | 937 | break; |
938 | 938 | ||
939 | case MACREG_INT_CODE_LINK_LOSE_NO_SCAN: | 939 | case MACREG_INT_CODE_LINK_LOST_NO_SCAN: |
940 | lbs_deb_cmd("EVENT: link lost\n"); | 940 | lbs_deb_cmd("EVENT: link lost\n"); |
941 | lbs_mac_event_disconnected(priv); | 941 | lbs_mac_event_disconnected(priv); |
942 | break; | 942 | break; |
@@ -1030,8 +1030,7 @@ int lbs_process_event(struct lbs_private *priv) | |||
1030 | break; | 1030 | break; |
1031 | 1031 | ||
1032 | default: | 1032 | default: |
1033 | lbs_pr_alert("EVENT: unknown event id 0x%04x\n", | 1033 | lbs_pr_alert("EVENT: unknown event id %d\n", eventcause); |
1034 | eventcause >> SBI_EVENT_CAUSE_SHIFT); | ||
1035 | break; | 1034 | break; |
1036 | } | 1035 | } |
1037 | 1036 | ||