linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jouni Malinen <jouni@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>, Jouni Malinen <jouni@qca.qualcomm.com>
Subject: [PATCH v2 2/9] mac80211: Allow AUTH_DATA to be used for FILS
Date: Thu, 27 Oct 2016 00:41:59 +0300	[thread overview]
Message-ID: <1477518126-823-3-git-send-email-jouni@qca.qualcomm.com> (raw)
In-Reply-To: <1477518126-823-1-git-send-email-jouni@qca.qualcomm.com>

The special SAE case should be limited only for SAE since the more
generic AUTH_DATA can now be used with other authentication algorithms
as well.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
 net/mac80211/mlme.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 32fd295..b6222f2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4491,9 +4491,11 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
 	auth_data->bss = req->bss;
 
 	if (req->auth_data_len >= 4) {
-		__le16 *pos = (__le16 *) req->auth_data;
-		auth_data->sae_trans = le16_to_cpu(pos[0]);
-		auth_data->sae_status = le16_to_cpu(pos[1]);
+		if (req->auth_type == NL80211_AUTHTYPE_SAE) {
+			__le16 *pos = (__le16 *) req->auth_data;
+			auth_data->sae_trans = le16_to_cpu(pos[0]);
+			auth_data->sae_status = le16_to_cpu(pos[1]);
+		}
 		memcpy(auth_data->data, req->auth_data + 4,
 		       req->auth_data_len - 4);
 		auth_data->data_len += req->auth_data_len - 4;
-- 
1.9.1

  parent reply	other threads:[~2016-10-26 21:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 21:41 [PATCH v2 0/9] cfg80211/mac80211: Fast Initial Link Setup (IEEE 802.11ai) Jouni Malinen
2016-10-26 21:41 ` [PATCH v2 1/9] cfg80211: Rename SAE_DATA to more generic AUTH_DATA Jouni Malinen
2016-10-26 21:41 ` Jouni Malinen [this message]
2016-10-26 21:42 ` [PATCH v2 3/9] cfg80211: Add feature flag for Fast Initial Link Setup (FILS) as STA Jouni Malinen
2016-10-26 21:42 ` [PATCH v2 4/9] cfg80211: Define IEEE P802.11ai (FILS) information elements Jouni Malinen
2016-10-26 21:42 ` [PATCH v2 5/9] cfg80211: Add Fast Initial Link Setup (FILS) auth algs Jouni Malinen
2016-10-26 21:42 ` [PATCH v2 6/9] cfg80211: Add KEK/nonces for FILS association frames Jouni Malinen
2016-10-26 21:42 ` [PATCH v2 7/9] mac80211: Add FILS auth alg mapping Jouni Malinen
2016-10-26 21:42 ` [PATCH v2 8/9] mac80211: FILS AEAD protection for station mode association frames Jouni Malinen
2016-10-26 21:42 ` [PATCH v2 9/9] mac80211: Claim Fast Initial Link Setup (FILS) STA support Jouni Malinen
2016-10-27 10:42 ` [PATCH v2 0/9] cfg80211/mac80211: Fast Initial Link Setup (IEEE 802.11ai) Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477518126-823-3-git-send-email-jouni@qca.qualcomm.com \
    --to=jouni@qca.qualcomm.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).