Add new wpa_supplicant driver op for setting 802.1X port status
[wpasupplicant] / src / eapol_supp / eapol_supp_sm.h
index f297d23..e6e8cc6 100644 (file)
@@ -63,7 +63,6 @@ struct eapol_config {
 
 struct eapol_sm;
 struct wpa_config_blob;
-struct wps_credential;
 
 /**
  * struct eapol_ctx - Global (for all networks) EAPOL state machine context
@@ -200,23 +199,13 @@ struct eapol_ctx {
         */
        const char *pkcs11_module_path;
 #endif /* EAP_TLS_OPENSSL */
-       /**
-        * mac_addr - MAC address of the peer
-        *
-        * This is only used by EAP-WSC and can be left %NULL if not available.
-        */
-       const u8 *mac_addr;
 
        /**
-        * wps_cred - Notify that new credential was received from WPS
-        * @ctx: Callback context (ctx)
-        * Returns: 0 on success (credential stored), -1 on failure
+        * wps - WPS context data
         *
-        * This callback is only needed when using WPS Enrollee to configure
-        * new credentials. This can be left %NULL if no WPS functionality is
-        * enabled.
+        * This is only used by EAP-WSC and can be left %NULL if not available.
         */
-       int (*wps_cred)(void *ctx, struct wps_credential *cred);
+       struct wps_context *wps;
 
        /**
         * eap_param_needed - Notify that EAP parameter is needed
@@ -226,6 +215,13 @@ struct eapol_ctx {
         */
        void (*eap_param_needed)(void *ctx, const char *field,
                                 const char *txt);
+
+       /**
+        * port_cb - Set port authorized/unauthorized callback (optional)
+        * @ctx: Callback context (ctx)
+        * @authorized: Whether the supplicant port is now in authorized state
+        */
+       void (*port_cb)(void *ctx, int authorized);
 };