P2P: Add method to signal lost device
This signal is used to notify users of the P2P state machine or wpa_supplicant of lost devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
d642d2d267
commit
56eeb8f299
5 changed files with 30 additions and 0 deletions
|
@ -351,8 +351,16 @@ void wpas_notify_resume(struct wpa_global *global)
|
|||
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
|
||||
void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
|
||||
const u8 *dev_addr, int new_device)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
|
||||
const u8 *dev_addr)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_P2P */
|
||||
|
|
|
@ -80,5 +80,7 @@ void wpas_notify_resume(struct wpa_global *global);
|
|||
|
||||
void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
|
||||
const u8 *dev_addr, int new_device);
|
||||
void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
|
||||
const u8 *dev_addr);
|
||||
|
||||
#endif /* NOTIFY_H */
|
||||
|
|
|
@ -1151,6 +1151,14 @@ void wpas_dev_found(void *ctx, const u8 *addr,
|
|||
}
|
||||
|
||||
|
||||
static void wpas_dev_lost(void *ctx, const u8 *dev_addr)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
|
||||
wpas_notify_p2p_device_lost(wpa_s, dev_addr);
|
||||
}
|
||||
|
||||
|
||||
static int wpas_start_listen(void *ctx, unsigned int freq,
|
||||
unsigned int duration,
|
||||
const struct wpabuf *probe_resp_ie)
|
||||
|
@ -2331,6 +2339,7 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
|
|||
p2p.go_neg_completed = wpas_go_neg_completed;
|
||||
p2p.go_neg_req_rx = wpas_go_neg_req_rx;
|
||||
p2p.dev_found = wpas_dev_found;
|
||||
p2p.dev_lost = wpas_dev_lost;
|
||||
p2p.start_listen = wpas_start_listen;
|
||||
p2p.stop_listen = wpas_stop_listen;
|
||||
p2p.send_probe_resp = wpas_send_probe_resp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue