mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
66 lines
2.4 KiB
Diff
66 lines
2.4 KiB
Diff
From 4d5061baaed43b218abff4cb6601c67c9f334ac7 Mon Sep 17 00:00:00 2001
|
|
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
|
Date: Tue, 30 Apr 2019 17:52:41 -0500
|
|
Subject: [PATCH 027/179] nl80211: add authorized flag to CONNECT event
|
|
|
|
Add authorized flag to CONNECT event. It is used for 802.1X 4-way
|
|
handshake offload with PMK caching.
|
|
|
|
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
|
|
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
|
|
---
|
|
include/net/cfg80211.h | 3 +++
|
|
net/wireless/nl80211.c | 2 ++
|
|
net/wireless/sme.c | 1 +
|
|
3 files changed, 6 insertions(+)
|
|
|
|
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
|
|
index 125918d90397..afc4a4a17a10 100644
|
|
--- a/include/net/cfg80211.h
|
|
+++ b/include/net/cfg80211.h
|
|
@@ -7030,6 +7030,8 @@ struct cfg80211_fils_resp_params {
|
|
* not known. This value is used only if @status < 0 to indicate that the
|
|
* failure is due to a timeout and not due to explicit rejection by the AP.
|
|
* This value is ignored in other cases (@status >= 0).
|
|
+ * @authorized: Indicates whether the connection is ready to transport
|
|
+ * data packets.
|
|
*/
|
|
struct cfg80211_connect_resp_params {
|
|
int status;
|
|
@@ -7041,6 +7043,7 @@ struct cfg80211_connect_resp_params {
|
|
size_t resp_ie_len;
|
|
struct cfg80211_fils_resp_params fils;
|
|
enum nl80211_timeout_reason timeout_reason;
|
|
+ bool authorized;
|
|
};
|
|
|
|
/**
|
|
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
|
index 074518840d31..4e200f640a3b 100644
|
|
--- a/net/wireless/nl80211.c
|
|
+++ b/net/wireless/nl80211.c
|
|
@@ -16470,6 +16470,8 @@ void nl80211_send_connect_result(struct cfg80211_registered_device *rdev,
|
|
(nla_put_flag(msg, NL80211_ATTR_TIMED_OUT) ||
|
|
nla_put_u32(msg, NL80211_ATTR_TIMEOUT_REASON,
|
|
cr->timeout_reason))) ||
|
|
+ (cr->authorized &&
|
|
+ nla_put_flag(msg, NL80211_ATTR_PORT_AUTHORIZED)) ||
|
|
(cr->req_ie &&
|
|
nla_put(msg, NL80211_ATTR_REQ_IE, cr->req_ie_len, cr->req_ie)) ||
|
|
(cr->resp_ie &&
|
|
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
|
|
index 9f821cb2c05f..8e60f879da95 100644
|
|
--- a/net/wireless/sme.c
|
|
+++ b/net/wireless/sme.c
|
|
@@ -887,6 +887,7 @@ void cfg80211_connect_done(struct net_device *dev,
|
|
ev->cr.bss = params->bss;
|
|
ev->cr.status = params->status;
|
|
ev->cr.timeout_reason = params->timeout_reason;
|
|
+ ev->cr.authorized = params->authorized;
|
|
|
|
spin_lock_irqsave(&wdev->event_lock, flags);
|
|
list_add_tail(&ev->list, &wdev->event_list);
|
|
--
|
|
2.17.1
|
|
|