linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: make align adjustment code support paged SKB
@ 2009-10-28 20:13 Reinette Chatre
  2009-10-28 20:15 ` Johannes Berg
  2009-10-29 16:18 ` Luis R. Rodriguez
  0 siblings, 2 replies; 7+ messages in thread
From: Reinette Chatre @ 2009-10-28 20:13 UTC (permalink / raw)
  To: johannes, linville; +Cc: linux-wireless, Zhu Yi, Reinette Chatre

From: Zhu Yi <yi.zhu@intel.com>

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>
---
 net/mac80211/rx.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5c385e3..a50d5f3 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1337,10 +1337,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
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-30  2:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 20:13 [PATCH] mac80211: make align adjustment code support paged SKB Reinette Chatre
2009-10-28 20:15 ` Johannes Berg
2009-10-29 16:18 ` Luis R. Rodriguez
2009-10-29 18:32   ` Johannes Berg
2009-10-29 18:52   ` Luis R. Rodriguez
2009-10-29 18:58     ` Johannes Berg
2009-10-30  2:45       ` Zhu Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).