From patchwork Wed Apr 28 20:59:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhijeet Kolekar X-Patchwork-Id: 95777 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3SKnCK2003695 for ; Wed, 28 Apr 2010 20:49:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753913Ab0D1UtK (ORCPT ); Wed, 28 Apr 2010 16:49:10 -0400 Received: from mga03.intel.com ([143.182.124.21]:63978 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636Ab0D1UtJ (ORCPT ); Wed, 28 Apr 2010 16:49:09 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 28 Apr 2010 13:49:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.52,290,1270450800"; d="scan'208";a="271227104" Received: from wifisr4.jf.intel.com (HELO localhost.localdomain) ([10.23.232.152]) by azsmga001.ch.intel.com with ESMTP; 28 Apr 2010 13:48:51 -0700 From: Abhijeet Kolekar To: linux-wireless@vger.kernel.org Cc: Abhijeet Kolekar Subject: [PATCH] mac80211: fix paged defragmentation Date: Wed, 28 Apr 2010 13:59:22 -0700 Message-Id: <1272488362-14603-1-git-send-email-abhijeet.kolekar@intel.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Apr 2010 20:49:13 +0000 (UTC) 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) ||