diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-06-12 07:15:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:46 -0400 |
commit | 9f2ad4fb52916e58a1b75e9a30f42638655932d3 (patch) | |
tree | 1268dbcefde1165b1569333b0dc9fd26c6a2b911 /drivers/net/wireless | |
parent | 9f483dc3d1b0b1695c8177c1dea2e721954b10fb (diff) |
wl12xx: Moved wl1251 TX path implementation into chip specific files
Moved wl1251 TX path implementation into chip specific files to enable
parallel implementation for the wl1271 TX path.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/wl12xx/Makefile | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.c (renamed from drivers/net/wireless/wl12xx/tx.c) | 66 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.h (renamed from drivers/net/wireless/wl12xx/tx.h) | 19 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 1 |
6 files changed, 59 insertions, 51 deletions
diff --git a/drivers/net/wireless/wl12xx/Makefile b/drivers/net/wireless/wl12xx/Makefile index d43de27dc54c..7e05ea379979 100644 --- a/drivers/net/wireless/wl12xx/Makefile +++ b/drivers/net/wireless/wl12xx/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | wl12xx-objs = main.o spi.o event.o tx.o rx.o \ | 1 | wl12xx-objs = main.o spi.o event.o wl1251_tx.o rx.o \ |
2 | ps.o cmd.o acx.o boot.o init.o wl1251.o \ | 2 | ps.o cmd.o acx.o boot.o init.o wl1251.o \ |
3 | debugfs.o | 3 | debugfs.o |
4 | obj-$(CONFIG_WL12XX) += wl12xx.o | 4 | obj-$(CONFIG_WL12XX) += wl12xx.o |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 73232db2b466..8feba36ff48d 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "wl1251.h" | 37 | #include "wl1251.h" |
38 | #include "spi.h" | 38 | #include "spi.h" |
39 | #include "event.h" | 39 | #include "event.h" |
40 | #include "tx.h" | 40 | #include "wl1251_tx.h" |
41 | #include "rx.h" | 41 | #include "rx.h" |
42 | #include "ps.h" | 42 | #include "ps.h" |
43 | #include "init.h" | 43 | #include "init.h" |
@@ -303,6 +303,11 @@ static int wl12xx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
303 | 303 | ||
304 | skb_queue_tail(&wl->tx_queue, skb); | 304 | skb_queue_tail(&wl->tx_queue, skb); |
305 | 305 | ||
306 | /* | ||
307 | * The chip specific setup must run before the first TX packet - | ||
308 | * before that, the tx_work will not be initialized! | ||
309 | */ | ||
310 | |||
306 | schedule_work(&wl->tx_work); | 311 | schedule_work(&wl->tx_work); |
307 | 312 | ||
308 | /* | 313 | /* |
@@ -400,8 +405,7 @@ static void wl12xx_op_stop(struct ieee80211_hw *hw) | |||
400 | mutex_lock(&wl->mutex); | 405 | mutex_lock(&wl->mutex); |
401 | 406 | ||
402 | /* let's notify MAC80211 about the remaining pending TX frames */ | 407 | /* let's notify MAC80211 about the remaining pending TX frames */ |
403 | wl12xx_tx_flush(wl); | 408 | wl->chip.op_tx_flush(wl); |
404 | |||
405 | wl12xx_power_off(wl); | 409 | wl12xx_power_off(wl); |
406 | 410 | ||
407 | memset(wl->bssid, 0, ETH_ALEN); | 411 | memset(wl->bssid, 0, ETH_ALEN); |
@@ -1176,7 +1180,7 @@ static int wl12xx_init_ieee80211(struct wl12xx *wl) | |||
1176 | { | 1180 | { |
1177 | /* The tx descriptor buffer and the TKIP space */ | 1181 | /* The tx descriptor buffer and the TKIP space */ |
1178 | wl->hw->extra_tx_headroom = sizeof(struct tx_double_buffer_desc) | 1182 | wl->hw->extra_tx_headroom = sizeof(struct tx_double_buffer_desc) |
1179 | + WL12XX_TKIP_IV_SPACE; | 1183 | + WL1251_TKIP_IV_SPACE; |
1180 | 1184 | ||
1181 | /* unit us */ | 1185 | /* unit us */ |
1182 | /* FIXME: find a proper value */ | 1186 | /* FIXME: find a proper value */ |
@@ -1226,7 +1230,6 @@ static int __devinit wl12xx_probe(struct spi_device *spi) | |||
1226 | 1230 | ||
1227 | skb_queue_head_init(&wl->tx_queue); | 1231 | skb_queue_head_init(&wl->tx_queue); |
1228 | 1232 | ||
1229 | INIT_WORK(&wl->tx_work, wl12xx_tx_work); | ||
1230 | INIT_WORK(&wl->filter_work, wl12xx_filter_work); | 1233 | INIT_WORK(&wl->filter_work, wl12xx_filter_work); |
1231 | wl->channel = WL12XX_DEFAULT_CHANNEL; | 1234 | wl->channel = WL12XX_DEFAULT_CHANNEL; |
1232 | wl->scanning = false; | 1235 | wl->scanning = false; |
diff --git a/drivers/net/wireless/wl12xx/wl1251.c b/drivers/net/wireless/wl12xx/wl1251.c index b793325d619e..903624a540a3 100644 --- a/drivers/net/wireless/wl12xx/wl1251.c +++ b/drivers/net/wireless/wl12xx/wl1251.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "boot.h" | 30 | #include "boot.h" |
31 | #include "event.h" | 31 | #include "event.h" |
32 | #include "acx.h" | 32 | #include "acx.h" |
33 | #include "tx.h" | 33 | #include "wl1251_tx.h" |
34 | #include "rx.h" | 34 | #include "rx.h" |
35 | #include "ps.h" | 35 | #include "ps.h" |
36 | #include "init.h" | 36 | #include "init.h" |
@@ -471,7 +471,7 @@ static void wl1251_irq_work(struct work_struct *work) | |||
471 | 471 | ||
472 | if (intr & WL1251_ACX_INTR_TX_RESULT) { | 472 | if (intr & WL1251_ACX_INTR_TX_RESULT) { |
473 | wl12xx_debug(DEBUG_IRQ, "WL1251_ACX_INTR_TX_RESULT"); | 473 | wl12xx_debug(DEBUG_IRQ, "WL1251_ACX_INTR_TX_RESULT"); |
474 | wl12xx_tx_complete(wl); | 474 | wl1251_tx_complete(wl); |
475 | } | 475 | } |
476 | 476 | ||
477 | if (intr & (WL1251_ACX_INTR_EVENT_A | WL1251_ACX_INTR_EVENT_B)) { | 477 | if (intr & (WL1251_ACX_INTR_EVENT_A | WL1251_ACX_INTR_EVENT_B)) { |
@@ -712,9 +712,12 @@ void wl1251_setup(struct wl12xx *wl) | |||
712 | wl->chip.op_hw_init = wl1251_hw_init; | 712 | wl->chip.op_hw_init = wl1251_hw_init; |
713 | wl->chip.op_plt_init = wl1251_plt_init; | 713 | wl->chip.op_plt_init = wl1251_plt_init; |
714 | wl->chip.op_fw_version = wl1251_fw_version; | 714 | wl->chip.op_fw_version = wl1251_fw_version; |
715 | wl->chip.op_tx_flush = wl1251_tx_flush; | ||
715 | 716 | ||
716 | wl->chip.p_table = wl1251_part_table; | 717 | wl->chip.p_table = wl1251_part_table; |
717 | wl->chip.acx_reg_table = wl1251_acx_reg_table; | 718 | wl->chip.acx_reg_table = wl1251_acx_reg_table; |
718 | 719 | ||
719 | INIT_WORK(&wl->irq_work, wl1251_irq_work); | 720 | INIT_WORK(&wl->irq_work, wl1251_irq_work); |
721 | INIT_WORK(&wl->tx_work, wl1251_tx_work); | ||
722 | |||
720 | } | 723 | } |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c index 62145e205a8c..c42c43de657e 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/wl1251_tx.c | |||
@@ -28,10 +28,10 @@ | |||
28 | #include "wl12xx.h" | 28 | #include "wl12xx.h" |
29 | #include "reg.h" | 29 | #include "reg.h" |
30 | #include "spi.h" | 30 | #include "spi.h" |
31 | #include "tx.h" | 31 | #include "wl1251_tx.h" |
32 | #include "ps.h" | 32 | #include "ps.h" |
33 | 33 | ||
34 | static bool wl12xx_tx_double_buffer_busy(struct wl12xx *wl, u32 data_out_count) | 34 | static bool wl1251_tx_double_buffer_busy(struct wl12xx *wl, u32 data_out_count) |
35 | { | 35 | { |
36 | int used, data_in_count; | 36 | int used, data_in_count; |
37 | 37 | ||
@@ -52,7 +52,7 @@ static bool wl12xx_tx_double_buffer_busy(struct wl12xx *wl, u32 data_out_count) | |||
52 | return false; | 52 | return false; |
53 | } | 53 | } |
54 | 54 | ||
55 | static int wl12xx_tx_path_status(struct wl12xx *wl) | 55 | static int wl1251_tx_path_status(struct wl12xx *wl) |
56 | { | 56 | { |
57 | u32 status, addr, data_out_count; | 57 | u32 status, addr, data_out_count; |
58 | bool busy; | 58 | bool busy; |
@@ -60,7 +60,7 @@ static int wl12xx_tx_path_status(struct wl12xx *wl) | |||
60 | addr = wl->data_path->tx_control_addr; | 60 | addr = wl->data_path->tx_control_addr; |
61 | status = wl12xx_mem_read32(wl, addr); | 61 | status = wl12xx_mem_read32(wl, addr); |
62 | data_out_count = status & TX_STATUS_DATA_OUT_COUNT_MASK; | 62 | data_out_count = status & TX_STATUS_DATA_OUT_COUNT_MASK; |
63 | busy = wl12xx_tx_double_buffer_busy(wl, data_out_count); | 63 | busy = wl1251_tx_double_buffer_busy(wl, data_out_count); |
64 | 64 | ||
65 | if (busy) | 65 | if (busy) |
66 | return -EBUSY; | 66 | return -EBUSY; |
@@ -68,7 +68,7 @@ static int wl12xx_tx_path_status(struct wl12xx *wl) | |||
68 | return 0; | 68 | return 0; |
69 | } | 69 | } |
70 | 70 | ||
71 | static int wl12xx_tx_id(struct wl12xx *wl, struct sk_buff *skb) | 71 | static int wl1251_tx_id(struct wl12xx *wl, struct sk_buff *skb) |
72 | { | 72 | { |
73 | int i; | 73 | int i; |
74 | 74 | ||
@@ -81,7 +81,7 @@ static int wl12xx_tx_id(struct wl12xx *wl, struct sk_buff *skb) | |||
81 | return -EBUSY; | 81 | return -EBUSY; |
82 | } | 82 | } |
83 | 83 | ||
84 | static void wl12xx_tx_control(struct tx_double_buffer_desc *tx_hdr, | 84 | static void wl1251_tx_control(struct tx_double_buffer_desc *tx_hdr, |
85 | struct ieee80211_tx_info *control, u16 fc) | 85 | struct ieee80211_tx_info *control, u16 fc) |
86 | { | 86 | { |
87 | *(u16 *)&tx_hdr->control = 0; | 87 | *(u16 *)&tx_hdr->control = 0; |
@@ -109,7 +109,7 @@ static void wl12xx_tx_control(struct tx_double_buffer_desc *tx_hdr, | |||
109 | #define MAX_MPDU_HEADER_AND_SECURITY (MAX_MPDU_SECURITY_LENGTH + \ | 109 | #define MAX_MPDU_HEADER_AND_SECURITY (MAX_MPDU_SECURITY_LENGTH + \ |
110 | WLAN_QOS_HDR_LEN) | 110 | WLAN_QOS_HDR_LEN) |
111 | #define HW_BLOCK_SIZE 252 | 111 | #define HW_BLOCK_SIZE 252 |
112 | static void wl12xx_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr) | 112 | static void wl1251_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr) |
113 | { | 113 | { |
114 | u16 payload_len, frag_threshold, mem_blocks; | 114 | u16 payload_len, frag_threshold, mem_blocks; |
115 | u16 num_mpdus, mem_blocks_per_frag; | 115 | u16 num_mpdus, mem_blocks_per_frag; |
@@ -142,7 +142,7 @@ static void wl12xx_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr) | |||
142 | tx_hdr->num_mem_blocks = mem_blocks; | 142 | tx_hdr->num_mem_blocks = mem_blocks; |
143 | } | 143 | } |
144 | 144 | ||
145 | static int wl12xx_tx_fill_hdr(struct wl12xx *wl, struct sk_buff *skb, | 145 | static int wl1251_tx_fill_hdr(struct wl12xx *wl, struct sk_buff *skb, |
146 | struct ieee80211_tx_info *control) | 146 | struct ieee80211_tx_info *control) |
147 | { | 147 | { |
148 | struct tx_double_buffer_desc *tx_hdr; | 148 | struct tx_double_buffer_desc *tx_hdr; |
@@ -153,7 +153,7 @@ static int wl12xx_tx_fill_hdr(struct wl12xx *wl, struct sk_buff *skb, | |||
153 | if (!skb) | 153 | if (!skb) |
154 | return -EINVAL; | 154 | return -EINVAL; |
155 | 155 | ||
156 | id = wl12xx_tx_id(wl, skb); | 156 | id = wl1251_tx_id(wl, skb); |
157 | if (id < 0) | 157 | if (id < 0) |
158 | return id; | 158 | return id; |
159 | 159 | ||
@@ -170,14 +170,14 @@ static int wl12xx_tx_fill_hdr(struct wl12xx *wl, struct sk_buff *skb, | |||
170 | /* FIXME: how to get the correct queue id? */ | 170 | /* FIXME: how to get the correct queue id? */ |
171 | tx_hdr->xmit_queue = 0; | 171 | tx_hdr->xmit_queue = 0; |
172 | 172 | ||
173 | wl12xx_tx_control(tx_hdr, control, fc); | 173 | wl1251_tx_control(tx_hdr, control, fc); |
174 | wl12xx_tx_frag_block_num(tx_hdr); | 174 | wl1251_tx_frag_block_num(tx_hdr); |
175 | 175 | ||
176 | return 0; | 176 | return 0; |
177 | } | 177 | } |
178 | 178 | ||
179 | /* We copy the packet to the target */ | 179 | /* We copy the packet to the target */ |
180 | static int wl12xx_tx_send_packet(struct wl12xx *wl, struct sk_buff *skb, | 180 | static int wl1251_tx_send_packet(struct wl12xx *wl, struct sk_buff *skb, |
181 | struct ieee80211_tx_info *control) | 181 | struct ieee80211_tx_info *control) |
182 | { | 182 | { |
183 | struct tx_double_buffer_desc *tx_hdr; | 183 | struct tx_double_buffer_desc *tx_hdr; |
@@ -196,12 +196,12 @@ static int wl12xx_tx_send_packet(struct wl12xx *wl, struct sk_buff *skb, | |||
196 | u8 *pos; | 196 | u8 *pos; |
197 | 197 | ||
198 | fc = *(u16 *)(skb->data + sizeof(*tx_hdr)); | 198 | fc = *(u16 *)(skb->data + sizeof(*tx_hdr)); |
199 | tx_hdr->length += WL12XX_TKIP_IV_SPACE; | 199 | tx_hdr->length += WL1251_TKIP_IV_SPACE; |
200 | 200 | ||
201 | hdrlen = ieee80211_hdrlen(fc); | 201 | hdrlen = ieee80211_hdrlen(fc); |
202 | 202 | ||
203 | pos = skb_push(skb, WL12XX_TKIP_IV_SPACE); | 203 | pos = skb_push(skb, WL1251_TKIP_IV_SPACE); |
204 | memmove(pos, pos + WL12XX_TKIP_IV_SPACE, | 204 | memmove(pos, pos + WL1251_TKIP_IV_SPACE, |
205 | sizeof(*tx_hdr) + hdrlen); | 205 | sizeof(*tx_hdr) + hdrlen); |
206 | } | 206 | } |
207 | 207 | ||
@@ -227,7 +227,7 @@ static int wl12xx_tx_send_packet(struct wl12xx *wl, struct sk_buff *skb, | |||
227 | } | 227 | } |
228 | 228 | ||
229 | /* Our skb->data at this point includes the HW header */ | 229 | /* Our skb->data at this point includes the HW header */ |
230 | len = WL12XX_TX_ALIGN(skb->len); | 230 | len = WL1251_TX_ALIGN(skb->len); |
231 | 231 | ||
232 | if (wl->data_in_count & 0x1) | 232 | if (wl->data_in_count & 0x1) |
233 | addr = wl->data_path->tx_packet_ring_addr + | 233 | addr = wl->data_path->tx_packet_ring_addr + |
@@ -243,7 +243,7 @@ static int wl12xx_tx_send_packet(struct wl12xx *wl, struct sk_buff *skb, | |||
243 | return 0; | 243 | return 0; |
244 | } | 244 | } |
245 | 245 | ||
246 | static void wl12xx_tx_trigger(struct wl12xx *wl) | 246 | static void wl1251_tx_trigger(struct wl12xx *wl) |
247 | { | 247 | { |
248 | u32 data, addr; | 248 | u32 data, addr; |
249 | 249 | ||
@@ -263,7 +263,7 @@ static void wl12xx_tx_trigger(struct wl12xx *wl) | |||
263 | } | 263 | } |
264 | 264 | ||
265 | /* caller must hold wl->mutex */ | 265 | /* caller must hold wl->mutex */ |
266 | static int wl12xx_tx_frame(struct wl12xx *wl, struct sk_buff *skb) | 266 | static int wl1251_tx_frame(struct wl12xx *wl, struct sk_buff *skb) |
267 | { | 267 | { |
268 | struct ieee80211_tx_info *info; | 268 | struct ieee80211_tx_info *info; |
269 | int ret = 0; | 269 | int ret = 0; |
@@ -280,24 +280,24 @@ static int wl12xx_tx_frame(struct wl12xx *wl, struct sk_buff *skb) | |||
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
283 | ret = wl12xx_tx_path_status(wl); | 283 | ret = wl1251_tx_path_status(wl); |
284 | if (ret < 0) | 284 | if (ret < 0) |
285 | return ret; | 285 | return ret; |
286 | 286 | ||
287 | ret = wl12xx_tx_fill_hdr(wl, skb, info); | 287 | ret = wl1251_tx_fill_hdr(wl, skb, info); |
288 | if (ret < 0) | 288 | if (ret < 0) |
289 | return ret; | 289 | return ret; |
290 | 290 | ||
291 | ret = wl12xx_tx_send_packet(wl, skb, info); | 291 | ret = wl1251_tx_send_packet(wl, skb, info); |
292 | if (ret < 0) | 292 | if (ret < 0) |
293 | return ret; | 293 | return ret; |
294 | 294 | ||
295 | wl12xx_tx_trigger(wl); | 295 | wl1251_tx_trigger(wl); |
296 | 296 | ||
297 | return ret; | 297 | return ret; |
298 | } | 298 | } |
299 | 299 | ||
300 | void wl12xx_tx_work(struct work_struct *work) | 300 | void wl1251_tx_work(struct work_struct *work) |
301 | { | 301 | { |
302 | struct wl12xx *wl = container_of(work, struct wl12xx, tx_work); | 302 | struct wl12xx *wl = container_of(work, struct wl12xx, tx_work); |
303 | struct sk_buff *skb; | 303 | struct sk_buff *skb; |
@@ -315,7 +315,7 @@ void wl12xx_tx_work(struct work_struct *work) | |||
315 | woken_up = true; | 315 | woken_up = true; |
316 | } | 316 | } |
317 | 317 | ||
318 | ret = wl12xx_tx_frame(wl, skb); | 318 | ret = wl1251_tx_frame(wl, skb); |
319 | if (ret == -EBUSY) { | 319 | if (ret == -EBUSY) { |
320 | /* firmware buffer is full, stop queues */ | 320 | /* firmware buffer is full, stop queues */ |
321 | wl12xx_debug(DEBUG_TX, "tx_work: fw buffer full, " | 321 | wl12xx_debug(DEBUG_TX, "tx_work: fw buffer full, " |
@@ -337,7 +337,7 @@ out: | |||
337 | mutex_unlock(&wl->mutex); | 337 | mutex_unlock(&wl->mutex); |
338 | } | 338 | } |
339 | 339 | ||
340 | static const char *wl12xx_tx_parse_status(u8 status) | 340 | static const char *wl1251_tx_parse_status(u8 status) |
341 | { | 341 | { |
342 | /* 8 bit status field, one character per bit plus null */ | 342 | /* 8 bit status field, one character per bit plus null */ |
343 | static char buf[9]; | 343 | static char buf[9]; |
@@ -365,7 +365,7 @@ static const char *wl12xx_tx_parse_status(u8 status) | |||
365 | return buf; | 365 | return buf; |
366 | } | 366 | } |
367 | 367 | ||
368 | static void wl12xx_tx_packet_cb(struct wl12xx *wl, | 368 | static void wl1251_tx_packet_cb(struct wl12xx *wl, |
369 | struct tx_result *result) | 369 | struct tx_result *result) |
370 | { | 370 | { |
371 | struct ieee80211_tx_info *info; | 371 | struct ieee80211_tx_info *info; |
@@ -396,14 +396,14 @@ static void wl12xx_tx_packet_cb(struct wl12xx *wl, | |||
396 | if (info->control.hw_key && | 396 | if (info->control.hw_key && |
397 | info->control.hw_key->alg == ALG_TKIP) { | 397 | info->control.hw_key->alg == ALG_TKIP) { |
398 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); | 398 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); |
399 | memmove(frame + WL12XX_TKIP_IV_SPACE, frame, hdrlen); | 399 | memmove(frame + WL1251_TKIP_IV_SPACE, frame, hdrlen); |
400 | skb_pull(skb, WL12XX_TKIP_IV_SPACE); | 400 | skb_pull(skb, WL1251_TKIP_IV_SPACE); |
401 | } | 401 | } |
402 | 402 | ||
403 | wl12xx_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x" | 403 | wl12xx_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x" |
404 | " status 0x%x (%s)", | 404 | " status 0x%x (%s)", |
405 | result->id, skb, result->ack_failures, result->rate, | 405 | result->id, skb, result->ack_failures, result->rate, |
406 | result->status, wl12xx_tx_parse_status(result->status)); | 406 | result->status, wl1251_tx_parse_status(result->status)); |
407 | 407 | ||
408 | 408 | ||
409 | ieee80211_tx_status(wl->hw, skb); | 409 | ieee80211_tx_status(wl->hw, skb); |
@@ -420,7 +420,7 @@ static void wl12xx_tx_packet_cb(struct wl12xx *wl, | |||
420 | queue empty */ | 420 | queue empty */ |
421 | 421 | ||
422 | if (skb) { | 422 | if (skb) { |
423 | ret = wl12xx_tx_frame(wl, skb); | 423 | ret = wl1251_tx_frame(wl, skb); |
424 | if (ret == -EBUSY) { | 424 | if (ret == -EBUSY) { |
425 | /* firmware buffer is still full */ | 425 | /* firmware buffer is still full */ |
426 | wl12xx_debug(DEBUG_TX, "cb: fw buffer " | 426 | wl12xx_debug(DEBUG_TX, "cb: fw buffer " |
@@ -440,7 +440,7 @@ static void wl12xx_tx_packet_cb(struct wl12xx *wl, | |||
440 | } | 440 | } |
441 | 441 | ||
442 | /* Called upon reception of a TX complete interrupt */ | 442 | /* Called upon reception of a TX complete interrupt */ |
443 | void wl12xx_tx_complete(struct wl12xx *wl) | 443 | void wl1251_tx_complete(struct wl12xx *wl) |
444 | { | 444 | { |
445 | int i, result_index, num_complete = 0; | 445 | int i, result_index, num_complete = 0; |
446 | struct tx_result result[FW_TX_CMPLT_BLOCK_SIZE], *result_ptr; | 446 | struct tx_result result[FW_TX_CMPLT_BLOCK_SIZE], *result_ptr; |
@@ -459,7 +459,7 @@ void wl12xx_tx_complete(struct wl12xx *wl) | |||
459 | 459 | ||
460 | if (result_ptr->done_1 == 1 && | 460 | if (result_ptr->done_1 == 1 && |
461 | result_ptr->done_2 == 1) { | 461 | result_ptr->done_2 == 1) { |
462 | wl12xx_tx_packet_cb(wl, result_ptr); | 462 | wl1251_tx_packet_cb(wl, result_ptr); |
463 | 463 | ||
464 | result_ptr->done_1 = 0; | 464 | result_ptr->done_1 = 0; |
465 | result_ptr->done_2 = 0; | 465 | result_ptr->done_2 = 0; |
@@ -523,7 +523,7 @@ void wl12xx_tx_complete(struct wl12xx *wl) | |||
523 | } | 523 | } |
524 | 524 | ||
525 | /* caller must hold wl->mutex */ | 525 | /* caller must hold wl->mutex */ |
526 | void wl12xx_tx_flush(struct wl12xx *wl) | 526 | void wl1251_tx_flush(struct wl12xx *wl) |
527 | { | 527 | { |
528 | int i; | 528 | int i; |
529 | struct sk_buff *skb; | 529 | struct sk_buff *skb; |
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/wl1251_tx.h index dc82691f4c14..a5d4c825905b 100644 --- a/drivers/net/wireless/wl12xx/tx.h +++ b/drivers/net/wireless/wl12xx/wl1251_tx.h | |||
@@ -22,8 +22,8 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef __WL12XX_TX_H__ | 25 | #ifndef __WL1251_TX_H__ |
26 | #define __WL12XX_TX_H__ | 26 | #define __WL1251_TX_H__ |
27 | 27 | ||
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | 29 | ||
@@ -73,10 +73,11 @@ | |||
73 | 73 | ||
74 | #define TX_COMPLETE_REQUIRED_BIT 0x80 | 74 | #define TX_COMPLETE_REQUIRED_BIT 0x80 |
75 | #define TX_STATUS_DATA_OUT_COUNT_MASK 0xf | 75 | #define TX_STATUS_DATA_OUT_COUNT_MASK 0xf |
76 | #define WL12XX_TX_ALIGN_TO 4 | 76 | |
77 | #define WL12XX_TX_ALIGN(len) (((len) + WL12XX_TX_ALIGN_TO - 1) & \ | 77 | #define WL1251_TX_ALIGN_TO 4 |
78 | ~(WL12XX_TX_ALIGN_TO - 1)) | 78 | #define WL1251_TX_ALIGN(len) (((len) + WL1251_TX_ALIGN_TO - 1) & \ |
79 | #define WL12XX_TKIP_IV_SPACE 4 | 79 | ~(WL1251_TX_ALIGN_TO - 1)) |
80 | #define WL1251_TKIP_IV_SPACE 4 | ||
80 | 81 | ||
81 | struct tx_control { | 82 | struct tx_control { |
82 | /* Rate Policy (class) index */ | 83 | /* Rate Policy (class) index */ |
@@ -208,8 +209,8 @@ struct tx_result { | |||
208 | u8 done_2; | 209 | u8 done_2; |
209 | } __attribute__ ((packed)); | 210 | } __attribute__ ((packed)); |
210 | 211 | ||
211 | void wl12xx_tx_work(struct work_struct *work); | 212 | void wl1251_tx_work(struct work_struct *work); |
212 | void wl12xx_tx_complete(struct wl12xx *wl); | 213 | void wl1251_tx_complete(struct wl12xx *wl); |
213 | void wl12xx_tx_flush(struct wl12xx *wl); | 214 | void wl1251_tx_flush(struct wl12xx *wl); |
214 | 215 | ||
215 | #endif | 216 | #endif |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index c1d00c01f7d3..c38aa5497ebf 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -163,6 +163,7 @@ struct wl12xx_chip { | |||
163 | void (*op_target_enable_interrupts)(struct wl12xx *wl); | 163 | void (*op_target_enable_interrupts)(struct wl12xx *wl); |
164 | int (*op_hw_init)(struct wl12xx *wl); | 164 | int (*op_hw_init)(struct wl12xx *wl); |
165 | int (*op_plt_init)(struct wl12xx *wl); | 165 | int (*op_plt_init)(struct wl12xx *wl); |
166 | void (*op_tx_flush)(struct wl12xx *wl); | ||
166 | void (*op_fw_version)(struct wl12xx *wl); | 167 | void (*op_fw_version)(struct wl12xx *wl); |
167 | 168 | ||
168 | struct wl12xx_partition_set *p_table; | 169 | struct wl12xx_partition_set *p_table; |