diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 04:54:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 04:54:31 -0400 |
commit | 788c0a53164c05c5ccdb1472474372b72ba74644 (patch) | |
tree | 5f274102e3dc4bcca6cb3a695aa2c8228ad5fc4f /drivers/net/wireless/b43legacy | |
parent | e64bda89b8fe81cce9b4a20885d2c204c2d52532 (diff) | |
parent | 78cf07472f0ede8394bacc4bc02354505080cfe1 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
drivers/net/ps3_gelic_wireless.c
drivers/net/wireless/libertas/main.c
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r-- | drivers/net/wireless/b43legacy/dma.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/dma.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/pio.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/pio.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/xmit.c | 47 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/xmit.h | 2 |
7 files changed, 62 insertions, 68 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index d6686f713b6d..33cc256c5baf 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c | |||
@@ -1205,10 +1205,10 @@ struct b43legacy_dmaring *parse_cookie(struct b43legacy_wldev *dev, | |||
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | static int dma_tx_fragment(struct b43legacy_dmaring *ring, | 1207 | static int dma_tx_fragment(struct b43legacy_dmaring *ring, |
1208 | struct sk_buff *skb, | 1208 | struct sk_buff *skb) |
1209 | struct ieee80211_tx_control *ctl) | ||
1210 | { | 1209 | { |
1211 | const struct b43legacy_dma_ops *ops = ring->ops; | 1210 | const struct b43legacy_dma_ops *ops = ring->ops; |
1211 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
1212 | u8 *header; | 1212 | u8 *header; |
1213 | int slot, old_top_slot, old_used_slots; | 1213 | int slot, old_top_slot, old_used_slots; |
1214 | int err; | 1214 | int err; |
@@ -1231,7 +1231,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, | |||
1231 | header = &(ring->txhdr_cache[slot * sizeof( | 1231 | header = &(ring->txhdr_cache[slot * sizeof( |
1232 | struct b43legacy_txhdr_fw3)]); | 1232 | struct b43legacy_txhdr_fw3)]); |
1233 | err = b43legacy_generate_txhdr(ring->dev, header, | 1233 | err = b43legacy_generate_txhdr(ring->dev, header, |
1234 | skb->data, skb->len, ctl, | 1234 | skb->data, skb->len, info, |
1235 | generate_cookie(ring, slot)); | 1235 | generate_cookie(ring, slot)); |
1236 | if (unlikely(err)) { | 1236 | if (unlikely(err)) { |
1237 | ring->current_slot = old_top_slot; | 1237 | ring->current_slot = old_top_slot; |
@@ -1255,7 +1255,6 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring, | |||
1255 | desc = ops->idx2desc(ring, slot, &meta); | 1255 | desc = ops->idx2desc(ring, slot, &meta); |
1256 | memset(meta, 0, sizeof(*meta)); | 1256 | memset(meta, 0, sizeof(*meta)); |
1257 | 1257 | ||
1258 | memcpy(&meta->txstat.control, ctl, sizeof(*ctl)); | ||
1259 | meta->skb = skb; | 1258 | meta->skb = skb; |
1260 | meta->is_last_fragment = 1; | 1259 | meta->is_last_fragment = 1; |
1261 | 1260 | ||
@@ -1323,14 +1322,13 @@ int should_inject_overflow(struct b43legacy_dmaring *ring) | |||
1323 | } | 1322 | } |
1324 | 1323 | ||
1325 | int b43legacy_dma_tx(struct b43legacy_wldev *dev, | 1324 | int b43legacy_dma_tx(struct b43legacy_wldev *dev, |
1326 | struct sk_buff *skb, | 1325 | struct sk_buff *skb) |
1327 | struct ieee80211_tx_control *ctl) | ||
1328 | { | 1326 | { |
1329 | struct b43legacy_dmaring *ring; | 1327 | struct b43legacy_dmaring *ring; |
1330 | int err = 0; | 1328 | int err = 0; |
1331 | unsigned long flags; | 1329 | unsigned long flags; |
1332 | 1330 | ||
1333 | ring = priority_to_txring(dev, ctl->queue); | 1331 | ring = priority_to_txring(dev, skb_get_queue_mapping(skb)); |
1334 | spin_lock_irqsave(&ring->lock, flags); | 1332 | spin_lock_irqsave(&ring->lock, flags); |
1335 | B43legacy_WARN_ON(!ring->tx); | 1333 | B43legacy_WARN_ON(!ring->tx); |
1336 | if (unlikely(free_slots(ring) < SLOTS_PER_PACKET)) { | 1334 | if (unlikely(free_slots(ring) < SLOTS_PER_PACKET)) { |
@@ -1343,7 +1341,7 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev, | |||
1343 | * That would be a mac80211 bug. */ | 1341 | * That would be a mac80211 bug. */ |
1344 | B43legacy_BUG_ON(ring->stopped); | 1342 | B43legacy_BUG_ON(ring->stopped); |
1345 | 1343 | ||
1346 | err = dma_tx_fragment(ring, skb, ctl); | 1344 | err = dma_tx_fragment(ring, skb); |
1347 | if (unlikely(err == -ENOKEY)) { | 1345 | if (unlikely(err == -ENOKEY)) { |
1348 | /* Drop this packet, as we don't have the encryption key | 1346 | /* Drop this packet, as we don't have the encryption key |
1349 | * anymore and must not transmit it unencrypted. */ | 1347 | * anymore and must not transmit it unencrypted. */ |
@@ -1401,26 +1399,29 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, | |||
1401 | 1); | 1399 | 1); |
1402 | 1400 | ||
1403 | if (meta->is_last_fragment) { | 1401 | if (meta->is_last_fragment) { |
1404 | B43legacy_WARN_ON(!meta->skb); | 1402 | struct ieee80211_tx_info *info; |
1403 | BUG_ON(!meta->skb); | ||
1404 | info = IEEE80211_SKB_CB(meta->skb); | ||
1405 | /* Call back to inform the ieee80211 subsystem about the | 1405 | /* Call back to inform the ieee80211 subsystem about the |
1406 | * status of the transmission. | 1406 | * status of the transmission. |
1407 | * Some fields of txstat are already filled in dma_tx(). | 1407 | * Some fields of txstat are already filled in dma_tx(). |
1408 | */ | 1408 | */ |
1409 | |||
1410 | memset(&info->status, 0, sizeof(info->status)); | ||
1411 | |||
1409 | if (status->acked) { | 1412 | if (status->acked) { |
1410 | meta->txstat.flags |= IEEE80211_TX_STATUS_ACK; | 1413 | info->flags |= IEEE80211_TX_STAT_ACK; |
1411 | } else { | 1414 | } else { |
1412 | if (!(meta->txstat.control.flags | 1415 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) |
1413 | & IEEE80211_TXCTL_NO_ACK)) | 1416 | info->status.excessive_retries = 1; |
1414 | meta->txstat.excessive_retries = 1; | ||
1415 | } | 1417 | } |
1416 | if (status->frame_count == 0) { | 1418 | if (status->frame_count == 0) { |
1417 | /* The frame was not transmitted at all. */ | 1419 | /* The frame was not transmitted at all. */ |
1418 | meta->txstat.retry_count = 0; | 1420 | info->status.retry_count = 0; |
1419 | } else | 1421 | } else |
1420 | meta->txstat.retry_count = status->frame_count | 1422 | info->status.retry_count = status->frame_count |
1421 | - 1; | 1423 | - 1; |
1422 | ieee80211_tx_status_irqsafe(dev->wl->hw, meta->skb, | 1424 | ieee80211_tx_status_irqsafe(dev->wl->hw, meta->skb); |
1423 | &(meta->txstat)); | ||
1424 | /* skb is freed by ieee80211_tx_status_irqsafe() */ | 1425 | /* skb is freed by ieee80211_tx_status_irqsafe() */ |
1425 | meta->skb = NULL; | 1426 | meta->skb = NULL; |
1426 | } else { | 1427 | } else { |
diff --git a/drivers/net/wireless/b43legacy/dma.h b/drivers/net/wireless/b43legacy/dma.h index 2dd488c5be2d..2f186003c31e 100644 --- a/drivers/net/wireless/b43legacy/dma.h +++ b/drivers/net/wireless/b43legacy/dma.h | |||
@@ -195,7 +195,6 @@ struct b43legacy_dmadesc_meta { | |||
195 | dma_addr_t dmaaddr; | 195 | dma_addr_t dmaaddr; |
196 | /* ieee80211 TX status. Only used once per 802.11 frag. */ | 196 | /* ieee80211 TX status. Only used once per 802.11 frag. */ |
197 | bool is_last_fragment; | 197 | bool is_last_fragment; |
198 | struct ieee80211_tx_status txstat; | ||
199 | }; | 198 | }; |
200 | 199 | ||
201 | struct b43legacy_dmaring; | 200 | struct b43legacy_dmaring; |
@@ -297,8 +296,7 @@ void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev, | |||
297 | struct ieee80211_tx_queue_stats *stats); | 296 | struct ieee80211_tx_queue_stats *stats); |
298 | 297 | ||
299 | int b43legacy_dma_tx(struct b43legacy_wldev *dev, | 298 | int b43legacy_dma_tx(struct b43legacy_wldev *dev, |
300 | struct sk_buff *skb, | 299 | struct sk_buff *skb); |
301 | struct ieee80211_tx_control *ctl); | ||
302 | void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, | 300 | void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, |
303 | const struct b43legacy_txstatus *status); | 301 | const struct b43legacy_txstatus *status); |
304 | 302 | ||
@@ -323,8 +321,7 @@ void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev, | |||
323 | } | 321 | } |
324 | static inline | 322 | static inline |
325 | int b43legacy_dma_tx(struct b43legacy_wldev *dev, | 323 | int b43legacy_dma_tx(struct b43legacy_wldev *dev, |
326 | struct sk_buff *skb, | 324 | struct sk_buff *skb) |
327 | struct ieee80211_tx_control *ctl) | ||
328 | { | 325 | { |
329 | return 0; | 326 | return 0; |
330 | } | 327 | } |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 7755c59e0803..f706ca65f159 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -2358,8 +2358,7 @@ static int b43legacy_rng_init(struct b43legacy_wl *wl) | |||
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | static int b43legacy_op_tx(struct ieee80211_hw *hw, | 2360 | static int b43legacy_op_tx(struct ieee80211_hw *hw, |
2361 | struct sk_buff *skb, | 2361 | struct sk_buff *skb) |
2362 | struct ieee80211_tx_control *ctl) | ||
2363 | { | 2362 | { |
2364 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 2363 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
2365 | struct b43legacy_wldev *dev = wl->current_dev; | 2364 | struct b43legacy_wldev *dev = wl->current_dev; |
@@ -2373,10 +2372,10 @@ static int b43legacy_op_tx(struct ieee80211_hw *hw, | |||
2373 | /* DMA-TX is done without a global lock. */ | 2372 | /* DMA-TX is done without a global lock. */ |
2374 | if (b43legacy_using_pio(dev)) { | 2373 | if (b43legacy_using_pio(dev)) { |
2375 | spin_lock_irqsave(&wl->irq_lock, flags); | 2374 | spin_lock_irqsave(&wl->irq_lock, flags); |
2376 | err = b43legacy_pio_tx(dev, skb, ctl); | 2375 | err = b43legacy_pio_tx(dev, skb); |
2377 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 2376 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
2378 | } else | 2377 | } else |
2379 | err = b43legacy_dma_tx(dev, skb, ctl); | 2378 | err = b43legacy_dma_tx(dev, skb); |
2380 | out: | 2379 | out: |
2381 | if (unlikely(err)) | 2380 | if (unlikely(err)) |
2382 | return NETDEV_TX_BUSY; | 2381 | return NETDEV_TX_BUSY; |
@@ -2794,7 +2793,6 @@ static int b43legacy_wireless_core_start(struct b43legacy_wldev *dev) | |||
2794 | /* Start data flow (TX/RX) */ | 2793 | /* Start data flow (TX/RX) */ |
2795 | b43legacy_mac_enable(dev); | 2794 | b43legacy_mac_enable(dev); |
2796 | b43legacy_interrupt_enable(dev, dev->irq_savedstate); | 2795 | b43legacy_interrupt_enable(dev, dev->irq_savedstate); |
2797 | ieee80211_start_queues(dev->wl->hw); | ||
2798 | 2796 | ||
2799 | /* Start maintenance work */ | 2797 | /* Start maintenance work */ |
2800 | b43legacy_periodic_tasks_setup(dev); | 2798 | b43legacy_periodic_tasks_setup(dev); |
@@ -3410,7 +3408,7 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, | |||
3410 | * field, but that would probably require resizing and moving of data | 3408 | * field, but that would probably require resizing and moving of data |
3411 | * within the beacon template. Simply request a new beacon and let | 3409 | * within the beacon template. Simply request a new beacon and let |
3412 | * mac80211 do the hard work. */ | 3410 | * mac80211 do the hard work. */ |
3413 | beacon = ieee80211_beacon_get(hw, wl->vif, NULL); | 3411 | beacon = ieee80211_beacon_get(hw, wl->vif); |
3414 | if (unlikely(!beacon)) | 3412 | if (unlikely(!beacon)) |
3415 | return -ENOMEM; | 3413 | return -ENOMEM; |
3416 | spin_lock_irqsave(&wl->irq_lock, flags); | 3414 | spin_lock_irqsave(&wl->irq_lock, flags); |
@@ -3421,8 +3419,7 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, | |||
3421 | } | 3419 | } |
3422 | 3420 | ||
3423 | static int b43legacy_op_ibss_beacon_update(struct ieee80211_hw *hw, | 3421 | static int b43legacy_op_ibss_beacon_update(struct ieee80211_hw *hw, |
3424 | struct sk_buff *beacon, | 3422 | struct sk_buff *beacon) |
3425 | struct ieee80211_tx_control *ctl) | ||
3426 | { | 3423 | { |
3427 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3424 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3428 | unsigned long flags; | 3425 | unsigned long flags; |
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index 8d3d27d3cd67..a86c7647fa2d 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c | |||
@@ -196,7 +196,7 @@ static int pio_tx_write_fragment(struct b43legacy_pioqueue *queue, | |||
196 | B43legacy_WARN_ON(skb_shinfo(skb)->nr_frags != 0); | 196 | B43legacy_WARN_ON(skb_shinfo(skb)->nr_frags != 0); |
197 | err = b43legacy_generate_txhdr(queue->dev, | 197 | err = b43legacy_generate_txhdr(queue->dev, |
198 | txhdr, skb->data, skb->len, | 198 | txhdr, skb->data, skb->len, |
199 | &packet->txstat.control, | 199 | IEEE80211_SKB_CB(skb), |
200 | generate_cookie(queue, packet)); | 200 | generate_cookie(queue, packet)); |
201 | if (err) | 201 | if (err) |
202 | return err; | 202 | return err; |
@@ -463,8 +463,7 @@ err_destroy0: | |||
463 | } | 463 | } |
464 | 464 | ||
465 | int b43legacy_pio_tx(struct b43legacy_wldev *dev, | 465 | int b43legacy_pio_tx(struct b43legacy_wldev *dev, |
466 | struct sk_buff *skb, | 466 | struct sk_buff *skb) |
467 | struct ieee80211_tx_control *ctl) | ||
468 | { | 467 | { |
469 | struct b43legacy_pioqueue *queue = dev->pio.queue1; | 468 | struct b43legacy_pioqueue *queue = dev->pio.queue1; |
470 | struct b43legacy_pio_txpacket *packet; | 469 | struct b43legacy_pio_txpacket *packet; |
@@ -476,9 +475,6 @@ int b43legacy_pio_tx(struct b43legacy_wldev *dev, | |||
476 | list); | 475 | list); |
477 | packet->skb = skb; | 476 | packet->skb = skb; |
478 | 477 | ||
479 | memset(&packet->txstat, 0, sizeof(packet->txstat)); | ||
480 | memcpy(&packet->txstat.control, ctl, sizeof(*ctl)); | ||
481 | |||
482 | list_move_tail(&packet->list, &queue->txqueue); | 478 | list_move_tail(&packet->list, &queue->txqueue); |
483 | queue->nr_txfree--; | 479 | queue->nr_txfree--; |
484 | queue->nr_tx_packets++; | 480 | queue->nr_tx_packets++; |
@@ -494,6 +490,7 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, | |||
494 | { | 490 | { |
495 | struct b43legacy_pioqueue *queue; | 491 | struct b43legacy_pioqueue *queue; |
496 | struct b43legacy_pio_txpacket *packet; | 492 | struct b43legacy_pio_txpacket *packet; |
493 | struct ieee80211_tx_info *info; | ||
497 | 494 | ||
498 | queue = parse_cookie(dev, status->cookie, &packet); | 495 | queue = parse_cookie(dev, status->cookie, &packet); |
499 | B43legacy_WARN_ON(!queue); | 496 | B43legacy_WARN_ON(!queue); |
@@ -505,11 +502,13 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, | |||
505 | queue->tx_devq_used -= (packet->skb->len + | 502 | queue->tx_devq_used -= (packet->skb->len + |
506 | sizeof(struct b43legacy_txhdr_fw3)); | 503 | sizeof(struct b43legacy_txhdr_fw3)); |
507 | 504 | ||
505 | info = IEEE80211_SKB_CB(packet->skb); | ||
506 | memset(&info->status, 0, sizeof(info->status)); | ||
507 | |||
508 | if (status->acked) | 508 | if (status->acked) |
509 | packet->txstat.flags |= IEEE80211_TX_STATUS_ACK; | 509 | info->flags |= IEEE80211_TX_STAT_ACK; |
510 | packet->txstat.retry_count = status->frame_count - 1; | 510 | info->status.retry_count = status->frame_count - 1; |
511 | ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb, | 511 | ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb); |
512 | &(packet->txstat)); | ||
513 | packet->skb = NULL; | 512 | packet->skb = NULL; |
514 | 513 | ||
515 | free_txpacket(packet, 1); | 514 | free_txpacket(packet, 1); |
diff --git a/drivers/net/wireless/b43legacy/pio.h b/drivers/net/wireless/b43legacy/pio.h index 5bfed0c40030..464fec05a06d 100644 --- a/drivers/net/wireless/b43legacy/pio.h +++ b/drivers/net/wireless/b43legacy/pio.h | |||
@@ -41,7 +41,6 @@ struct b43legacy_xmitstatus; | |||
41 | struct b43legacy_pio_txpacket { | 41 | struct b43legacy_pio_txpacket { |
42 | struct b43legacy_pioqueue *queue; | 42 | struct b43legacy_pioqueue *queue; |
43 | struct sk_buff *skb; | 43 | struct sk_buff *skb; |
44 | struct ieee80211_tx_status txstat; | ||
45 | struct list_head list; | 44 | struct list_head list; |
46 | }; | 45 | }; |
47 | 46 | ||
@@ -104,8 +103,7 @@ int b43legacy_pio_init(struct b43legacy_wldev *dev); | |||
104 | void b43legacy_pio_free(struct b43legacy_wldev *dev); | 103 | void b43legacy_pio_free(struct b43legacy_wldev *dev); |
105 | 104 | ||
106 | int b43legacy_pio_tx(struct b43legacy_wldev *dev, | 105 | int b43legacy_pio_tx(struct b43legacy_wldev *dev, |
107 | struct sk_buff *skb, | 106 | struct sk_buff *skb); |
108 | struct ieee80211_tx_control *ctl); | ||
109 | void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, | 107 | void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, |
110 | const struct b43legacy_txstatus *status); | 108 | const struct b43legacy_txstatus *status); |
111 | void b43legacy_pio_get_tx_stats(struct b43legacy_wldev *dev, | 109 | void b43legacy_pio_get_tx_stats(struct b43legacy_wldev *dev, |
@@ -132,8 +130,7 @@ void b43legacy_pio_free(struct b43legacy_wldev *dev) | |||
132 | } | 130 | } |
133 | static inline | 131 | static inline |
134 | int b43legacy_pio_tx(struct b43legacy_wldev *dev, | 132 | int b43legacy_pio_tx(struct b43legacy_wldev *dev, |
135 | struct sk_buff *skb, | 133 | struct sk_buff *skb) |
136 | struct ieee80211_tx_control *ctl) | ||
137 | { | 134 | { |
138 | return 0; | 135 | return 0; |
139 | } | 136 | } |
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c index bed9e041d6c5..82dc04d59446 100644 --- a/drivers/net/wireless/b43legacy/xmit.c +++ b/drivers/net/wireless/b43legacy/xmit.c | |||
@@ -188,11 +188,11 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
188 | struct b43legacy_txhdr_fw3 *txhdr, | 188 | struct b43legacy_txhdr_fw3 *txhdr, |
189 | const unsigned char *fragment_data, | 189 | const unsigned char *fragment_data, |
190 | unsigned int fragment_len, | 190 | unsigned int fragment_len, |
191 | const struct ieee80211_tx_control *txctl, | 191 | const struct ieee80211_tx_info *info, |
192 | u16 cookie) | 192 | u16 cookie) |
193 | { | 193 | { |
194 | const struct ieee80211_hdr *wlhdr; | 194 | const struct ieee80211_hdr *wlhdr; |
195 | int use_encryption = (!(txctl->flags & IEEE80211_TXCTL_DO_NOT_ENCRYPT)); | 195 | int use_encryption = (!(info->flags & IEEE80211_TX_CTL_DO_NOT_ENCRYPT)); |
196 | u16 fctl; | 196 | u16 fctl; |
197 | u8 rate; | 197 | u8 rate; |
198 | struct ieee80211_rate *rate_fb; | 198 | struct ieee80211_rate *rate_fb; |
@@ -201,15 +201,18 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
201 | unsigned int plcp_fragment_len; | 201 | unsigned int plcp_fragment_len; |
202 | u32 mac_ctl = 0; | 202 | u32 mac_ctl = 0; |
203 | u16 phy_ctl = 0; | 203 | u16 phy_ctl = 0; |
204 | struct ieee80211_rate *tx_rate; | ||
204 | 205 | ||
205 | wlhdr = (const struct ieee80211_hdr *)fragment_data; | 206 | wlhdr = (const struct ieee80211_hdr *)fragment_data; |
206 | fctl = le16_to_cpu(wlhdr->frame_control); | 207 | fctl = le16_to_cpu(wlhdr->frame_control); |
207 | 208 | ||
208 | memset(txhdr, 0, sizeof(*txhdr)); | 209 | memset(txhdr, 0, sizeof(*txhdr)); |
209 | 210 | ||
210 | rate = txctl->tx_rate->hw_value; | 211 | tx_rate = ieee80211_get_tx_rate(dev->wl->hw, info); |
212 | |||
213 | rate = tx_rate->hw_value; | ||
211 | rate_ofdm = b43legacy_is_ofdm_rate(rate); | 214 | rate_ofdm = b43legacy_is_ofdm_rate(rate); |
212 | rate_fb = txctl->alt_retry_rate ? : txctl->tx_rate; | 215 | rate_fb = ieee80211_get_alt_retry_rate(dev->wl->hw, info) ? : tx_rate; |
213 | rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value); | 216 | rate_fb_ofdm = b43legacy_is_ofdm_rate(rate_fb->hw_value); |
214 | 217 | ||
215 | txhdr->mac_frame_ctl = wlhdr->frame_control; | 218 | txhdr->mac_frame_ctl = wlhdr->frame_control; |
@@ -225,14 +228,14 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
225 | txhdr->dur_fb = wlhdr->duration_id; | 228 | txhdr->dur_fb = wlhdr->duration_id; |
226 | } else { | 229 | } else { |
227 | txhdr->dur_fb = ieee80211_generic_frame_duration(dev->wl->hw, | 230 | txhdr->dur_fb = ieee80211_generic_frame_duration(dev->wl->hw, |
228 | txctl->vif, | 231 | info->control.vif, |
229 | fragment_len, | 232 | fragment_len, |
230 | rate_fb); | 233 | rate_fb); |
231 | } | 234 | } |
232 | 235 | ||
233 | plcp_fragment_len = fragment_len + FCS_LEN; | 236 | plcp_fragment_len = fragment_len + FCS_LEN; |
234 | if (use_encryption) { | 237 | if (use_encryption) { |
235 | u8 key_idx = txctl->hw_key->hw_key_idx; | 238 | u8 key_idx = info->control.hw_key->hw_key_idx; |
236 | struct b43legacy_key *key; | 239 | struct b43legacy_key *key; |
237 | int wlhdr_len; | 240 | int wlhdr_len; |
238 | size_t iv_len; | 241 | size_t iv_len; |
@@ -242,7 +245,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
242 | 245 | ||
243 | if (key->enabled) { | 246 | if (key->enabled) { |
244 | /* Hardware appends ICV. */ | 247 | /* Hardware appends ICV. */ |
245 | plcp_fragment_len += txctl->icv_len; | 248 | plcp_fragment_len += info->control.icv_len; |
246 | 249 | ||
247 | key_idx = b43legacy_kidx_to_fw(dev, key_idx); | 250 | key_idx = b43legacy_kidx_to_fw(dev, key_idx); |
248 | mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) & | 251 | mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) & |
@@ -251,7 +254,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
251 | B43legacy_TX4_MAC_KEYALG_SHIFT) & | 254 | B43legacy_TX4_MAC_KEYALG_SHIFT) & |
252 | B43legacy_TX4_MAC_KEYALG; | 255 | B43legacy_TX4_MAC_KEYALG; |
253 | wlhdr_len = ieee80211_get_hdrlen(fctl); | 256 | wlhdr_len = ieee80211_get_hdrlen(fctl); |
254 | iv_len = min((size_t)txctl->iv_len, | 257 | iv_len = min((size_t)info->control.iv_len, |
255 | ARRAY_SIZE(txhdr->iv)); | 258 | ARRAY_SIZE(txhdr->iv)); |
256 | memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len); | 259 | memcpy(txhdr->iv, ((u8 *)wlhdr) + wlhdr_len, iv_len); |
257 | } else { | 260 | } else { |
@@ -275,7 +278,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
275 | phy_ctl |= B43legacy_TX4_PHY_OFDM; | 278 | phy_ctl |= B43legacy_TX4_PHY_OFDM; |
276 | if (dev->short_preamble) | 279 | if (dev->short_preamble) |
277 | phy_ctl |= B43legacy_TX4_PHY_SHORTPRMBL; | 280 | phy_ctl |= B43legacy_TX4_PHY_SHORTPRMBL; |
278 | switch (txctl->antenna_sel_tx) { | 281 | switch (info->antenna_sel_tx) { |
279 | case 0: | 282 | case 0: |
280 | phy_ctl |= B43legacy_TX4_PHY_ANTLAST; | 283 | phy_ctl |= B43legacy_TX4_PHY_ANTLAST; |
281 | break; | 284 | break; |
@@ -290,21 +293,21 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
290 | } | 293 | } |
291 | 294 | ||
292 | /* MAC control */ | 295 | /* MAC control */ |
293 | if (!(txctl->flags & IEEE80211_TXCTL_NO_ACK)) | 296 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) |
294 | mac_ctl |= B43legacy_TX4_MAC_ACK; | 297 | mac_ctl |= B43legacy_TX4_MAC_ACK; |
295 | if (!(((fctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) && | 298 | if (!(((fctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) && |
296 | ((fctl & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL))) | 299 | ((fctl & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL))) |
297 | mac_ctl |= B43legacy_TX4_MAC_HWSEQ; | 300 | mac_ctl |= B43legacy_TX4_MAC_HWSEQ; |
298 | if (txctl->flags & IEEE80211_TXCTL_FIRST_FRAGMENT) | 301 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) |
299 | mac_ctl |= B43legacy_TX4_MAC_STMSDU; | 302 | mac_ctl |= B43legacy_TX4_MAC_STMSDU; |
300 | if (rate_fb_ofdm) | 303 | if (rate_fb_ofdm) |
301 | mac_ctl |= B43legacy_TX4_MAC_FALLBACKOFDM; | 304 | mac_ctl |= B43legacy_TX4_MAC_FALLBACKOFDM; |
302 | if (txctl->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT) | 305 | if (info->flags & IEEE80211_TX_CTL_LONG_RETRY_LIMIT) |
303 | mac_ctl |= B43legacy_TX4_MAC_LONGFRAME; | 306 | mac_ctl |= B43legacy_TX4_MAC_LONGFRAME; |
304 | 307 | ||
305 | /* Generate the RTS or CTS-to-self frame */ | 308 | /* Generate the RTS or CTS-to-self frame */ |
306 | if ((txctl->flags & IEEE80211_TXCTL_USE_RTS_CTS) || | 309 | if ((info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) || |
307 | (txctl->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)) { | 310 | (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)) { |
308 | unsigned int len; | 311 | unsigned int len; |
309 | struct ieee80211_hdr *hdr; | 312 | struct ieee80211_hdr *hdr; |
310 | int rts_rate; | 313 | int rts_rate; |
@@ -312,26 +315,26 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev, | |||
312 | int rts_rate_ofdm; | 315 | int rts_rate_ofdm; |
313 | int rts_rate_fb_ofdm; | 316 | int rts_rate_fb_ofdm; |
314 | 317 | ||
315 | rts_rate = txctl->rts_cts_rate->hw_value; | 318 | rts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info)->hw_value; |
316 | rts_rate_ofdm = b43legacy_is_ofdm_rate(rts_rate); | 319 | rts_rate_ofdm = b43legacy_is_ofdm_rate(rts_rate); |
317 | rts_rate_fb = b43legacy_calc_fallback_rate(rts_rate); | 320 | rts_rate_fb = b43legacy_calc_fallback_rate(rts_rate); |
318 | rts_rate_fb_ofdm = b43legacy_is_ofdm_rate(rts_rate_fb); | 321 | rts_rate_fb_ofdm = b43legacy_is_ofdm_rate(rts_rate_fb); |
319 | if (rts_rate_fb_ofdm) | 322 | if (rts_rate_fb_ofdm) |
320 | mac_ctl |= B43legacy_TX4_MAC_CTSFALLBACKOFDM; | 323 | mac_ctl |= B43legacy_TX4_MAC_CTSFALLBACKOFDM; |
321 | 324 | ||
322 | if (txctl->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) { | 325 | if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) { |
323 | ieee80211_ctstoself_get(dev->wl->hw, | 326 | ieee80211_ctstoself_get(dev->wl->hw, |
324 | txctl->vif, | 327 | info->control.vif, |
325 | fragment_data, | 328 | fragment_data, |
326 | fragment_len, txctl, | 329 | fragment_len, info, |
327 | (struct ieee80211_cts *) | 330 | (struct ieee80211_cts *) |
328 | (txhdr->rts_frame)); | 331 | (txhdr->rts_frame)); |
329 | mac_ctl |= B43legacy_TX4_MAC_SENDCTS; | 332 | mac_ctl |= B43legacy_TX4_MAC_SENDCTS; |
330 | len = sizeof(struct ieee80211_cts); | 333 | len = sizeof(struct ieee80211_cts); |
331 | } else { | 334 | } else { |
332 | ieee80211_rts_get(dev->wl->hw, | 335 | ieee80211_rts_get(dev->wl->hw, |
333 | txctl->vif, | 336 | info->control.vif, |
334 | fragment_data, fragment_len, txctl, | 337 | fragment_data, fragment_len, info, |
335 | (struct ieee80211_rts *) | 338 | (struct ieee80211_rts *) |
336 | (txhdr->rts_frame)); | 339 | (txhdr->rts_frame)); |
337 | mac_ctl |= B43legacy_TX4_MAC_SENDRTS; | 340 | mac_ctl |= B43legacy_TX4_MAC_SENDRTS; |
@@ -362,12 +365,12 @@ int b43legacy_generate_txhdr(struct b43legacy_wldev *dev, | |||
362 | u8 *txhdr, | 365 | u8 *txhdr, |
363 | const unsigned char *fragment_data, | 366 | const unsigned char *fragment_data, |
364 | unsigned int fragment_len, | 367 | unsigned int fragment_len, |
365 | const struct ieee80211_tx_control *txctl, | 368 | const struct ieee80211_tx_info *info, |
366 | u16 cookie) | 369 | u16 cookie) |
367 | { | 370 | { |
368 | return generate_txhdr_fw3(dev, (struct b43legacy_txhdr_fw3 *)txhdr, | 371 | return generate_txhdr_fw3(dev, (struct b43legacy_txhdr_fw3 *)txhdr, |
369 | fragment_data, fragment_len, | 372 | fragment_data, fragment_len, |
370 | txctl, cookie); | 373 | info, cookie); |
371 | } | 374 | } |
372 | 375 | ||
373 | static s8 b43legacy_rssi_postprocess(struct b43legacy_wldev *dev, | 376 | static s8 b43legacy_rssi_postprocess(struct b43legacy_wldev *dev, |
diff --git a/drivers/net/wireless/b43legacy/xmit.h b/drivers/net/wireless/b43legacy/xmit.h index bab47928a0c9..e56777e0feab 100644 --- a/drivers/net/wireless/b43legacy/xmit.h +++ b/drivers/net/wireless/b43legacy/xmit.h | |||
@@ -80,7 +80,7 @@ int b43legacy_generate_txhdr(struct b43legacy_wldev *dev, | |||
80 | u8 *txhdr, | 80 | u8 *txhdr, |
81 | const unsigned char *fragment_data, | 81 | const unsigned char *fragment_data, |
82 | unsigned int fragment_len, | 82 | unsigned int fragment_len, |
83 | const struct ieee80211_tx_control *txctl, | 83 | const struct ieee80211_tx_info *info, |
84 | u16 cookie); | 84 | u16 cookie); |
85 | 85 | ||
86 | 86 | ||