From patchwork Sat Feb 28 10:08:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SenthilKumar Jegadeesan X-Patchwork-Id: 5905321 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 0B65D9F37F for ; Sat, 28 Feb 2015 10:08:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41F532028D for ; Sat, 28 Feb 2015 10:08:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B2C420172 for ; Sat, 28 Feb 2015 10:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750891AbbB1KIk (ORCPT ); Sat, 28 Feb 2015 05:08:40 -0500 Received: from sabertooth02.qualcomm.com ([65.197.215.38]:57376 "EHLO sabertooth02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbbB1KIj (ORCPT ); Sat, 28 Feb 2015 05:08:39 -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=1425118119; x=1456654119; h=from:to:cc:subject:date:message-id:mime-version; bh=HtToWEoiQ5R5RsthVD7qpFLwxhf0B8+27VSWMgAKGII=; b=q7Er7Q19cPf5ZicAICXM0czT8W8cwwBmrUH4TKr+s9rfXWV0xecjZ/se 2QrM8xWW27pARXtTbrhheaoGKvLBtTlSZrSHl0Rg1vE024n9UwbS/Dkqg iPnwo1XTdIyCoPeB2h6bCGic988D9PFNp1zjQnhYi5z4Pu9eNBgFwMvhA c=; X-IronPort-AV: E=McAfee;i="5600,1067,7725"; a="84834485" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by sabertooth02.qualcomm.com with ESMTP; 28 Feb 2015 02:08:37 -0800 X-IronPort-AV: E=Sophos;i="5.09,667,1418112000"; d="scan'208";a="31873679" Received: from nasanexm01d.na.qualcomm.com ([10.85.0.84]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 28 Feb 2015 02:08:37 -0800 Received: from aphydexm01a.ap.qualcomm.com (10.252.127.10) by NASANEXM01D.na.qualcomm.com (10.85.0.84) with Microsoft SMTP Server (TLS) id 15.0.995.29; Sat, 28 Feb 2015 02:08:36 -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; Sat, 28 Feb 2015 15:38:29 +0530 From: SenthilKumar Jegadeesan To: CC: , SenthilKumar Jegadeesan Subject: [PATCH] mac80211: send station PMF configuration to driver Date: Sat, 28 Feb 2015 15:38:16 +0530 Message-ID: <1425118096-22089-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 In HT mode, firmware is not encrypting ADDBA request as PMF configuration is not set in peer flags during association. Enable mac80211 to provide station PMF configuration to driver. Signed-off-by: SenthilKumar Jegadeesan --- 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;