diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 49 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 74 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 15 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 8 |
14 files changed, 125 insertions, 133 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 4fcba9b4635f..900140d3b304 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1484,11 +1484,11 @@ static u64 rt2400pci_get_tsf(struct ieee80211_hw *hw) | |||
1484 | return tsf; | 1484 | return tsf; |
1485 | } | 1485 | } |
1486 | 1486 | ||
1487 | static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | 1487 | static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
1488 | struct ieee80211_tx_control *control) | ||
1489 | { | 1488 | { |
1490 | struct rt2x00_dev *rt2x00dev = hw->priv; | 1489 | struct rt2x00_dev *rt2x00dev = hw->priv; |
1491 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1490 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1491 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | ||
1492 | struct queue_entry_priv_pci *entry_priv; | 1492 | struct queue_entry_priv_pci *entry_priv; |
1493 | struct skb_frame_desc *skbdesc; | 1493 | struct skb_frame_desc *skbdesc; |
1494 | struct txentry_desc txdesc; | 1494 | struct txentry_desc txdesc; |
@@ -1504,7 +1504,7 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1504 | * for our information. | 1504 | * for our information. |
1505 | */ | 1505 | */ |
1506 | intf->beacon->skb = skb; | 1506 | intf->beacon->skb = skb; |
1507 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | 1507 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc); |
1508 | 1508 | ||
1509 | /* | 1509 | /* |
1510 | * Fill in skb descriptor | 1510 | * Fill in skb descriptor |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 06e87cdff455..673350953b89 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1799,11 +1799,11 @@ static u64 rt2500pci_get_tsf(struct ieee80211_hw *hw) | |||
1799 | return tsf; | 1799 | return tsf; |
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | 1802 | static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
1803 | struct ieee80211_tx_control *control) | ||
1804 | { | 1803 | { |
1805 | struct rt2x00_dev *rt2x00dev = hw->priv; | 1804 | struct rt2x00_dev *rt2x00dev = hw->priv; |
1806 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1805 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1806 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | ||
1807 | struct queue_entry_priv_pci *entry_priv; | 1807 | struct queue_entry_priv_pci *entry_priv; |
1808 | struct skb_frame_desc *skbdesc; | 1808 | struct skb_frame_desc *skbdesc; |
1809 | struct txentry_desc txdesc; | 1809 | struct txentry_desc txdesc; |
@@ -1820,7 +1820,7 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1820 | * for our information. | 1820 | * for our information. |
1821 | */ | 1821 | */ |
1822 | intf->beacon->skb = skb; | 1822 | intf->beacon->skb = skb; |
1823 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | 1823 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc); |
1824 | 1824 | ||
1825 | /* | 1825 | /* |
1826 | * Fill in skb descriptor | 1826 | * Fill in skb descriptor |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 4122c5ebe7c3..cca1504550dc 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1666,13 +1666,12 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1666 | /* | 1666 | /* |
1667 | * IEEE80211 stack callback functions. | 1667 | * IEEE80211 stack callback functions. |
1668 | */ | 1668 | */ |
1669 | static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | 1669 | static int rt2500usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
1670 | struct sk_buff *skb, | ||
1671 | struct ieee80211_tx_control *control) | ||
1672 | { | 1670 | { |
1673 | struct rt2x00_dev *rt2x00dev = hw->priv; | 1671 | struct rt2x00_dev *rt2x00dev = hw->priv; |
1674 | struct usb_device *usb_dev = rt2x00dev_usb_dev(rt2x00dev); | 1672 | struct usb_device *usb_dev = rt2x00dev_usb_dev(rt2x00dev); |
1675 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1673 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1674 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | ||
1676 | struct queue_entry_priv_usb_bcn *bcn_priv; | 1675 | struct queue_entry_priv_usb_bcn *bcn_priv; |
1677 | struct skb_frame_desc *skbdesc; | 1676 | struct skb_frame_desc *skbdesc; |
1678 | struct txentry_desc txdesc; | 1677 | struct txentry_desc txdesc; |
@@ -1691,7 +1690,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1691 | * for our information. | 1690 | * for our information. |
1692 | */ | 1691 | */ |
1693 | intf->beacon->skb = skb; | 1692 | intf->beacon->skb = skb; |
1694 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | 1693 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc); |
1695 | 1694 | ||
1696 | /* | 1695 | /* |
1697 | * Add the descriptor in front of the skb. | 1696 | * Add the descriptor in front of the skb. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 1900d4c0e846..5c7220ea46e6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -542,8 +542,7 @@ struct rt2x00lib_ops { | |||
542 | struct sk_buff *skb, | 542 | struct sk_buff *skb, |
543 | struct txentry_desc *txdesc); | 543 | struct txentry_desc *txdesc); |
544 | int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, | 544 | int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, |
545 | struct data_queue *queue, struct sk_buff *skb, | 545 | struct data_queue *queue, struct sk_buff *skb); |
546 | struct ieee80211_tx_control *control); | ||
547 | int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, | 546 | int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, |
548 | struct sk_buff *skb); | 547 | struct sk_buff *skb); |
549 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, | 548 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, |
@@ -930,7 +929,6 @@ static inline u16 get_duration_res(const unsigned int size, const u8 rate) | |||
930 | * rt2x00queue_create_tx_descriptor - Create TX descriptor from mac80211 input | 929 | * rt2x00queue_create_tx_descriptor - Create TX descriptor from mac80211 input |
931 | * @entry: The entry which will be used to transfer the TX frame. | 930 | * @entry: The entry which will be used to transfer the TX frame. |
932 | * @txdesc: rt2x00 TX descriptor which will be initialized by this function. | 931 | * @txdesc: rt2x00 TX descriptor which will be initialized by this function. |
933 | * @control: mac80211 TX control structure from where we read the information. | ||
934 | * | 932 | * |
935 | * This function will initialize the &struct txentry_desc based on information | 933 | * This function will initialize the &struct txentry_desc based on information |
936 | * from mac80211. This descriptor can then be used by rt2x00lib and the drivers | 934 | * from mac80211. This descriptor can then be used by rt2x00lib and the drivers |
@@ -943,8 +941,7 @@ static inline u16 get_duration_res(const unsigned int size, const u8 rate) | |||
943 | * the &struct txentry_desc structure. | 941 | * the &struct txentry_desc structure. |
944 | */ | 942 | */ |
945 | void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | 943 | void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, |
946 | struct txentry_desc *txdesc, | 944 | struct txentry_desc *txdesc); |
947 | struct ieee80211_tx_control *control); | ||
948 | 945 | ||
949 | /** | 946 | /** |
950 | * rt2x00queue_write_tx_descriptor - Write TX descriptor to hardware | 947 | * rt2x00queue_write_tx_descriptor - Write TX descriptor to hardware |
@@ -1001,8 +998,7 @@ void rt2x00lib_rxdone(struct queue_entry *entry, | |||
1001 | /* | 998 | /* |
1002 | * mac80211 handlers. | 999 | * mac80211 handlers. |
1003 | */ | 1000 | */ |
1004 | int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | 1001 | int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb); |
1005 | struct ieee80211_tx_control *control); | ||
1006 | int rt2x00mac_start(struct ieee80211_hw *hw); | 1002 | int rt2x00mac_start(struct ieee80211_hw *hw); |
1007 | void rt2x00mac_stop(struct ieee80211_hw *hw); | 1003 | void rt2x00mac_stop(struct ieee80211_hw *hw); |
1008 | int rt2x00mac_add_interface(struct ieee80211_hw *hw, | 1004 | int rt2x00mac_add_interface(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index d341764e1b24..69e233610c94 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -415,7 +415,6 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | |||
415 | struct rt2x00_dev *rt2x00dev = data; | 415 | struct rt2x00_dev *rt2x00dev = data; |
416 | struct rt2x00_intf *intf = vif_to_intf(vif); | 416 | struct rt2x00_intf *intf = vif_to_intf(vif); |
417 | struct sk_buff *skb; | 417 | struct sk_buff *skb; |
418 | struct ieee80211_tx_control control; | ||
419 | struct ieee80211_bss_conf conf; | 418 | struct ieee80211_bss_conf conf; |
420 | int delayed_flags; | 419 | int delayed_flags; |
421 | 420 | ||
@@ -433,9 +432,9 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | |||
433 | spin_unlock(&intf->lock); | 432 | spin_unlock(&intf->lock); |
434 | 433 | ||
435 | if (delayed_flags & DELAYED_UPDATE_BEACON) { | 434 | if (delayed_flags & DELAYED_UPDATE_BEACON) { |
436 | skb = ieee80211_beacon_get(rt2x00dev->hw, vif, &control); | 435 | skb = ieee80211_beacon_get(rt2x00dev->hw, vif); |
437 | if (skb && rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, | 436 | if (skb && |
438 | skb, &control)) | 437 | rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, skb)) |
439 | dev_kfree_skb(skb); | 438 | dev_kfree_skb(skb); |
440 | } | 439 | } |
441 | 440 | ||
@@ -494,8 +493,13 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
494 | struct txdone_entry_desc *txdesc) | 493 | struct txdone_entry_desc *txdesc) |
495 | { | 494 | { |
496 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 495 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
497 | struct skb_frame_desc *skbdesc; | 496 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); |
498 | struct ieee80211_tx_status tx_status; | 497 | |
498 | /* | ||
499 | * Send frame to debugfs immediately, after this call is completed | ||
500 | * we are going to overwrite the skb->cb array. | ||
501 | */ | ||
502 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TXDONE, entry->skb); | ||
499 | 503 | ||
500 | /* | 504 | /* |
501 | * Update TX statistics. | 505 | * Update TX statistics. |
@@ -508,21 +512,20 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
508 | /* | 512 | /* |
509 | * Initialize TX status | 513 | * Initialize TX status |
510 | */ | 514 | */ |
511 | tx_status.flags = 0; | 515 | memset(&tx_info->status, 0, sizeof(tx_info->status)); |
512 | tx_status.ack_signal = 0; | 516 | tx_info->status.ack_signal = 0; |
513 | tx_status.excessive_retries = | 517 | tx_info->status.excessive_retries = |
514 | test_bit(TXDONE_EXCESSIVE_RETRY, &txdesc->flags); | 518 | test_bit(TXDONE_EXCESSIVE_RETRY, &txdesc->flags); |
515 | tx_status.retry_count = txdesc->retry; | 519 | tx_info->status.retry_count = txdesc->retry; |
516 | memcpy(&tx_status.control, txdesc->control, sizeof(*txdesc->control)); | ||
517 | 520 | ||
518 | if (!(tx_status.control.flags & IEEE80211_TXCTL_NO_ACK)) { | 521 | if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) { |
519 | if (test_bit(TXDONE_SUCCESS, &txdesc->flags)) | 522 | if (test_bit(TXDONE_SUCCESS, &txdesc->flags)) |
520 | tx_status.flags |= IEEE80211_TX_STATUS_ACK; | 523 | tx_info->flags |= IEEE80211_TX_STAT_ACK; |
521 | else if (test_bit(TXDONE_FAILURE, &txdesc->flags)) | 524 | else if (test_bit(TXDONE_FAILURE, &txdesc->flags)) |
522 | rt2x00dev->low_level_stats.dot11ACKFailureCount++; | 525 | rt2x00dev->low_level_stats.dot11ACKFailureCount++; |
523 | } | 526 | } |
524 | 527 | ||
525 | if (tx_status.control.flags & IEEE80211_TXCTL_USE_RTS_CTS) { | 528 | if (tx_info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) { |
526 | if (test_bit(TXDONE_SUCCESS, &txdesc->flags)) | 529 | if (test_bit(TXDONE_SUCCESS, &txdesc->flags)) |
527 | rt2x00dev->low_level_stats.dot11RTSSuccessCount++; | 530 | rt2x00dev->low_level_stats.dot11RTSSuccessCount++; |
528 | else if (test_bit(TXDONE_FAILURE, &txdesc->flags)) | 531 | else if (test_bit(TXDONE_FAILURE, &txdesc->flags)) |
@@ -530,19 +533,13 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
530 | } | 533 | } |
531 | 534 | ||
532 | /* | 535 | /* |
533 | * Send the tx_status to debugfs. Only send the status report | 536 | * Only send the status report to mac80211 when TX status was |
534 | * to mac80211 when the frame originated from there. If this was | 537 | * requested by it. If this was a extra frame coming through |
535 | * a extra frame coming through a mac80211 library call (RTS/CTS) | 538 | * a mac80211 library call (RTS/CTS) then we should not send the |
536 | * then we should not send the status report back. | 539 | * status report back. |
537 | * If send to mac80211, mac80211 will clean up the skb structure, | ||
538 | * otherwise we have to do it ourself. | ||
539 | */ | 540 | */ |
540 | rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TXDONE, entry->skb); | 541 | if (tx_info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) |
541 | 542 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb); | |
542 | skbdesc = get_skb_frame_desc(entry->skb); | ||
543 | if (!(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED)) | ||
544 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, | ||
545 | entry->skb, &tx_status); | ||
546 | else | 543 | else |
547 | dev_kfree_skb_irq(entry->skb); | 544 | dev_kfree_skb_irq(entry->skb); |
548 | entry->skb = NULL; | 545 | entry->skb = NULL; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index c5cedb29b87d..b5379b027b18 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -31,14 +31,15 @@ | |||
31 | 31 | ||
32 | static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | 32 | static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, |
33 | struct data_queue *queue, | 33 | struct data_queue *queue, |
34 | struct sk_buff *frag_skb, | 34 | struct sk_buff *frag_skb) |
35 | struct ieee80211_tx_control *control) | ||
36 | { | 35 | { |
36 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(frag_skb); | ||
37 | struct skb_frame_desc *skbdesc; | 37 | struct skb_frame_desc *skbdesc; |
38 | struct ieee80211_tx_info *rts_info; | ||
38 | struct sk_buff *skb; | 39 | struct sk_buff *skb; |
39 | int size; | 40 | int size; |
40 | 41 | ||
41 | if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) | 42 | if (tx_info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) |
42 | size = sizeof(struct ieee80211_cts); | 43 | size = sizeof(struct ieee80211_cts); |
43 | else | 44 | else |
44 | size = sizeof(struct ieee80211_rts); | 45 | size = sizeof(struct ieee80211_rts); |
@@ -52,13 +53,33 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
52 | skb_reserve(skb, rt2x00dev->hw->extra_tx_headroom); | 53 | skb_reserve(skb, rt2x00dev->hw->extra_tx_headroom); |
53 | skb_put(skb, size); | 54 | skb_put(skb, size); |
54 | 55 | ||
55 | if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) | 56 | /* |
56 | ieee80211_ctstoself_get(rt2x00dev->hw, control->vif, | 57 | * Copy TX information over from original frame to |
57 | frag_skb->data, frag_skb->len, control, | 58 | * RTS/CTS frame. Note that we set the no encryption flag |
59 | * since we don't want this frame to be encrypted. | ||
60 | * RTS frames should be acked, while CTS-to-self frames | ||
61 | * should not. The ready for TX flag is cleared to prevent | ||
62 | * it being automatically send when the descriptor is | ||
63 | * written to the hardware. | ||
64 | */ | ||
65 | memcpy(skb->cb, frag_skb->cb, sizeof(skb->cb)); | ||
66 | rts_info = IEEE80211_SKB_CB(skb); | ||
67 | rts_info->flags |= IEEE80211_TX_CTL_DO_NOT_ENCRYPT; | ||
68 | rts_info->flags &= ~IEEE80211_TX_CTL_USE_CTS_PROTECT; | ||
69 | rts_info->flags &= ~IEEE80211_TX_CTL_REQ_TX_STATUS; | ||
70 | |||
71 | if (tx_info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) | ||
72 | rts_info->flags |= IEEE80211_TX_CTL_NO_ACK; | ||
73 | else | ||
74 | rts_info->flags &= ~IEEE80211_TX_CTL_NO_ACK; | ||
75 | |||
76 | if (tx_info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) | ||
77 | ieee80211_ctstoself_get(rt2x00dev->hw, tx_info->control.vif, | ||
78 | frag_skb->data, size, tx_info, | ||
58 | (struct ieee80211_cts *)(skb->data)); | 79 | (struct ieee80211_cts *)(skb->data)); |
59 | else | 80 | else |
60 | ieee80211_rts_get(rt2x00dev->hw, control->vif, | 81 | ieee80211_rts_get(rt2x00dev->hw, tx_info->control.vif, |
61 | frag_skb->data, frag_skb->len, control, | 82 | frag_skb->data, size, tx_info, |
62 | (struct ieee80211_rts *)(skb->data)); | 83 | (struct ieee80211_rts *)(skb->data)); |
63 | 84 | ||
64 | /* | 85 | /* |
@@ -68,7 +89,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
68 | memset(skbdesc, 0, sizeof(*skbdesc)); | 89 | memset(skbdesc, 0, sizeof(*skbdesc)); |
69 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | 90 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; |
70 | 91 | ||
71 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { | 92 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb)) { |
72 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); | 93 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); |
73 | return NETDEV_TX_BUSY; | 94 | return NETDEV_TX_BUSY; |
74 | } | 95 | } |
@@ -76,14 +97,13 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
76 | return NETDEV_TX_OK; | 97 | return NETDEV_TX_OK; |
77 | } | 98 | } |
78 | 99 | ||
79 | int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | 100 | int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
80 | struct ieee80211_tx_control *control) | ||
81 | { | 101 | { |
82 | struct rt2x00_dev *rt2x00dev = hw->priv; | 102 | struct rt2x00_dev *rt2x00dev = hw->priv; |
103 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | ||
83 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; | 104 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; |
84 | enum data_queue_qid qid = mac80211_queue_to_qid(control->queue); | 105 | enum data_queue_qid qid = mac80211_queue_to_qid(tx_info->queue); |
85 | struct data_queue *queue; | 106 | struct data_queue *queue; |
86 | struct skb_frame_desc *skbdesc; | ||
87 | u16 frame_control; | 107 | u16 frame_control; |
88 | 108 | ||
89 | /* | 109 | /* |
@@ -100,7 +120,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
100 | /* | 120 | /* |
101 | * Determine which queue to put packet on. | 121 | * Determine which queue to put packet on. |
102 | */ | 122 | */ |
103 | if (control->flags & IEEE80211_TXCTL_SEND_AFTER_DTIM && | 123 | if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM && |
104 | test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags)) | 124 | test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags)) |
105 | queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM); | 125 | queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM); |
106 | else | 126 | else |
@@ -125,33 +145,27 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
125 | */ | 145 | */ |
126 | frame_control = le16_to_cpu(ieee80211hdr->frame_control); | 146 | frame_control = le16_to_cpu(ieee80211hdr->frame_control); |
127 | if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) && | 147 | if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) && |
128 | (control->flags & (IEEE80211_TXCTL_USE_RTS_CTS | | 148 | (tx_info->flags & (IEEE80211_TX_CTL_USE_RTS_CTS | |
129 | IEEE80211_TXCTL_USE_CTS_PROTECT)) && | 149 | IEEE80211_TX_CTL_USE_CTS_PROTECT)) && |
130 | !rt2x00dev->ops->hw->set_rts_threshold) { | 150 | !rt2x00dev->ops->hw->set_rts_threshold) { |
131 | if (rt2x00queue_available(queue) <= 1) { | 151 | if (rt2x00queue_available(queue) <= 1) { |
132 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); | 152 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); |
133 | return NETDEV_TX_BUSY; | 153 | return NETDEV_TX_BUSY; |
134 | } | 154 | } |
135 | 155 | ||
136 | if (rt2x00mac_tx_rts_cts(rt2x00dev, queue, skb, control)) { | 156 | if (rt2x00mac_tx_rts_cts(rt2x00dev, queue, skb)) { |
137 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); | 157 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); |
138 | return NETDEV_TX_BUSY; | 158 | return NETDEV_TX_BUSY; |
139 | } | 159 | } |
140 | } | 160 | } |
141 | 161 | ||
142 | /* | 162 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb)) { |
143 | * Initialize skb descriptor | 163 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); |
144 | */ | ||
145 | skbdesc = get_skb_frame_desc(skb); | ||
146 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
147 | |||
148 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { | ||
149 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); | ||
150 | return NETDEV_TX_BUSY; | 164 | return NETDEV_TX_BUSY; |
151 | } | 165 | } |
152 | 166 | ||
153 | if (rt2x00queue_full(queue)) | 167 | if (rt2x00queue_full(queue)) |
154 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); | 168 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); |
155 | 169 | ||
156 | if (rt2x00dev->ops->lib->kick_tx_queue) | 170 | if (rt2x00dev->ops->lib->kick_tx_queue) |
157 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, qid); | 171 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, qid); |
@@ -380,9 +394,7 @@ int rt2x00mac_config_interface(struct ieee80211_hw *hw, | |||
380 | if (conf->type != IEEE80211_IF_TYPE_AP || !conf->beacon) | 394 | if (conf->type != IEEE80211_IF_TYPE_AP || !conf->beacon) |
381 | return 0; | 395 | return 0; |
382 | 396 | ||
383 | status = rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, | 397 | status = rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, conf->beacon); |
384 | conf->beacon, | ||
385 | conf->beacon_control); | ||
386 | if (status) | 398 | if (status) |
387 | dev_kfree_skb(conf->beacon); | 399 | dev_kfree_skb(conf->beacon); |
388 | 400 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index fa7de41be049..70a3d135f64e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -35,8 +35,7 @@ | |||
35 | * TX data handlers. | 35 | * TX data handlers. |
36 | */ | 36 | */ |
37 | int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, | 37 | int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, |
38 | struct data_queue *queue, struct sk_buff *skb, | 38 | struct data_queue *queue, struct sk_buff *skb) |
39 | struct ieee80211_tx_control *control) | ||
40 | { | 39 | { |
41 | struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); | 40 | struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); |
42 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | 41 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
@@ -64,19 +63,19 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
64 | * for our information. | 63 | * for our information. |
65 | */ | 64 | */ |
66 | entry->skb = skb; | 65 | entry->skb = skb; |
67 | rt2x00queue_create_tx_descriptor(entry, &txdesc, control); | 66 | rt2x00queue_create_tx_descriptor(entry, &txdesc); |
68 | 67 | ||
69 | /* | 68 | /* |
70 | * Fill in skb descriptor | 69 | * Fill in skb descriptor |
71 | */ | 70 | */ |
72 | skbdesc = get_skb_frame_desc(skb); | 71 | skbdesc = get_skb_frame_desc(skb); |
72 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
73 | skbdesc->data = skb->data; | 73 | skbdesc->data = skb->data; |
74 | skbdesc->data_len = skb->len; | 74 | skbdesc->data_len = skb->len; |
75 | skbdesc->desc = entry_priv->desc; | 75 | skbdesc->desc = entry_priv->desc; |
76 | skbdesc->desc_len = queue->desc_size; | 76 | skbdesc->desc_len = queue->desc_size; |
77 | skbdesc->entry = entry; | 77 | skbdesc->entry = entry; |
78 | 78 | ||
79 | memcpy(&entry_priv->control, control, sizeof(entry_priv->control)); | ||
80 | memcpy(entry_priv->data, skb->data, skb->len); | 79 | memcpy(entry_priv->data, skb->data, skb->len); |
81 | 80 | ||
82 | rt2x00queue_write_tx_descriptor(entry, &txdesc); | 81 | rt2x00queue_write_tx_descriptor(entry, &txdesc); |
@@ -164,9 +163,9 @@ void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct queue_entry *entry, | |||
164 | struct txdone_entry_desc *txdesc) | 163 | struct txdone_entry_desc *txdesc) |
165 | { | 164 | { |
166 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | 165 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
166 | enum data_queue_qid qid = skb_get_queue_mapping(entry->skb); | ||
167 | u32 word; | 167 | u32 word; |
168 | 168 | ||
169 | txdesc->control = &entry_priv->control; | ||
170 | rt2x00lib_txdone(entry, txdesc); | 169 | rt2x00lib_txdone(entry, txdesc); |
171 | 170 | ||
172 | /* | 171 | /* |
@@ -187,7 +186,7 @@ void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct queue_entry *entry, | |||
187 | * is reenabled when the txdone handler has finished. | 186 | * is reenabled when the txdone handler has finished. |
188 | */ | 187 | */ |
189 | if (!rt2x00queue_full(entry->queue)) | 188 | if (!rt2x00queue_full(entry->queue)) |
190 | ieee80211_wake_queue(rt2x00dev->hw, entry_priv->control.queue); | 189 | ieee80211_wake_queue(rt2x00dev->hw, qid); |
191 | 190 | ||
192 | } | 191 | } |
193 | EXPORT_SYMBOL_GPL(rt2x00pci_txdone); | 192 | EXPORT_SYMBOL_GPL(rt2x00pci_txdone); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index 557d15a888ab..37c851e442c1 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h | |||
@@ -91,8 +91,7 @@ rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev, | |||
91 | * TX data handlers. | 91 | * TX data handlers. |
92 | */ | 92 | */ |
93 | int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, | 93 | int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, |
94 | struct data_queue *queue, struct sk_buff *skb, | 94 | struct data_queue *queue, struct sk_buff *skb); |
95 | struct ieee80211_tx_control *control); | ||
96 | 95 | ||
97 | /** | 96 | /** |
98 | * struct queue_entry_priv_pci: Per entry PCI specific information | 97 | * struct queue_entry_priv_pci: Per entry PCI specific information |
@@ -101,7 +100,6 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
101 | * @desc_dma: DMA pointer to &desc. | 100 | * @desc_dma: DMA pointer to &desc. |
102 | * @data: Pointer to device's entry memory. | 101 | * @data: Pointer to device's entry memory. |
103 | * @data_dma: DMA pointer to &data. | 102 | * @data_dma: DMA pointer to &data. |
104 | * @control: mac80211 control structure used to transmit data. | ||
105 | */ | 103 | */ |
106 | struct queue_entry_priv_pci { | 104 | struct queue_entry_priv_pci { |
107 | __le32 *desc; | 105 | __le32 *desc; |
@@ -109,8 +107,6 @@ struct queue_entry_priv_pci { | |||
109 | 107 | ||
110 | void *data; | 108 | void *data; |
111 | dma_addr_t data_dma; | 109 | dma_addr_t data_dma; |
112 | |||
113 | struct ieee80211_tx_control control; | ||
114 | }; | 110 | }; |
115 | 111 | ||
116 | /** | 112 | /** |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 5cf4c2f59260..e69ef4b19239 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -30,13 +30,13 @@ | |||
30 | #include "rt2x00lib.h" | 30 | #include "rt2x00lib.h" |
31 | 31 | ||
32 | void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | 32 | void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, |
33 | struct txentry_desc *txdesc, | 33 | struct txentry_desc *txdesc) |
34 | struct ieee80211_tx_control *control) | ||
35 | { | 34 | { |
36 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 35 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
36 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); | ||
37 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; | 37 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; |
38 | struct ieee80211_rate *rate = | 38 | struct ieee80211_rate *rate = |
39 | ieee80211_get_tx_rate(rt2x00dev->hw, control); | 39 | ieee80211_get_tx_rate(rt2x00dev->hw, tx_info); |
40 | const struct rt2x00_rate *hwrate; | 40 | const struct rt2x00_rate *hwrate; |
41 | unsigned int data_length; | 41 | unsigned int data_length; |
42 | unsigned int duration; | 42 | unsigned int duration; |
@@ -64,7 +64,7 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
64 | /* | 64 | /* |
65 | * Check whether this frame is to be acked. | 65 | * Check whether this frame is to be acked. |
66 | */ | 66 | */ |
67 | if (!(control->flags & IEEE80211_TXCTL_NO_ACK)) | 67 | if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) |
68 | __set_bit(ENTRY_TXD_ACK, &txdesc->flags); | 68 | __set_bit(ENTRY_TXD_ACK, &txdesc->flags); |
69 | 69 | ||
70 | /* | 70 | /* |
@@ -72,23 +72,20 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
72 | */ | 72 | */ |
73 | if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) { | 73 | if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) { |
74 | __set_bit(ENTRY_TXD_BURST, &txdesc->flags); | 74 | __set_bit(ENTRY_TXD_BURST, &txdesc->flags); |
75 | if (is_rts_frame(frame_control)) { | 75 | if (is_rts_frame(frame_control)) |
76 | __set_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags); | 76 | __set_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags); |
77 | __set_bit(ENTRY_TXD_ACK, &txdesc->flags); | 77 | else |
78 | } else { | ||
79 | __set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags); | 78 | __set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags); |
80 | __clear_bit(ENTRY_TXD_ACK, &txdesc->flags); | 79 | if (tx_info->control.rts_cts_rate_idx >= 0) |
81 | } | ||
82 | if (control->rts_cts_rate_idx >= 0) | ||
83 | rate = | 80 | rate = |
84 | ieee80211_get_rts_cts_rate(rt2x00dev->hw, control); | 81 | ieee80211_get_rts_cts_rate(rt2x00dev->hw, tx_info); |
85 | } | 82 | } |
86 | 83 | ||
87 | /* | 84 | /* |
88 | * Determine retry information. | 85 | * Determine retry information. |
89 | */ | 86 | */ |
90 | txdesc->retry_limit = control->retry_limit; | 87 | txdesc->retry_limit = tx_info->control.retry_limit; |
91 | if (control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT) | 88 | if (tx_info->flags & IEEE80211_TX_CTL_LONG_RETRY_LIMIT) |
92 | __set_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags); | 89 | __set_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags); |
93 | 90 | ||
94 | /* | 91 | /* |
@@ -113,7 +110,7 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
113 | */ | 110 | */ |
114 | if (test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)) { | 111 | if (test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)) { |
115 | txdesc->ifs = IFS_SIFS; | 112 | txdesc->ifs = IFS_SIFS; |
116 | } else if (control->flags & IEEE80211_TXCTL_FIRST_FRAGMENT) { | 113 | } else if (tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) { |
117 | __set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags); | 114 | __set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags); |
118 | txdesc->ifs = IFS_BACKOFF; | 115 | txdesc->ifs = IFS_BACKOFF; |
119 | } else { | 116 | } else { |
@@ -179,8 +176,10 @@ void rt2x00queue_write_tx_descriptor(struct queue_entry *entry, | |||
179 | 176 | ||
180 | /* | 177 | /* |
181 | * We are done writing the frame to the queue entry, | 178 | * We are done writing the frame to the queue entry, |
182 | * if this entry is a RTS of CTS-to-self frame we are done, | 179 | * also kick the queue in case the correct flags are set, |
183 | * otherwise we need to kick the queue. | 180 | * note that this will automatically filter beacons and |
181 | * RTS/CTS frames since those frames don't have this flag | ||
182 | * set. | ||
184 | */ | 183 | */ |
185 | if (rt2x00dev->ops->lib->kick_tx_queue && | 184 | if (rt2x00dev->ops->lib->kick_tx_queue && |
186 | !(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED)) | 185 | !(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED)) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index c6edc52873c4..f263fe422f87 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -105,8 +105,8 @@ enum skb_frame_desc_flags { | |||
105 | /** | 105 | /** |
106 | * struct skb_frame_desc: Descriptor information for the skb buffer | 106 | * struct skb_frame_desc: Descriptor information for the skb buffer |
107 | * | 107 | * |
108 | * This structure is placed over the skb->cb array, this means that | 108 | * This structure is placed over the driver_data array, this means that |
109 | * this structure should not exceed the size of that array (48 bytes). | 109 | * this structure should not exceed the size of that array (40 bytes). |
110 | * | 110 | * |
111 | * @flags: Frame flags, see &enum skb_frame_desc_flags. | 111 | * @flags: Frame flags, see &enum skb_frame_desc_flags. |
112 | * @data: Pointer to data part of frame (Start of ieee80211 header). | 112 | * @data: Pointer to data part of frame (Start of ieee80211 header). |
@@ -129,10 +129,15 @@ struct skb_frame_desc { | |||
129 | struct queue_entry *entry; | 129 | struct queue_entry *entry; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | /** | ||
133 | * get_skb_frame_desc - Obtain the rt2x00 frame descriptor from a sk_buff. | ||
134 | * @skb: &struct sk_buff from where we obtain the &struct skb_frame_desc | ||
135 | */ | ||
132 | static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb) | 136 | static inline struct skb_frame_desc* get_skb_frame_desc(struct sk_buff *skb) |
133 | { | 137 | { |
134 | BUILD_BUG_ON(sizeof(struct skb_frame_desc) > sizeof(skb->cb)); | 138 | BUILD_BUG_ON(sizeof(struct skb_frame_desc) > |
135 | return (struct skb_frame_desc *)&skb->cb[0]; | 139 | IEEE80211_TX_INFO_DRIVER_DATA_SIZE); |
140 | return (struct skb_frame_desc *)&IEEE80211_SKB_CB(skb)->driver_data; | ||
136 | } | 141 | } |
137 | 142 | ||
138 | /** | 143 | /** |
@@ -189,12 +194,10 @@ enum txdone_entry_desc_flags { | |||
189 | * Summary of information that has been read from the TX frame descriptor | 194 | * Summary of information that has been read from the TX frame descriptor |
190 | * after the device is done with transmission. | 195 | * after the device is done with transmission. |
191 | * | 196 | * |
192 | * @control: Control structure which was used to transmit the frame. | ||
193 | * @flags: TX done flags (See &enum txdone_entry_desc_flags). | 197 | * @flags: TX done flags (See &enum txdone_entry_desc_flags). |
194 | * @retry: Retry count. | 198 | * @retry: Retry count. |
195 | */ | 199 | */ |
196 | struct txdone_entry_desc { | 200 | struct txdone_entry_desc { |
197 | struct ieee80211_tx_control *control; | ||
198 | unsigned long flags; | 201 | unsigned long flags; |
199 | int retry; | 202 | int retry; |
200 | }; | 203 | }; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index dcee1b4f152b..52d12fdc0ccf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -129,9 +129,9 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
129 | { | 129 | { |
130 | struct queue_entry *entry = (struct queue_entry *)urb->context; | 130 | struct queue_entry *entry = (struct queue_entry *)urb->context; |
131 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 131 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
132 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; | ||
133 | struct txdone_entry_desc txdesc; | 132 | struct txdone_entry_desc txdesc; |
134 | __le32 *txd = (__le32 *)entry->skb->data; | 133 | __le32 *txd = (__le32 *)entry->skb->data; |
134 | enum data_queue_qid qid = skb_get_queue_mapping(entry->skb); | ||
135 | u32 word; | 135 | u32 word; |
136 | 136 | ||
137 | if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) || | 137 | if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) || |
@@ -159,7 +159,6 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
159 | else | 159 | else |
160 | __set_bit(TXDONE_FAILURE, &txdesc.flags); | 160 | __set_bit(TXDONE_FAILURE, &txdesc.flags); |
161 | txdesc.retry = 0; | 161 | txdesc.retry = 0; |
162 | txdesc.control = &entry_priv->control; | ||
163 | 162 | ||
164 | rt2x00lib_txdone(entry, &txdesc); | 163 | rt2x00lib_txdone(entry, &txdesc); |
165 | 164 | ||
@@ -175,12 +174,11 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
175 | * is reenabled when the txdone handler has finished. | 174 | * is reenabled when the txdone handler has finished. |
176 | */ | 175 | */ |
177 | if (!rt2x00queue_full(entry->queue)) | 176 | if (!rt2x00queue_full(entry->queue)) |
178 | ieee80211_wake_queue(rt2x00dev->hw, entry_priv->control.queue); | 177 | ieee80211_wake_queue(rt2x00dev->hw, qid); |
179 | } | 178 | } |
180 | 179 | ||
181 | int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | 180 | int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, |
182 | struct data_queue *queue, struct sk_buff *skb, | 181 | struct data_queue *queue, struct sk_buff *skb) |
183 | struct ieee80211_tx_control *control) | ||
184 | { | 182 | { |
185 | struct usb_device *usb_dev = rt2x00dev_usb_dev(rt2x00dev); | 183 | struct usb_device *usb_dev = rt2x00dev_usb_dev(rt2x00dev); |
186 | struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); | 184 | struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); |
@@ -206,7 +204,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
206 | * for our information. | 204 | * for our information. |
207 | */ | 205 | */ |
208 | entry->skb = skb; | 206 | entry->skb = skb; |
209 | rt2x00queue_create_tx_descriptor(entry, &txdesc, control); | 207 | rt2x00queue_create_tx_descriptor(entry, &txdesc); |
210 | 208 | ||
211 | /* | 209 | /* |
212 | * Add the descriptor in front of the skb. | 210 | * Add the descriptor in front of the skb. |
@@ -218,13 +216,13 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
218 | * Fill in skb descriptor | 216 | * Fill in skb descriptor |
219 | */ | 217 | */ |
220 | skbdesc = get_skb_frame_desc(skb); | 218 | skbdesc = get_skb_frame_desc(skb); |
219 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
221 | skbdesc->data = skb->data + queue->desc_size; | 220 | skbdesc->data = skb->data + queue->desc_size; |
222 | skbdesc->data_len = skb->len - queue->desc_size; | 221 | skbdesc->data_len = skb->len - queue->desc_size; |
223 | skbdesc->desc = skb->data; | 222 | skbdesc->desc = skb->data; |
224 | skbdesc->desc_len = queue->desc_size; | 223 | skbdesc->desc_len = queue->desc_size; |
225 | skbdesc->entry = entry; | 224 | skbdesc->entry = entry; |
226 | 225 | ||
227 | memcpy(&entry_priv->control, control, sizeof(entry_priv->control)); | ||
228 | rt2x00queue_write_tx_descriptor(entry, &txdesc); | 226 | rt2x00queue_write_tx_descriptor(entry, &txdesc); |
229 | 227 | ||
230 | /* | 228 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h index 15b404aa714d..26f53f868af6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.h +++ b/drivers/net/wireless/rt2x00/rt2x00usb.h | |||
@@ -216,19 +216,15 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev); | |||
216 | * TX data handlers. | 216 | * TX data handlers. |
217 | */ | 217 | */ |
218 | int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | 218 | int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, |
219 | struct data_queue *queue, struct sk_buff *skb, | 219 | struct data_queue *queue, struct sk_buff *skb); |
220 | struct ieee80211_tx_control *control); | ||
221 | 220 | ||
222 | /** | 221 | /** |
223 | * struct queue_entry_priv_usb: Per entry USB specific information | 222 | * struct queue_entry_priv_usb: Per entry USB specific information |
224 | * | 223 | * |
225 | * @urb: Urb structure used for device communication. | 224 | * @urb: Urb structure used for device communication. |
226 | * @control: mac80211 control structure used to transmit data. | ||
227 | */ | 225 | */ |
228 | struct queue_entry_priv_usb { | 226 | struct queue_entry_priv_usb { |
229 | struct urb *urb; | 227 | struct urb *urb; |
230 | |||
231 | struct ieee80211_tx_control control; | ||
232 | }; | 228 | }; |
233 | 229 | ||
234 | /** | 230 | /** |
@@ -239,15 +235,12 @@ struct queue_entry_priv_usb { | |||
239 | * with beacons. | 235 | * with beacons. |
240 | * | 236 | * |
241 | * @urb: Urb structure used for device communication. | 237 | * @urb: Urb structure used for device communication. |
242 | * @control: mac80211 control structure used to transmit data. | ||
243 | * @guardian_data: Set to 0, used for sending the guardian data. | 238 | * @guardian_data: Set to 0, used for sending the guardian data. |
244 | * @guardian_urb: Urb structure used to send the guardian data. | 239 | * @guardian_urb: Urb structure used to send the guardian data. |
245 | */ | 240 | */ |
246 | struct queue_entry_priv_usb_bcn { | 241 | struct queue_entry_priv_usb_bcn { |
247 | struct urb *urb; | 242 | struct urb *urb; |
248 | 243 | ||
249 | struct ieee80211_tx_control control; | ||
250 | |||
251 | unsigned int guardian_data; | 244 | unsigned int guardian_data; |
252 | struct urb *guardian_urb; | 245 | struct urb *guardian_urb; |
253 | }; | 246 | }; |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 7598b6e15784..e13ed5ced26e 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2357,11 +2357,11 @@ static u64 rt61pci_get_tsf(struct ieee80211_hw *hw) | |||
2357 | return tsf; | 2357 | return tsf; |
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | 2360 | static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
2361 | struct ieee80211_tx_control *control) | ||
2362 | { | 2361 | { |
2363 | struct rt2x00_dev *rt2x00dev = hw->priv; | 2362 | struct rt2x00_dev *rt2x00dev = hw->priv; |
2364 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 2363 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
2364 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | ||
2365 | struct queue_entry_priv_pci *entry_priv; | 2365 | struct queue_entry_priv_pci *entry_priv; |
2366 | struct skb_frame_desc *skbdesc; | 2366 | struct skb_frame_desc *skbdesc; |
2367 | struct txentry_desc txdesc; | 2367 | struct txentry_desc txdesc; |
@@ -2377,7 +2377,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2377 | * for our information. | 2377 | * for our information. |
2378 | */ | 2378 | */ |
2379 | intf->beacon->skb = skb; | 2379 | intf->beacon->skb = skb; |
2380 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | 2380 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc); |
2381 | 2381 | ||
2382 | entry_priv = intf->beacon->priv_data; | 2382 | entry_priv = intf->beacon->priv_data; |
2383 | memset(entry_priv->desc, 0, intf->beacon->queue->desc_size); | 2383 | memset(entry_priv->desc, 0, intf->beacon->queue->desc_size); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index e55bcbdfc1e1..26c2e0a1a308 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1948,11 +1948,11 @@ static u64 rt73usb_get_tsf(struct ieee80211_hw *hw) | |||
1948 | #define rt73usb_get_tsf NULL | 1948 | #define rt73usb_get_tsf NULL |
1949 | #endif | 1949 | #endif |
1950 | 1950 | ||
1951 | static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | 1951 | static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
1952 | struct ieee80211_tx_control *control) | ||
1953 | { | 1952 | { |
1954 | struct rt2x00_dev *rt2x00dev = hw->priv; | 1953 | struct rt2x00_dev *rt2x00dev = hw->priv; |
1955 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1954 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1955 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | ||
1956 | struct skb_frame_desc *skbdesc; | 1956 | struct skb_frame_desc *skbdesc; |
1957 | struct txentry_desc txdesc; | 1957 | struct txentry_desc txdesc; |
1958 | unsigned int beacon_base; | 1958 | unsigned int beacon_base; |
@@ -1967,7 +1967,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1967 | * for our information. | 1967 | * for our information. |
1968 | */ | 1968 | */ |
1969 | intf->beacon->skb = skb; | 1969 | intf->beacon->skb = skb; |
1970 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc, control); | 1970 | rt2x00queue_create_tx_descriptor(intf->beacon, &txdesc); |
1971 | 1971 | ||
1972 | /* | 1972 | /* |
1973 | * Add the descriptor in front of the skb. | 1973 | * Add the descriptor in front of the skb. |