From patchwork Mon Mar 2 07:59:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SenthilKumar Jegadeesan X-Patchwork-Id: 5910581 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9CF7A9F373 for ; Mon, 2 Mar 2015 08:01:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 261EE201F2 for ; Mon, 2 Mar 2015 08:01:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B27920218 for ; Mon, 2 Mar 2015 08:01:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753771AbbCBIA5 (ORCPT ); Mon, 2 Mar 2015 03:00:57 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:28085 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753766AbbCBIAy (ORCPT ); Mon, 2 Mar 2015 03:00:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1425283254; x=1456819254; h=from:to:cc:subject:date:message-id:mime-version; bh=PkZMa/XPZIUEpTaaj/xVhYVhuj/MMpkZ7HLhEev6BjQ=; b=gsX9Krg9tOSMt4mvOFjxwhM6+g7a4P0zLWemBFRlHgFNTP6yrxSAE8kh KDNFsbF7isWlNoXgct9wDcLYSiNmO9spL6QrXBtWMb8CsTllLp3U1z0gv kFqgUkk4o1ZU100ube6TjkjsoEZ6Wa04pQ9dg18rfyr2g7BKPWfQlZUIp w=; X-IronPort-AV: E=McAfee;i="5600,1067,7727"; a="197821252" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Mar 2015 00:00:54 -0800 X-IronPort-AV: E=Sophos;i="5.09,674,1418112000"; d="scan'208";a="851593317" Received: from nasanexm01f.na.qualcomm.com ([10.85.0.32]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 02 Mar 2015 00:00:26 -0800 Received: from aphydexm01a.ap.qualcomm.com (10.252.127.10) by NASANEXM01F.na.qualcomm.com (10.85.0.32) with Microsoft SMTP Server (TLS) id 15.0.995.29; Mon, 2 Mar 2015 00:00:25 -0800 Received: from localhost (10.80.80.8) by aphydexm01a.ap.qualcomm.com (10.252.127.10) with Microsoft SMTP Server (TLS) id 15.0.995.29; Mon, 2 Mar 2015 13:30:19 +0530 From: SenthilKumar Jegadeesan To: CC: , SenthilKumar Jegadeesan Subject: [PATCH v2] mac80211: send station PMF configuration to driver Date: Mon, 2 Mar 2015 13:29:40 +0530 Message-ID: <1425283180-3848-1-git-send-email-sjegadee@qti.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01a.ap.qualcomm.com (10.252.127.10) 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable 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 Add support to provide station PMF configuration to driver. Some device drivers, offload part of aggregation including ADDBa/DELBa negotiations to low layers. In such scenario, PMF configuration of station needs to be provided to driver to enable encryption of ADDBa/DELBa action frames. Signed-off-by: SenthilKumar Jegadeesan --- include/net/mac80211.h | 3 +++ net/mac80211/cfg.c | 1 + net/mac80211/mlme.c | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d52914b..1502086 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1488,6 +1488,8 @@ struct ieee80211_sta_rates { * @tdls: indicates whether the STA is a TDLS peer * @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only * valid if the STA is a TDLS peer in the first place. + * @mfp: indicates whether the STA supports management frame + * protection. */ struct ieee80211_sta { u32 supp_rates[IEEE80211_NUM_BANDS]; @@ -1504,6 +1506,7 @@ struct ieee80211_sta { struct ieee80211_sta_rates __rcu *rates; bool tdls; bool tdls_initiator; + bool mfp; /* must be last */ u8 drv_priv[0] __aligned(sizeof(void *)); diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index dd4ff36..c124626 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1068,6 +1068,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME); if (mask & BIT(NL80211_STA_FLAG_MFP)) { + sta->sta.mfp = !!(set & BIT(NL80211_STA_FLAG_MFP)); if (set & BIT(NL80211_STA_FLAG_MFP)) set_sta_flag(sta, WLAN_STA_MFP); else diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 10ac632..52c34cd 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2969,8 +2969,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, rate_control_rate_init(sta); - if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED) + if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED) { set_sta_flag(sta, WLAN_STA_MFP); + sta->sta.mfp = true; + } else { + sta->sta.mfp = false; + } sta->sta.wme = elems.wmm_param;