P2P: Limit number of SD retries during find
Commit 7139cf4a4f
('P2P: Decrement
sd_pending_bcast_queries when sd returns success') added support for
retrying P2P SD queries. However, it did this without limiting how many
retries are allowed. This can result in excessive number of retries if a
peer device does not show up on its Listen channel and there is a
pending SD query to it. Limit the maximum number of SD retries to 100
per p2p_find operation for each peer to avoid unlimited retries.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
e706b8c8e5
commit
44abecbf02
3 changed files with 16 additions and 3 deletions
|
@ -348,8 +348,10 @@ int p2p_listen(struct p2p_data *p2p, unsigned int timeout)
|
|||
static void p2p_device_clear_reported(struct p2p_data *p2p)
|
||||
{
|
||||
struct p2p_device *dev;
|
||||
dl_list_for_each(dev, &p2p->devices, struct p2p_device, list)
|
||||
dl_list_for_each(dev, &p2p->devices, struct p2p_device, list) {
|
||||
dev->flags &= ~P2P_DEV_REPORTED;
|
||||
dev->sd_reqs = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue