</li>
<li>
- <h3>BootstrappingCompleted ( o : path, i : status )</h3>
+ <h3>BootstrappingResponse ( o : path, i : status, q : bootstrap_method )</h3>
</li>
\section dbus_bss fi.w1.wpa_supplicant1.BSS
u16 bootstrap_method);
/**
- * bootstrap_completed - Indicate bootstrapping completed with P2P peer
+ * bootstrap_rsp_rx - Indicate bootstrapping response from a P2P peer
* @ctx: Callback context from cb_ctx
* @addr: P2P device address with which bootstrapping is completed
* @status: P2P Status Code of bootstrapping handshake
* @freq: Frequency in which bootstrapping is done
+ * @bootstrap_method: Bootstrapping method by the peer device
*
* This function can be used to notify the status of bootstrapping
* handshake.
*/
- void (*bootstrap_completed)(void *ctx, const u8 *addr,
- enum p2p_status_code status, int freq);
+ void (*bootstrap_rsp_rx)(void *ctx, const u8 *addr,
+ enum p2p_status_code status, int freq,
+ u16 bootstrap_method);
/**
* validate_dira - Indicate reception of DIRA to be validated against a
size_t cookie_len = 0;
const u8 *pos, *cookie;
u16 comeback_after;
+ u16 bootstrap = 0;
/* Parse the P2P status present */
if (msg->status)
p2p->cfg->register_bootstrap_comeback(p2p->cfg->cb_ctx, sa,
comeback_after);
p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
+
+ if (p2p->cfg->bootstrap_rsp_rx)
+ p2p->cfg->bootstrap_rsp_rx(p2p->cfg->cb_ctx, sa, status,
+ rx_freq, bootstrap);
return;
}
+ /* PBMA response */
+ if (msg->pbma_info_len >= 2)
+ bootstrap = WPA_GET_LE16(msg->pbma_info);
+
p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
if (dev->flags & P2P_DEV_PD_BEFORE_GO_NEG)
dev->flags &= ~P2P_DEV_PD_BEFORE_GO_NEG;
- if (p2p->cfg->bootstrap_completed)
- p2p->cfg->bootstrap_completed(p2p->cfg->cb_ctx, sa, status,
- rx_freq);
+ if (p2p->cfg->bootstrap_rsp_rx)
+ p2p->cfg->bootstrap_rsp_rx(p2p->cfg->cb_ctx, sa, status,
+ rx_freq, bootstrap);
}
/**
- * wpas_dbus_signal_p2p_bootstrap_completed - Signals BootstrappingCompleted event
- * event
+ * wpas_dbus_signal_p2p_bootstrap_rsp - Signals BootstrappingResponse event
* @wpa_s: %wpa_supplicant network interface data
* @src: Source address of the peer with which bootstrapping is done
* @status: Status of Bootstrapping handshake
+ * @bootstrap_method: Peer's bootstrap method if status is success
*
* Sends a signal to notify that a peer P2P Device is requesting bootstrapping
* negotiation with us.
*/
-void wpas_dbus_signal_p2p_bootstrap_completed(struct wpa_supplicant *wpa_s,
- const u8 *src, int status)
+void wpas_dbus_signal_p2p_bootstrap_rsp(struct wpa_supplicant *wpa_s,
+ const u8 *src, int status,
+ u16 bootstrap_method)
{
DBusMessage *msg;
DBusMessageIter iter;
if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_OBJECT_PATH,
&path) ||
!dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32,
- &status))
+ &status) ||
+ !dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT16,
+ &bootstrap_method))
wpa_printf(MSG_ERROR, "dbus: Failed to construct signal");
else
dbus_connection_send(iface->con, msg, NULL);
int op_freq);
void wpas_dbus_signal_p2p_bootstrap_req(struct wpa_supplicant *wpa_s,
const u8 *src, u16 bootstrap_method);
-void wpas_dbus_signal_p2p_bootstrap_completed(struct wpa_supplicant *wpa_s,
- const u8 *src, int status);
+void wpas_dbus_signal_p2p_bootstrap_rsp(struct wpa_supplicant *wpa_s,
+ const u8 *src, int status,
+ u16 bootstrap_method);
void wpas_dbus_signal_mesh_group_started(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid);
void wpas_dbus_signal_mesh_group_removed(struct wpa_supplicant *wpa_s,
}
static inline
-void wpas_dbus_signal_p2p_bootstrap_completed(struct wpa_supplicant *wpa_s,
- const u8 *src, int status)
+void wpas_dbus_signal_p2p_bootstrap_rsp(struct wpa_supplicant *wpa_s,
+ const u8 *src, int status,
+ u16 bootstrap_method)
{
}
wpas_dbus_signal_p2p_bootstrap_req(wpa_s, src, bootstrap_method);
}
-void wpas_notify_p2p_bootstrap_completed(struct wpa_supplicant *wpa_s,
- const u8 *src, int status)
+void wpas_notify_p2p_bootstrap_rsp(struct wpa_supplicant *wpa_s,
+ const u8 *src, int status,
+ u16 bootstrap_method)
{
- wpas_dbus_signal_p2p_bootstrap_completed(wpa_s, src, status);
+ wpas_dbus_signal_p2p_bootstrap_rsp(wpa_s, src, status,
+ bootstrap_method);
}
#endif /* CONFIG_P2P */
const u8 *bssid, int id, int op_freq);
void wpas_notify_p2p_bootstrap_req(struct wpa_supplicant *wpa_s,
const u8 *src, u16 bootstrap_method);
-void wpas_notify_p2p_bootstrap_completed(struct wpa_supplicant *wpa_s,
- const u8 *src, int status);
+void wpas_notify_p2p_bootstrap_rsp(struct wpa_supplicant *wpa_s,
+ const u8 *src, int status,
+ u16 bootstrap_method);
void wpas_notify_mesh_group_started(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid);
void wpas_notify_mesh_group_removed(struct wpa_supplicant *wpa_s,
}
-static void wpas_bootstrap_completed(void *ctx, const u8 *addr,
- enum p2p_status_code status, int freq)
+static void wpas_bootstrap_rsp_rx(void *ctx, const u8 *addr,
+ enum p2p_status_code status, int freq,
+ u16 bootstrap_method)
{
struct wpa_supplicant *wpa_s = ctx;
- wpas_notify_p2p_bootstrap_completed(wpa_s, addr, status);
+ wpas_notify_p2p_bootstrap_rsp(wpa_s, addr, status, bootstrap_method);
if (status) {
wpa_msg_global(wpa_s, MSG_INFO,
p2p.p2p_6ghz_disable = wpa_s->conf->p2p_6ghz_disable;
p2p.register_bootstrap_comeback = wpas_p2p_register_bootstrap_comeback;
p2p.bootstrap_req_rx = wpas_bootstrap_req_rx;
- p2p.bootstrap_completed = wpas_bootstrap_completed;
+ p2p.bootstrap_rsp_rx = wpas_bootstrap_rsp_rx;
p2p.validate_dira = wpas_validate_dira;
#ifdef CONFIG_PASN
p2p.pasn_send_mgmt = wpas_p2p_pasn_send_mgmt;