mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Limit ROC for listen if NAN or NDI present
In P2P, if NDP is present, limit max ROC duration to 400ms on DBS and 250ms on non-DBS case. If NAN is present, limit max ROC duration to 450ms on DBS and 300ms on non-DBS case. Change-Id: I2e943d2f55984464812bba16ca78dfab8681cf30 CRs-Fixed: 3046904
This commit is contained in:
parent
785ebf5b4a
commit
48a68e9d09
2 changed files with 39 additions and 2 deletions
|
|
@ -82,6 +82,8 @@ static QDF_STATUS p2p_scan_start(struct p2p_roc_context *roc_ctx)
|
|||
struct wlan_objmgr_vdev *vdev;
|
||||
struct p2p_soc_priv_obj *p2p_soc_obj = roc_ctx->p2p_soc_obj;
|
||||
uint32_t go_num;
|
||||
uint8_t ndp_num = 0, nan_disc_enabled_num = 0;
|
||||
bool is_dbs;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(
|
||||
p2p_soc_obj->soc, roc_ctx->vdev_id,
|
||||
|
|
@ -121,7 +123,18 @@ static QDF_STATUS p2p_scan_start(struct p2p_roc_context *roc_ctx)
|
|||
if (req->scan_req.dwell_time_passive < P2P_MAX_ROC_DURATION) {
|
||||
go_num = policy_mgr_mode_specific_connection_count(
|
||||
p2p_soc_obj->soc, PM_P2P_GO_MODE, NULL);
|
||||
p2p_debug("present go number:%d", go_num);
|
||||
policy_mgr_mode_specific_num_active_sessions(p2p_soc_obj->soc,
|
||||
QDF_NDI_MODE,
|
||||
&ndp_num);
|
||||
policy_mgr_mode_specific_num_active_sessions(p2p_soc_obj->soc,
|
||||
QDF_NAN_DISC_MODE,
|
||||
&nan_disc_enabled_num);
|
||||
|
||||
p2p_debug("present go number:%d, NDP number:%d, NAN number:%d",
|
||||
go_num, ndp_num, nan_disc_enabled_num);
|
||||
|
||||
is_dbs = policy_mgr_is_hw_dbs_capable(p2p_soc_obj->soc);
|
||||
|
||||
if (go_num)
|
||||
req->scan_req.dwell_time_passive *=
|
||||
P2P_ROC_DURATION_MULTI_GO_PRESENT;
|
||||
|
|
@ -131,8 +144,28 @@ 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 (ndp_num) {
|
||||
if (is_dbs && req->scan_req.dwell_time_passive >
|
||||
P2P_MAX_ROC_DURATION_DBS_NDP_PRESENT)
|
||||
req->scan_req.dwell_time_passive =
|
||||
P2P_MAX_ROC_DURATION_DBS_NDP_PRESENT;
|
||||
else if (!is_dbs && req->scan_req.dwell_time_passive >
|
||||
P2P_MAX_ROC_DURATION_NON_DBS_NDP_PRESENT)
|
||||
req->scan_req.dwell_time_passive =
|
||||
P2P_MAX_ROC_DURATION_NON_DBS_NDP_PRESENT;
|
||||
} else if (nan_disc_enabled_num) {
|
||||
if (is_dbs && req->scan_req.dwell_time_passive >
|
||||
P2P_MAX_ROC_DURATION_DBS_NAN_PRESENT)
|
||||
req->scan_req.dwell_time_passive =
|
||||
P2P_MAX_ROC_DURATION_DBS_NAN_PRESENT;
|
||||
else if (!is_dbs && req->scan_req.dwell_time_passive >
|
||||
P2P_MAX_ROC_DURATION_NON_DBS_NAN_PRESENT)
|
||||
req->scan_req.dwell_time_passive =
|
||||
P2P_MAX_ROC_DURATION_NON_DBS_NAN_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",
|
||||
req->scan_req.dwell_time_passive);
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@
|
|||
#define P2P_WAIT_CANCEL_ROC 1000
|
||||
#define P2P_WAIT_CLEANUP_ROC 2000
|
||||
#define P2P_MAX_ROC_DURATION 1500
|
||||
#define P2P_MAX_ROC_DURATION_DBS_NDP_PRESENT 400
|
||||
#define P2P_MAX_ROC_DURATION_NON_DBS_NDP_PRESENT 250
|
||||
#define P2P_MAX_ROC_DURATION_DBS_NAN_PRESENT 450
|
||||
#define P2P_MAX_ROC_DURATION_NON_DBS_NAN_PRESENT 300
|
||||
|
||||
#define P2P_ROC_DURATION_MULTI_GO_PRESENT 6
|
||||
#define P2P_ROC_DURATION_MULTI_GO_ABSENT 10
|
||||
|
|
|
|||
Loading…
Reference in a new issue