Search Linux Wireless

[PATCH] mac80211: fix paged defragmentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the bug at
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2194

Paged RX skb patch broke the fragmentation while checking the sequnce
control bit in headers. Instead of doing linearization of all the frames
to check seq_ctrl bit just copy the bits.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@xxxxxxxxx>
---
 net/mac80211/rx.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 72efbd8..4126392 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1234,14 +1234,16 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
 {
 	struct ieee80211_hdr *hdr;
 	u16 sc;
-	__le16 fc;
+	__le16 fc, seq_ctrl;
 	unsigned int frag, seq;
 	struct ieee80211_fragment_entry *entry;
 	struct sk_buff *skb;
 
 	hdr = (struct ieee80211_hdr *)rx->skb->data;
 	fc = hdr->frame_control;
-	sc = le16_to_cpu(hdr->seq_ctrl);
+	skb_copy_bits(rx->skb, offsetof(struct ieee80211_hdr, seq_ctrl),
+			&seq_ctrl, sizeof(seq_ctrl));
+	sc = le16_to_cpu(seq_ctrl);
 	frag = sc & IEEE80211_SCTL_FRAG;
 
 	if (likely((!ieee80211_has_morefrags(fc) && frag == 0) ||
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux