aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2009-12-04 17:47:02 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:56:32 -0500
commit354e39dbb19f29ef28a9c2db9e55ff2a7435b35a (patch)
tree8599926c1611c5f9060ed29a9f4c363ae8a1aec2 /drivers/net/wireless/rt2x00/rt2x00queue.c
parent77e73d1849c860d22ebba8826ad162ccfda4c535 (diff)
rt2x00: Remove SKBDESC_L2_PADDED flag.
With the improved L2 padding code, this flag is no longer necessary, as the rt2x00queue_remove_l2pad is capable of detecting by itself if L2 padding is applied. For received frames the RX descriptor flag is still being checked. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <ivdoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 21d58769a1a7..719f4aebcaf6 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
178void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) 178void 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
224void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length) 221void 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);