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
|
@ -560,6 +560,8 @@ static void p2p_device_free(struct p2p_data *p2p, struct p2p_device *dev)
|
|||
if (p2p->pending_client_disc_go == dev)
|
||||
p2p->pending_client_disc_go = NULL;
|
||||
|
||||
p2p->cfg->dev_lost(p2p->cfg->cb_ctx, dev->info.p2p_device_addr);
|
||||
|
||||
os_free(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -441,6 +441,15 @@ struct p2p_config {
|
|||
const struct p2p_peer_info *info,
|
||||
int new_device);
|
||||
|
||||
/**
|
||||
* dev_lost - Notification of a lost P2P Device
|
||||
* @ctx: Callback context from cb_ctx
|
||||
* @dev_addr: P2P Device Address of the lost P2P Device
|
||||
*
|
||||
* This callback is used to notify that a P2P Device has been deleted.
|
||||
*/
|
||||
void (*dev_lost)(void *ctx, const u8 *dev_addr);
|
||||
|
||||
/**
|
||||
* go_neg_req_rx - Notification of a receive GO Negotiation Request
|
||||
* @ctx: Callback context from cb_ctx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue