From patchwork Thu Oct 25 18:10:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 1646311 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8598B3FE1C for ; Thu, 25 Oct 2012 18:10:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759631Ab2JYSK2 (ORCPT ); Thu, 25 Oct 2012 14:10:28 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:44737 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758569Ab2JYSK1 (ORCPT ); Thu, 25 Oct 2012 14:10:27 -0400 Received: by mail-pa0-f46.google.com with SMTP id hz1so1347962pad.19 for ; Thu, 25 Oct 2012 11:10:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=rvb/h4tio9feMFf/9iYOC2AwUyPs3uNCZdf0fNi8xDs=; b=YYHXLLcgG4j3Qzyi/swmvVnRrwCBNrdG68w9bTLbL6BHR/YiAKP6KH+M5SrkfkGPCh DSWVN3YnnkkeJSZ0z2fmTKJLYMypizEl/sy2IpnUxRx1e0lmtqxRy0S9rOVBsLMhbuhc /CpOMZZk9rTM66DBmhQSANF2FxyRacOYvSBsxcoApRblEVgfhIgPFdpIt7QSkmRG9e0+ nqQRECJgQuVPnuJY066syNy54rW6s4ByHotheC0EY7GMfHiKoOXM1+SwcQCfhIV79siL 0c0V25G3U5OZGZpvTpsC0HxouUP3URBJiUPjvb3otj+HCeg91TpdfDGdavniYvmIHd1T Ztpg== Received: by 10.68.189.102 with SMTP id gh6mr62048048pbc.37.1351188627289; Thu, 25 Oct 2012 11:10:27 -0700 (PDT) Received: from localhost.localdomain (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id o1sm11636568pax.21.2012.10.25.11.10.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Oct 2012 11:10:26 -0700 (PDT) From: Javier Cardona To: linville@tuxdriver.com Cc: Javier Cardona , Javier Lopez , linux-wireless@vger.kernel.org, devel@lists.open80211s.org, johannes@sipsolutions.net Subject: [PATCH] mac80211: Don't inspect Sequence Control field on control frames Date: Thu, 25 Oct 2012 11:10:18 -0700 Message-Id: <1351188618-11155-1-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQlmIaFKt1dr+T73z5Ie4ySQytSNXcjmxXTEpKMcQpExvfaFDlJgff7tn8+DRT+U4y/5TzkW Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Per IEEE Std. 802.11-2012, Sec 8.2.4.4.1, the sequence Control field is not present in control frames. We noticed this problem when processing Block Ack Requests. Signed-off-by: Javier Cardona Signed-off-by: Javier Lopez --- net/mac80211/rx.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index f975f64..bf54336 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1467,6 +1467,10 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx) hdr = (struct ieee80211_hdr *)rx->skb->data; fc = hdr->frame_control; + + if (ieee80211_is_ctl(fc)) + return RX_CONTINUE; + sc = le16_to_cpu(hdr->seq_ctrl); frag = sc & IEEE80211_SCTL_FRAG;