diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 1 |
10 files changed, 47 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 23bc51a96dbe..52ccb85fed65 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1531,6 +1531,7 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1531 | */ | 1531 | */ |
1532 | skbdesc = get_skb_frame_desc(skb); | 1532 | skbdesc = get_skb_frame_desc(skb); |
1533 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1533 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1534 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
1534 | skbdesc->data = skb->data; | 1535 | skbdesc->data = skb->data; |
1535 | skbdesc->data_len = skb->len; | 1536 | skbdesc->data_len = skb->len; |
1536 | skbdesc->desc = priv_tx->desc; | 1537 | skbdesc->desc = priv_tx->desc; |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 529b1841a085..3bf85604ca69 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1843,6 +1843,7 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1843 | */ | 1843 | */ |
1844 | skbdesc = get_skb_frame_desc(skb); | 1844 | skbdesc = get_skb_frame_desc(skb); |
1845 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1845 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1846 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
1846 | skbdesc->data = skb->data; | 1847 | skbdesc->data = skb->data; |
1847 | skbdesc->data_len = skb->len; | 1848 | skbdesc->data_len = skb->len; |
1848 | skbdesc->desc = priv_tx->desc; | 1849 | skbdesc->desc = priv_tx->desc; |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index f9d6f539a80f..f7dc06a74d1a 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1751,6 +1751,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, | |||
1751 | */ | 1751 | */ |
1752 | skbdesc = get_skb_frame_desc(skb); | 1752 | skbdesc = get_skb_frame_desc(skb); |
1753 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1753 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1754 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
1754 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; | 1755 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; |
1755 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; | 1756 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; |
1756 | skbdesc->desc = skb->data; | 1757 | skbdesc->desc = skb->data; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index d69f7407b972..6ccbfc7cbf91 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -500,6 +500,7 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
500 | struct txdone_entry_desc *txdesc) | 500 | struct txdone_entry_desc *txdesc) |
501 | { | 501 | { |
502 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 502 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
503 | struct skb_frame_desc *skbdesc; | ||
503 | struct ieee80211_tx_status tx_status; | 504 | struct ieee80211_tx_status tx_status; |
504 | int success = !!(txdesc->status == TX_SUCCESS || | 505 | int success = !!(txdesc->status == TX_SUCCESS || |
505 | txdesc->status == TX_SUCCESS_RETRY); | 506 | txdesc->status == TX_SUCCESS_RETRY); |
@@ -540,12 +541,23 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
540 | } | 541 | } |
541 | 542 | ||
542 | /* | 543 | /* |
543 | * Send the tx_status to mac80211 & debugfs. | 544 | * Send the tx_status to debugfs. Only send the status report |
544 | * mac80211 will clean up the skb structure. | 545 | * to mac80211 when the frame originated from there. If this was |
546 | * a extra frame coming through a mac80211 library call (RTS/CTS) | ||
547 | * then we should not send the status report back. | ||
548 | * If send to mac80211, mac80211 will clean up the skb structure, | ||
549 | * otherwise we have to do it ourself. | ||
545 | */ | 550 | */ |
546 | get_skb_frame_desc(entry->skb)->frame_type = DUMP_FRAME_TXDONE; | 551 | skbdesc = get_skb_frame_desc(entry->skb); |
552 | skbdesc->frame_type = DUMP_FRAME_TXDONE; | ||
553 | |||
547 | rt2x00debug_dump_frame(rt2x00dev, entry->skb); | 554 | rt2x00debug_dump_frame(rt2x00dev, entry->skb); |
548 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb, &tx_status); | 555 | |
556 | if (!(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED)) | ||
557 | ieee80211_tx_status_irqsafe(rt2x00dev->hw, | ||
558 | entry->skb, &tx_status); | ||
559 | else | ||
560 | dev_kfree_skb(entry->skb); | ||
549 | entry->skb = NULL; | 561 | entry->skb = NULL; |
550 | } | 562 | } |
551 | EXPORT_SYMBOL_GPL(rt2x00lib_txdone); | 563 | EXPORT_SYMBOL_GPL(rt2x00lib_txdone); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 91b62ddbf9f0..a54f6873e9ea 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -34,6 +34,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
34 | struct sk_buff *frag_skb, | 34 | struct sk_buff *frag_skb, |
35 | struct ieee80211_tx_control *control) | 35 | struct ieee80211_tx_control *control) |
36 | { | 36 | { |
37 | struct skb_frame_desc *skbdesc; | ||
37 | struct sk_buff *skb; | 38 | struct sk_buff *skb; |
38 | int size; | 39 | int size; |
39 | 40 | ||
@@ -60,6 +61,13 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
60 | frag_skb->data, frag_skb->len, control, | 61 | frag_skb->data, frag_skb->len, control, |
61 | (struct ieee80211_rts *)(skb->data)); | 62 | (struct ieee80211_rts *)(skb->data)); |
62 | 63 | ||
64 | /* | ||
65 | * Initialize skb descriptor | ||
66 | */ | ||
67 | skbdesc = get_skb_frame_desc(skb); | ||
68 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
69 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
70 | |||
63 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { | 71 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { |
64 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); | 72 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); |
65 | return NETDEV_TX_BUSY; | 73 | return NETDEV_TX_BUSY; |
@@ -74,6 +82,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
74 | struct rt2x00_dev *rt2x00dev = hw->priv; | 82 | struct rt2x00_dev *rt2x00dev = hw->priv; |
75 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; | 83 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; |
76 | struct data_queue *queue; | 84 | struct data_queue *queue; |
85 | struct skb_frame_desc *skbdesc; | ||
77 | u16 frame_control; | 86 | u16 frame_control; |
78 | 87 | ||
79 | /* | 88 | /* |
@@ -121,6 +130,12 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
121 | } | 130 | } |
122 | } | 131 | } |
123 | 132 | ||
133 | /* | ||
134 | * Initialize skb descriptor | ||
135 | */ | ||
136 | skbdesc = get_skb_frame_desc(skb); | ||
137 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
138 | |||
124 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { | 139 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { |
125 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); | 140 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); |
126 | return NETDEV_TX_BUSY; | 141 | return NETDEV_TX_BUSY; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 8f88ca23c23a..7d2f406937cd 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -61,7 +61,6 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
61 | * Fill in skb descriptor | 61 | * Fill in skb descriptor |
62 | */ | 62 | */ |
63 | skbdesc = get_skb_frame_desc(skb); | 63 | skbdesc = get_skb_frame_desc(skb); |
64 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
65 | skbdesc->data = skb->data; | 64 | skbdesc->data = skb->data; |
66 | skbdesc->data_len = skb->len; | 65 | skbdesc->data_len = skb->len; |
67 | skbdesc->desc = priv_tx->desc; | 66 | skbdesc->desc = priv_tx->desc; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 956e0be8aadd..fbabf389b622 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -82,12 +82,22 @@ enum rt2x00_bcn_queue { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc | ||
86 | * | ||
87 | * @FRAME_DESC_DRIVER_GENERATED: Frame was generated inside driver | ||
88 | * and should not be reported back to mac80211 during txdone. | ||
89 | */ | ||
90 | enum skb_frame_desc_flags { | ||
91 | FRAME_DESC_DRIVER_GENERATED = 1 << 0, | ||
92 | }; | ||
93 | |||
94 | /** | ||
85 | * struct skb_frame_desc: Descriptor information for the skb buffer | 95 | * struct skb_frame_desc: Descriptor information for the skb buffer |
86 | * | 96 | * |
87 | * This structure is placed over the skb->cb array, this means that | 97 | * This structure is placed over the skb->cb array, this means that |
88 | * this structure should not exceed the size of that array (48 bytes). | 98 | * this structure should not exceed the size of that array (48 bytes). |
89 | * | 99 | * |
90 | * @flags: Frame flags. | 100 | * @flags: Frame flags, see &enum skb_frame_desc_flags. |
91 | * @frame_type: Frame type, see &enum rt2x00_dump_type. | 101 | * @frame_type: Frame type, see &enum rt2x00_dump_type. |
92 | * @data: Pointer to data part of frame (Start of ieee80211 header). | 102 | * @data: Pointer to data part of frame (Start of ieee80211 header). |
93 | * @desc: Pointer to descriptor part of the frame. | 103 | * @desc: Pointer to descriptor part of the frame. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 6cb4432e1ee0..89471b24a443 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -252,7 +252,6 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, | |||
252 | * Fill in skb descriptor | 252 | * Fill in skb descriptor |
253 | */ | 253 | */ |
254 | skbdesc = get_skb_frame_desc(skb); | 254 | skbdesc = get_skb_frame_desc(skb); |
255 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
256 | skbdesc->data = skb->data + queue->desc_size; | 255 | skbdesc->data = skb->data + queue->desc_size; |
257 | skbdesc->data_len = skb->len - queue->desc_size; | 256 | skbdesc->data_len = skb->len - queue->desc_size; |
258 | skbdesc->desc = skb->data; | 257 | skbdesc->desc = skb->data; |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index d10273b744e4..357f2c4183f6 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2400,6 +2400,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2400 | */ | 2400 | */ |
2401 | skbdesc = get_skb_frame_desc(skb); | 2401 | skbdesc = get_skb_frame_desc(skb); |
2402 | memset(skbdesc, 0, sizeof(*skbdesc)); | 2402 | memset(skbdesc, 0, sizeof(*skbdesc)); |
2403 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
2403 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; | 2404 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; |
2404 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; | 2405 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; |
2405 | skbdesc->desc = skb->data; | 2406 | skbdesc->desc = skb->data; |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index badae9f18153..afd8533267a7 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2002,6 +2002,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2002 | */ | 2002 | */ |
2003 | skbdesc = get_skb_frame_desc(skb); | 2003 | skbdesc = get_skb_frame_desc(skb); |
2004 | memset(skbdesc, 0, sizeof(*skbdesc)); | 2004 | memset(skbdesc, 0, sizeof(*skbdesc)); |
2005 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
2005 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; | 2006 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; |
2006 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; | 2007 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; |
2007 | skbdesc->desc = skb->data; | 2008 | skbdesc->desc = skb->data; |