[5/7] driver: Add port authorized event

Message ID 1517143537-7441-6-git-send-email-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series
  • Add 4-way handshake offload support
Related show

Commit Message

Otcheretianski, Andrei Jan. 28, 2018, 12:45 p.m.
From: Avraham Stern <avraham.stern@intel.com>

Add an event that indicates that the 4 way handshake was completed by
the driver.

This event is useful for networks that require 802.1X authentication.
The driver can use this event that a new connection is already
authorized (e.g. when the driver used PMKSA caching) and 802.1X
authentication is not required.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
---
 src/drivers/driver.h        | 9 +++++++++
 src/drivers/driver_common.c | 1 +
 2 files changed, 10 insertions(+)

Patch

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index f28bd2b..e26479f 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -4507,6 +4507,15 @@  enum wpa_event_type {
 	 * performed before start operating on this channel.
 	 */
 	EVENT_DFS_PRE_CAC_EXPIRED,
+
+	/**
+	 * EVENT_PORT_AUTHORIZED - Notification that a connection is authorized
+	 *
+	 * This event should be indicated when the driver completes the 4 Way
+	 * handshake. This event should be preceded by an EVENT_ASSOC that
+	 * indicates the completion of 802.11 association.
+	 */
+	EVENT_PORT_AUTHORIZED,
 };
 
 
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
index 0464304..f448ba3 100644
--- a/src/drivers/driver_common.c
+++ b/src/drivers/driver_common.c
@@ -82,6 +82,7 @@  const char * event_to_string(enum wpa_event_type event)
 	E2S(P2P_LO_STOP);
 	E2S(BEACON_LOSS);
 	E2S(DFS_PRE_CAC_EXPIRED);
+	E2S(PORT_AUTHORIZED);
 	}
 
 	return "UNKNOWN";