Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 008a07c0 authored by Jingxiang Ge's avatar Jingxiang Ge Committed by Gerrit - the friendly Code Review server
Browse files

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
parent 97cb6024
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/*
 * 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;