Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225271
b: refs/heads/master
c: a061a93
h: refs/heads/master
i:
  225269: 61ebe87
  225267: fa4e033
  225263: 57312a9
v: v3
  • Loading branch information
Gertjan van Wingerde authored and John W. Linville committed Dec 13, 2010
1 parent 20c08dd commit ffa2833
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7bb5f845f437662296adbfeaab8fbfce1c32289
refs/heads/master: a061a93b6eb8db8227b251666436da1e344771a0
13 changes: 8 additions & 5 deletions trunk/drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,18 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)

void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length)
{
unsigned int l2pad = L2PAD_SIZE(header_length);
/*
* L2 padding is only present if the skb contains more than just the
* IEEE 802.11 header.
*/
unsigned int l2pad = (skb->len > header_length) ?
L2PAD_SIZE(header_length) : 0;

if (!l2pad)
return;

memmove(skb->data + header_length, skb->data + header_length + l2pad,
skb->len - header_length - l2pad);

skb_trim(skb, skb->len - l2pad);
memmove(skb->data + l2pad, skb->data, header_length);
skb_pull(skb, l2pad);
}

static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry,
Expand Down

0 comments on commit ffa2833

Please sign in to comment.