diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 5 |
4 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 6fcb2bb840b..458378c4e50 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -835,7 +835,6 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry, | |||
835 | struct rxdone_entry_desc *rxdesc) | 835 | struct rxdone_entry_desc *rxdesc) |
836 | { | 836 | { |
837 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 837 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
838 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
839 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | 838 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
840 | __le32 *rxd = entry_priv->desc; | 839 | __le32 *rxd = entry_priv->desc; |
841 | __le32 *rxwi = (__le32 *)entry->skb->data; | 840 | __le32 *rxwi = (__le32 *)entry->skb->data; |
@@ -883,10 +882,8 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry, | |||
883 | if (rt2x00_get_field32(rxd3, RXD_W3_MY_BSS)) | 882 | if (rt2x00_get_field32(rxd3, RXD_W3_MY_BSS)) |
884 | rxdesc->dev_flags |= RXDONE_MY_BSS; | 883 | rxdesc->dev_flags |= RXDONE_MY_BSS; |
885 | 884 | ||
886 | if (rt2x00_get_field32(rxd3, RXD_W3_L2PAD)) { | 885 | if (rt2x00_get_field32(rxd3, RXD_W3_L2PAD)) |
887 | rxdesc->dev_flags |= RXDONE_L2PAD; | 886 | rxdesc->dev_flags |= RXDONE_L2PAD; |
888 | skbdesc->flags |= SKBDESC_L2_PADDED; | ||
889 | } | ||
890 | 887 | ||
891 | if (rt2x00_get_field32(rxwi1, RXWI_W1_SHORT_GI)) | 888 | if (rt2x00_get_field32(rxwi1, RXWI_W1_SHORT_GI)) |
892 | rxdesc->flags |= RX_FLAG_SHORT_GI; | 889 | rxdesc->flags |= RX_FLAG_SHORT_GI; |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 1db8667a6ff..13baec485eb 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -625,10 +625,8 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, | |||
625 | if (rt2x00_get_field32(rxd0, RXINFO_W0_MY_BSS)) | 625 | if (rt2x00_get_field32(rxd0, RXINFO_W0_MY_BSS)) |
626 | rxdesc->dev_flags |= RXDONE_MY_BSS; | 626 | rxdesc->dev_flags |= RXDONE_MY_BSS; |
627 | 627 | ||
628 | if (rt2x00_get_field32(rxd0, RXINFO_W0_L2PAD)) { | 628 | if (rt2x00_get_field32(rxd0, RXINFO_W0_L2PAD)) |
629 | rxdesc->dev_flags |= RXDONE_L2PAD; | 629 | rxdesc->dev_flags |= RXDONE_L2PAD; |
630 | skbdesc->flags |= SKBDESC_L2_PADDED; | ||
631 | } | ||
632 | 630 | ||
633 | if (rt2x00_get_field32(rxwi1, RXWI_W1_SHORT_GI)) | 631 | if (rt2x00_get_field32(rxwi1, RXWI_W1_SHORT_GI)) |
634 | rxdesc->flags |= RX_FLAG_SHORT_GI; | 632 | rxdesc->flags |= RX_FLAG_SHORT_GI; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 21d58769a1a..719f4aebcaf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -177,7 +177,6 @@ void rt2x00queue_align_payload(struct sk_buff *skb, unsigned int header_length) | |||
177 | 177 | ||
178 | void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) | 178 | void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) |
179 | { | 179 | { |
180 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | ||
181 | unsigned int frame_length = skb->len; | 180 | unsigned int frame_length = skb->len; |
182 | unsigned int header_align = ALIGN_SIZE(skb, 0); | 181 | unsigned int header_align = ALIGN_SIZE(skb, 0); |
183 | unsigned int payload_align = ALIGN_SIZE(skb, header_length); | 182 | unsigned int payload_align = ALIGN_SIZE(skb, header_length); |
@@ -198,7 +197,6 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) | |||
198 | */ | 197 | */ |
199 | skb_push(skb, header_align); | 198 | skb_push(skb, header_align); |
200 | memmove(skb->data, skb->data + header_align, header_length); | 199 | memmove(skb->data, skb->data + header_align, header_length); |
201 | skbdesc->flags |= SKBDESC_L2_PADDED; | ||
202 | } else { | 200 | } else { |
203 | /* | 201 | /* |
204 | * | 202 | * |
@@ -217,16 +215,14 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) | |||
217 | skb->data + header_length + l2pad + payload_align, | 215 | skb->data + header_length + l2pad + payload_align, |
218 | frame_length - header_length); | 216 | frame_length - header_length); |
219 | skb_trim(skb, frame_length + l2pad); | 217 | skb_trim(skb, frame_length + l2pad); |
220 | skbdesc->flags |= SKBDESC_L2_PADDED; | ||
221 | } | 218 | } |
222 | } | 219 | } |
223 | 220 | ||
224 | void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length) | 221 | void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length) |
225 | { | 222 | { |
226 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | ||
227 | unsigned int l2pad = L2PAD_SIZE(header_length); | 223 | unsigned int l2pad = L2PAD_SIZE(header_length); |
228 | 224 | ||
229 | if (!l2pad || (skbdesc->flags & SKBDESC_L2_PADDED)) | 225 | if (!l2pad) |
230 | return; | 226 | return; |
231 | 227 | ||
232 | memmove(skb->data + l2pad, skb->data, header_length); | 228 | memmove(skb->data + l2pad, skb->data, header_length); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 70775e5ba1a..c1e482bb37b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -92,8 +92,6 @@ enum data_queue_qid { | |||
92 | * @SKBDESC_DMA_MAPPED_TX: &skb_dma field has been mapped for TX | 92 | * @SKBDESC_DMA_MAPPED_TX: &skb_dma field has been mapped for TX |
93 | * @SKBDESC_IV_STRIPPED: Frame contained a IV/EIV provided by | 93 | * @SKBDESC_IV_STRIPPED: Frame contained a IV/EIV provided by |
94 | * mac80211 but was stripped for processing by the driver. | 94 | * mac80211 but was stripped for processing by the driver. |
95 | * @SKBDESC_L2_PADDED: Payload has been padded for 4-byte alignment, | ||
96 | * the padded bytes are located between header and payload. | ||
97 | * @SKBDESC_NOT_MAC80211: Frame didn't originate from mac80211, | 95 | * @SKBDESC_NOT_MAC80211: Frame didn't originate from mac80211, |
98 | * don't try to pass it back. | 96 | * don't try to pass it back. |
99 | */ | 97 | */ |
@@ -101,8 +99,7 @@ enum skb_frame_desc_flags { | |||
101 | SKBDESC_DMA_MAPPED_RX = 1 << 0, | 99 | SKBDESC_DMA_MAPPED_RX = 1 << 0, |
102 | SKBDESC_DMA_MAPPED_TX = 1 << 1, | 100 | SKBDESC_DMA_MAPPED_TX = 1 << 1, |
103 | SKBDESC_IV_STRIPPED = 1 << 2, | 101 | SKBDESC_IV_STRIPPED = 1 << 2, |
104 | SKBDESC_L2_PADDED = 1 << 3, | 102 | SKBDESC_NOT_MAC80211 = 1 << 3, |
105 | SKBDESC_NOT_MAC80211 = 1 << 4, | ||
106 | }; | 103 | }; |
107 | 104 | ||
108 | /** | 105 | /** |