P2P: Store P2P Device Address in per-device PSK records
[mech_eap.git] / src / wps / wps.h
index 8d9535b..15137a8 100644 (file)
@@ -246,14 +246,15 @@ struct wps_registrar_config {
         * new_psk_cb - Callback for new PSK
         * @ctx: Higher layer context data (cb_ctx)
         * @mac_addr: MAC address of the Enrollee
+        * @p2p_dev_addr: P2P Device Address of the Enrollee or all zeros if not
         * @psk: The new PSK
         * @psk_len: The length of psk in octets
         * Returns: 0 on success, -1 on failure
         *
         * This callback is called when a new per-device PSK is provisioned.
         */
-       int (*new_psk_cb)(void *ctx, const u8 *mac_addr, const u8 *psk,
-                         size_t psk_len);
+       int (*new_psk_cb)(void *ctx, const u8 *mac_addr, const u8 *p2p_dev_addr,
+                         const u8 *psk, size_t psk_len);
 
        /**
         * set_ie_cb - Callback for WPS IE changes
@@ -382,6 +383,14 @@ struct wps_registrar_config {
         * dualband - Whether this is a concurrent dualband AP
         */
        int dualband;
+
+       /**
+        * force_per_enrollee_psk - Force per-Enrollee random PSK
+        *
+        * This forces per-Enrollee random PSK to be generated even if a default
+        * PSK is set for a network.
+        */
+       int force_per_enrollee_psk;
 };
 
 
@@ -497,11 +506,17 @@ union wps_event_data {
                int msg;
                u16 config_error;
                u16 error_indication;
+               u8 peer_macaddr[ETH_ALEN];
        } fail;
 
+       struct wps_event_success {
+               u8 peer_macaddr[ETH_ALEN];
+       } success;
+
        struct wps_event_pwd_auth_fail {
                int enrollee;
                int part;
+               u8 peer_macaddr[ETH_ALEN];
        } pwd_auth_fail;
 
        struct wps_event_er_ap {
@@ -740,6 +755,13 @@ struct wps_context {
                         union wps_event_data *data);
 
        /**
+        * rf_band_cb - Fetch currently used RF band
+        * @ctx: Higher layer context data (cb_ctx)
+        * Return: Current used RF band or 0 if not known
+        */
+       int (*rf_band_cb)(void *ctx);
+
+       /**
         * cb_ctx: Higher layer context data for callbacks
         */
        void *cb_ctx;