diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-06-12 07:17:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:50 -0400 |
commit | 80301cdcfe44e3533175be23d7d52a9fc8c3fdb0 (patch) | |
tree | 624d018b822016a8f83d49588012519a4e9a4d16 /drivers/net/wireless/wl12xx/wl1251_event.c | |
parent | 1e6f172fccbf1194bad4b2aeae437ec3189a3f08 (diff) |
wl1251: use wl1251 prefix everywhere
Last we can change all code prefixes from wl12xx/WL12XX to
wl1251/WL1251.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_event.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_event.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_event.c b/drivers/net/wireless/wl12xx/wl1251_event.c index a6d92349add4..1a0a0bc1a31f 100644 --- a/drivers/net/wireless/wl12xx/wl1251_event.c +++ b/drivers/net/wireless/wl12xx/wl1251_event.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of wl12xx | 2 | * This file is part of wl1251 |
3 | * | 3 | * |
4 | * Copyright (c) 1998-2007 Texas Instruments Incorporated | 4 | * Copyright (c) 1998-2007 Texas Instruments Incorporated |
5 | * Copyright (C) 2008 Nokia Corporation | 5 | * Copyright (C) 2008 Nokia Corporation |
@@ -28,10 +28,10 @@ | |||
28 | #include "wl1251_event.h" | 28 | #include "wl1251_event.h" |
29 | #include "wl1251_ps.h" | 29 | #include "wl1251_ps.h" |
30 | 30 | ||
31 | static int wl12xx_event_scan_complete(struct wl12xx *wl, | 31 | static int wl1251_event_scan_complete(struct wl1251 *wl, |
32 | struct event_mailbox *mbox) | 32 | struct event_mailbox *mbox) |
33 | { | 33 | { |
34 | wl12xx_debug(DEBUG_EVENT, "status: 0x%x, channels: %d", | 34 | wl1251_debug(DEBUG_EVENT, "status: 0x%x, channels: %d", |
35 | mbox->scheduled_scan_status, | 35 | mbox->scheduled_scan_status, |
36 | mbox->scheduled_scan_channels); | 36 | mbox->scheduled_scan_channels); |
37 | 37 | ||
@@ -45,34 +45,34 @@ static int wl12xx_event_scan_complete(struct wl12xx *wl, | |||
45 | return 0; | 45 | return 0; |
46 | } | 46 | } |
47 | 47 | ||
48 | static void wl12xx_event_mbox_dump(struct event_mailbox *mbox) | 48 | static void wl1251_event_mbox_dump(struct event_mailbox *mbox) |
49 | { | 49 | { |
50 | wl12xx_debug(DEBUG_EVENT, "MBOX DUMP:"); | 50 | wl1251_debug(DEBUG_EVENT, "MBOX DUMP:"); |
51 | wl12xx_debug(DEBUG_EVENT, "\tvector: 0x%x", mbox->events_vector); | 51 | wl1251_debug(DEBUG_EVENT, "\tvector: 0x%x", mbox->events_vector); |
52 | wl12xx_debug(DEBUG_EVENT, "\tmask: 0x%x", mbox->events_mask); | 52 | wl1251_debug(DEBUG_EVENT, "\tmask: 0x%x", mbox->events_mask); |
53 | } | 53 | } |
54 | 54 | ||
55 | static int wl12xx_event_process(struct wl12xx *wl, struct event_mailbox *mbox) | 55 | static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) |
56 | { | 56 | { |
57 | int ret; | 57 | int ret; |
58 | u32 vector; | 58 | u32 vector; |
59 | 59 | ||
60 | wl12xx_event_mbox_dump(mbox); | 60 | wl1251_event_mbox_dump(mbox); |
61 | 61 | ||
62 | vector = mbox->events_vector & ~(mbox->events_mask); | 62 | vector = mbox->events_vector & ~(mbox->events_mask); |
63 | wl12xx_debug(DEBUG_EVENT, "vector: 0x%x", vector); | 63 | wl1251_debug(DEBUG_EVENT, "vector: 0x%x", vector); |
64 | 64 | ||
65 | if (vector & SCAN_COMPLETE_EVENT_ID) { | 65 | if (vector & SCAN_COMPLETE_EVENT_ID) { |
66 | ret = wl12xx_event_scan_complete(wl, mbox); | 66 | ret = wl1251_event_scan_complete(wl, mbox); |
67 | if (ret < 0) | 67 | if (ret < 0) |
68 | return ret; | 68 | return ret; |
69 | } | 69 | } |
70 | 70 | ||
71 | if (vector & BSS_LOSE_EVENT_ID) { | 71 | if (vector & BSS_LOSE_EVENT_ID) { |
72 | wl12xx_debug(DEBUG_EVENT, "BSS_LOSE_EVENT"); | 72 | wl1251_debug(DEBUG_EVENT, "BSS_LOSE_EVENT"); |
73 | 73 | ||
74 | if (wl->psm_requested && wl->psm) { | 74 | if (wl->psm_requested && wl->psm) { |
75 | ret = wl12xx_ps_set_mode(wl, STATION_ACTIVE_MODE); | 75 | ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); |
76 | if (ret < 0) | 76 | if (ret < 0) |
77 | return ret; | 77 | return ret; |
78 | } | 78 | } |
@@ -81,47 +81,47 @@ static int wl12xx_event_process(struct wl12xx *wl, struct event_mailbox *mbox) | |||
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
83 | 83 | ||
84 | int wl12xx_event_unmask(struct wl12xx *wl) | 84 | int wl1251_event_unmask(struct wl1251 *wl) |
85 | { | 85 | { |
86 | int ret; | 86 | int ret; |
87 | 87 | ||
88 | ret = wl12xx_acx_event_mbox_mask(wl, ~(wl->event_mask)); | 88 | ret = wl1251_acx_event_mbox_mask(wl, ~(wl->event_mask)); |
89 | if (ret < 0) | 89 | if (ret < 0) |
90 | return ret; | 90 | return ret; |
91 | 91 | ||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | void wl12xx_event_mbox_config(struct wl12xx *wl) | 95 | void wl1251_event_mbox_config(struct wl1251 *wl) |
96 | { | 96 | { |
97 | wl->mbox_ptr[0] = wl12xx_reg_read32(wl, REG_EVENT_MAILBOX_PTR); | 97 | wl->mbox_ptr[0] = wl1251_reg_read32(wl, REG_EVENT_MAILBOX_PTR); |
98 | wl->mbox_ptr[1] = wl->mbox_ptr[0] + sizeof(struct event_mailbox); | 98 | wl->mbox_ptr[1] = wl->mbox_ptr[0] + sizeof(struct event_mailbox); |
99 | 99 | ||
100 | wl12xx_debug(DEBUG_EVENT, "MBOX ptrs: 0x%x 0x%x", | 100 | wl1251_debug(DEBUG_EVENT, "MBOX ptrs: 0x%x 0x%x", |
101 | wl->mbox_ptr[0], wl->mbox_ptr[1]); | 101 | wl->mbox_ptr[0], wl->mbox_ptr[1]); |
102 | } | 102 | } |
103 | 103 | ||
104 | int wl12xx_event_handle(struct wl12xx *wl, u8 mbox_num) | 104 | int wl1251_event_handle(struct wl1251 *wl, u8 mbox_num) |
105 | { | 105 | { |
106 | struct event_mailbox mbox; | 106 | struct event_mailbox mbox; |
107 | int ret; | 107 | int ret; |
108 | 108 | ||
109 | wl12xx_debug(DEBUG_EVENT, "EVENT on mbox %d", mbox_num); | 109 | wl1251_debug(DEBUG_EVENT, "EVENT on mbox %d", mbox_num); |
110 | 110 | ||
111 | if (mbox_num > 1) | 111 | if (mbox_num > 1) |
112 | return -EINVAL; | 112 | return -EINVAL; |
113 | 113 | ||
114 | /* first we read the mbox descriptor */ | 114 | /* first we read the mbox descriptor */ |
115 | wl12xx_spi_mem_read(wl, wl->mbox_ptr[mbox_num], &mbox, | 115 | wl1251_spi_mem_read(wl, wl->mbox_ptr[mbox_num], &mbox, |
116 | sizeof(struct event_mailbox)); | 116 | sizeof(struct event_mailbox)); |
117 | 117 | ||
118 | /* process the descriptor */ | 118 | /* process the descriptor */ |
119 | ret = wl12xx_event_process(wl, &mbox); | 119 | ret = wl1251_event_process(wl, &mbox); |
120 | if (ret < 0) | 120 | if (ret < 0) |
121 | return ret; | 121 | return ret; |
122 | 122 | ||
123 | /* then we let the firmware know it can go on...*/ | 123 | /* then we let the firmware know it can go on...*/ |
124 | wl12xx_reg_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_EVENT_ACK); | 124 | wl1251_reg_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_EVENT_ACK); |
125 | 125 | ||
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |