Skip to content

Commit

Permalink
mac80211: make align adjustment code support paged SKB
Browse files Browse the repository at this point in the history
This fixed a BUG_ON in __skb_trim() when paged rx is used in
iwlwifi driver. Yes, the whole mac80211 stack doesn't support
paged SKB yet. But let's start the work slowly from small
code snippets.

Reported-and-tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Zhu Yi authored and John W. Linville committed Oct 30, 2009
1 parent ddcd4c0 commit 8ce0b58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,10 +1326,10 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
skb = NULL;
} else {
u8 *data = skb->data;
size_t len = skb->len;
u8 *new = __skb_push(skb, align);
memmove(new, data, len);
__skb_trim(skb, len);
size_t len = skb_headlen(skb);
skb->data -= align;
memmove(skb->data, data, len);
skb_set_tail_pointer(skb, len);
}
}
#endif
Expand Down

0 comments on commit 8ce0b58

Please sign in to comment.