From 008a07c0982beea39c4aa64593b170dc62161c42 Mon Sep 17 00:00:00 2001 From: Jingxiang Ge Date: Wed, 17 Nov 2021 10:19:59 +0800 Subject: [PATCH] qcacld-3.0: Reduced country change work resched time Current when open interface, country change work will start, but as hdd_open is holding psoc sync, it will wait for 500ms to resched, after 500ms most of the time the 1st scan comes, it will send WMI_SCAN_CHAN_LIST_CMDID which cause scan abort. Change wait time to 30ms, so country work can be finished asap once hdd_open done, it will not affect 1st scan. Change-Id: I13064eef7197464598722c0dce3fb1bf361cb841 CRs-Fixed: 3075136 --- core/hdd/src/wlan_hdd_regulatory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 4ef4e33e8d35..8d06b73de434 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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 @@ -122,7 +123,7 @@ hdd_world_regrules_67_68_6A_6C = { } }; -#define OSIF_PSOC_SYNC_OP_WAIT_TIME 500 +#define COUNTRY_CHANGE_WORK_RESCHED_WAIT_TIME 30 /** * hdd_get_world_regrules() - get the appropriate world regrules * @reg: regulatory data @@ -1647,7 +1648,7 @@ static void hdd_country_change_work_handle(void *arg) errno = osif_psoc_sync_op_start(wiphy_dev(hdd_ctx->wiphy), &psoc_sync); if (errno == -EAGAIN) { - qdf_sleep(OSIF_PSOC_SYNC_OP_WAIT_TIME); + qdf_sleep(COUNTRY_CHANGE_WORK_RESCHED_WAIT_TIME); hdd_debug("rescheduling country change work"); qdf_sched_work(0, &hdd_ctx->country_change_work); return;