From patchwork Thu Aug 8 13:21:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Almbladh X-Patchwork-Id: 2841087 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 713829F271 for ; Thu, 8 Aug 2013 13:23:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50012201F9 for ; Thu, 8 Aug 2013 13:23:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A093201F3 for ; Thu, 8 Aug 2013 13:23:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934237Ab3HHNXU (ORCPT ); Thu, 8 Aug 2013 09:23:20 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:39774 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757795Ab3HHNXU (ORCPT ); Thu, 8 Aug 2013 09:23:20 -0400 Received: by mail-lb0-f178.google.com with SMTP id z5so2406541lbh.37 for ; Thu, 08 Aug 2013 06:23:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=3dKy3vC3cMk0vX1WgPFZEu2YxGoViFgIjNfHpj7EUaA=; b=SZZbVhLbu6Ylbibv/L2wY02tHpXdIeWdr2hxZuG3l7Q8TeDrFqLibrbvIhhPCgP7ig kQpsPQ/OVsbjtIUyrZeGRILgFI30sq9hsOl9nub0nNWebAa/P5v6Z/L66mKL7AT+XuAV +jdljtpTPH8qRVE49fkKpUCcSMHsupPxRQ+QlmrKjErlE1aQlP/JVISaY6zXmwxn7P8C Vp/W7wDAQLvrUTTi5vsmMM3DxRsy+zRXaOBxMtpZou0QKfkBZAZkzF9bAQW+cpnal1N3 FIrg9KyuJHQVsZk76TPrMdeIJkN7mtTOK8eYVdSRp4Wp5Q47sONbJ4ZYdTbPCHZTaseb YboQ== X-Gm-Message-State: ALoCoQnh4cmionoUTljF+k8slIkaS90JrXwrKGZI/9QnRtmCDgpzI1C6T9xUNiyO51xdEfh9Ulcl X-Received: by 10.152.181.65 with SMTP id du1mr3659683lac.76.1375968197015; Thu, 08 Aug 2013 06:23:17 -0700 (PDT) Received: from localhost.localdomain ([82.99.7.230]) by mx.google.com with ESMTPSA id p17sm5072238lbv.11.2013.08.08.06.23.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:23:16 -0700 (PDT) From: Johan Almbladh To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Johan Almbladh Subject: [RFC] mac80211: add support for split-MAC implementations Date: Thu, 8 Aug 2013 15:21:56 +0200 Message-Id: <1375968116-24331-1-git-send-email-ja@anyfi.net> X-Mailer: git-send-email 1.7.9.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch enables power save processing for encrypted frames even if the encryption key is not set. This is a requirement when implementing split-MAC systems like Anyfi.net [1] and CAPWAP [2] on mac80211 using monitor frame injection and reception. The mac80211 RX handlers are reordered slightly so that the power save handler is invoked before the decryption handler. The patch is minimal in the sense that it provides the required functionality with a minimal change, but I am open to suggestions if this change is too intrusive. Please let me know what you think. [1] http://anyfi.net/documentation#architecture [2] http://tools.ietf.org/html/rfc5416 Signed-off-by: Johan Almbladh --- net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 6b85f95..0f0017d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2939,10 +2939,10 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx, */ rx->skb = skb; - CALL_RXH(ieee80211_rx_h_decrypt) CALL_RXH(ieee80211_rx_h_check_more_data) CALL_RXH(ieee80211_rx_h_uapsd_and_pspoll) CALL_RXH(ieee80211_rx_h_sta_process) + CALL_RXH(ieee80211_rx_h_decrypt) CALL_RXH(ieee80211_rx_h_defragment) CALL_RXH(ieee80211_rx_h_michael_mic_verify) /* must be after MMIC verify so header is counted in MPDU mic */