Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266622
b: refs/heads/master
c: 00b1edf
h: refs/heads/master
v: v3
  • Loading branch information
Jouni Malinen authored and Kalle Valo committed Sep 27, 2011
1 parent 9a55b81 commit 2fa9a71
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aad9339fa2a5e5b51874cfec9883819f59090198
refs/heads/master: 00b1edf16960695d820607845797b14e6ed1a26c
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,24 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)

spin_unlock_bh(&ar->lock);

if (!IS_ALIGNED((unsigned long) skb->data - HTC_HDR_LENGTH, 4) &&
skb_cloned(skb)) {
/*
* We will touch (move the buffer data to align it. Since the
* skb buffer is cloned and not only the header is changed, we
* have to copy it to allow the changes. Since we are copying
* the data here, we may as well align it by reserving suitable
* headroom to avoid the memmove in ath6kl_htc_tx_buf_align().
*/
struct sk_buff *nskb;

nskb = skb_copy_expand(skb, HTC_HDR_LENGTH, 0, GFP_ATOMIC);
if (nskb == NULL)
goto fail_tx;
kfree_skb(skb);
skb = nskb;
}

cookie->skb = skb;
cookie->map_no = map_no;
set_htc_pkt_info(&cookie->htc_pkt, cookie, skb->data, skb->len,
Expand Down

0 comments on commit 2fa9a71

Please sign in to comment.