qcacld-3.0: Limit ROC for listen to max 600 if GO present
Add fixed 300ms extra ROC time instead of multiplying the ROC duration by 6 as this causes the ROC to be upto 1.5 secs if GO is present. Firmware will advertize NOA of 1.5 secs and if supplicant cancels ROC after 200 or 300ms then firmware cannot cancel NOA. So when supplicant sends next ROC it will be delayed as firmware already is running previous NOA which may cause p2p find issues if GO is present. Fix this by capping the max ROC time to 600ms when GO is present. Change-Id: I0774b06ff4db1fae7efc387388fdf3059505150e CRs-Fixed: 3025870
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9c59721081
commit
446effff96
@@ -127,7 +127,17 @@ static QDF_STATUS p2p_scan_start(struct p2p_roc_context *roc_ctx)
|
||||
p2p_soc_obj->soc, PM_P2P_GO_MODE, NULL);
|
||||
p2p_debug("present go number:%d", go_num);
|
||||
if (go_num)
|
||||
req->scan_req.dwell_time_passive *=
|
||||
/* Add fixed 300ms extra ROC time instead of multiplying the
|
||||
* ROC duration by const value as this causes the ROC to be
|
||||
* upto 1.5 secs if GO is present. Firmware will advertize NOA
|
||||
* of 1.5 secs and if supplicant cancels ROC after 200 or 300ms
|
||||
* then firmware cannot cancel NOA. So when supplicant sends
|
||||
* next ROC it will be delayed as firmware already is running
|
||||
* previous NOA. This causes p2p find issues if GO is present.
|
||||
* So add fixed duration of 300ms and also cap max ROC to 600ms
|
||||
* when GO is present
|
||||
*/
|
||||
req->scan_req.dwell_time_passive +=
|
||||
P2P_ROC_DURATION_MULTI_GO_PRESENT;
|
||||
else
|
||||
req->scan_req.dwell_time_passive *=
|
||||
@@ -135,7 +145,12 @@ static QDF_STATUS p2p_scan_start(struct p2p_roc_context *roc_ctx)
|
||||
/* this is to protect too huge value if some customers
|
||||
* give a higher value from supplicant
|
||||
*/
|
||||
if (req->scan_req.dwell_time_passive > P2P_MAX_ROC_DURATION)
|
||||
if (go_num && req->scan_req.dwell_time_passive >
|
||||
P2P_MAX_ROC_DURATION_GO_PRESENT)
|
||||
req->scan_req.dwell_time_passive =
|
||||
P2P_MAX_ROC_DURATION_GO_PRESENT;
|
||||
else if (req->scan_req.dwell_time_passive >
|
||||
P2P_MAX_ROC_DURATION)
|
||||
req->scan_req.dwell_time_passive = P2P_MAX_ROC_DURATION;
|
||||
}
|
||||
p2p_debug("FW requested roc duration is:%d",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2019, 2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -31,8 +31,9 @@
|
||||
#define P2P_WAIT_CANCEL_ROC 1000
|
||||
#define P2P_WAIT_CLEANUP_ROC 2000
|
||||
#define P2P_MAX_ROC_DURATION 1500
|
||||
#define P2P_MAX_ROC_DURATION_GO_PRESENT 600
|
||||
|
||||
#define P2P_ROC_DURATION_MULTI_GO_PRESENT 6
|
||||
#define P2P_ROC_DURATION_MULTI_GO_PRESENT 300
|
||||
#define P2P_ROC_DURATION_MULTI_GO_ABSENT 10
|
||||
#define P2P_ACTION_FRAME_DEFAULT_WAIT 200
|
||||
#define P2P_ROC_DEFAULT_DURATION 200
|
||||
|
Reference in New Issue
Block a user