Skip to content
Permalink
Browse files

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>
  • Loading branch information...
Chung-Hsien Hsu authored and RobertCNelson committed Apr 30, 2019
1 parent d05356b commit 32c518cf3884801f6d8a75c7eccba11dc437191a
Showing with 6 additions and 0 deletions.
  1. +3 −0 include/net/cfg80211.h
  2. +2 −0 net/wireless/nl80211.c
  3. +1 −0 net/wireless/sme.c
@@ -5287,6 +5287,8 @@ static inline void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
* 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;
@@ -5304,6 +5306,7 @@ struct cfg80211_connect_resp_params {
size_t pmk_len;
const u8 *pmkid;
enum nl80211_timeout_reason timeout_reason;
bool authorized;
};

/**
@@ -13782,6 +13782,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 &&
@@ -857,6 +857,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);

0 comments on commit 32c518c

Please sign in to comment.
You can’t perform that action at this time.