Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122685
b: refs/heads/master
c: 9c5f89b
h: refs/heads/master
i:
  122683: 7cf4664
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Dec 12, 2008
1 parent e5d529b commit 1c4f34b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: f2f1ba253d970479343f97c4620e16842c695d03
refs/heads/master: 9c5f89b3f6580cca21dca4ede940900c5b3c3a81
12 changes: 10 additions & 2 deletions trunk/drivers/net/wireless/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,16 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
hdr = (struct ieee80211_hdr *)skb->data;
hdrlen = ieee80211_get_hdrlen_from_skb(skb);

if (hdrlen & 3) {
padsize = hdrlen % 4;
/* The MAC header is padded to have 32-bit boundary if the
* packet payload is non-zero. The general calculation for
* padsize would take into account odd header lengths:
* padsize = (4 - hdrlen % 4) % 4; However, since only
* even-length headers are used, padding can only be 0 or 2
* bytes and we can optimize this a bit. In addition, we must
* not try to remove padding from short control frames that do
* not have payload. */
padsize = hdrlen & 3;
if (padsize && hdrlen >= 24) {
memmove(skb->data + padsize, skb->data, hdrlen);
skb_pull(skb, padsize);
}
Expand Down

0 comments on commit 1c4f34b

Please sign in to comment.