Explorar o código

qcacld-3.0: Reschedule country change work

Country change is a psoc operation and currently driver does
not try to reschedule country change work if it fails to start
this psoc operation and because of which it does not update the
scan channel list to the FW because of which host and FW are
not in sync.

To address this issue, reschedule country change work if it
gets and status of -EAGAIN when it tries to start the country
change psoc operation.

Change-Id: Ib93674b600a5d19fe3091d58e0689e806366659d
CRs-Fixed: 2968772
Ashish Kumar Dhanotiya %!s(int64=3) %!d(string=hai) anos
pai
achega
42596fcc11
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  1. 10 1
      core/hdd/src/wlan_hdd_regulatory.c

+ 10 - 1
core/hdd/src/wlan_hdd_regulatory.c

@@ -122,6 +122,7 @@ hdd_world_regrules_67_68_6A_6C = {
 	}
 };
 
+#define OSIF_PSOC_SYNC_OP_WAIT_TIME 500
 /**
  * hdd_get_world_regrules() - get the appropriate world regrules
  * @reg: regulatory data
@@ -1686,8 +1687,16 @@ static void hdd_country_change_work_handle(void *arg)
 		return;
 
 	errno = osif_psoc_sync_op_start(wiphy_dev(hdd_ctx->wiphy), &psoc_sync);
-	if (errno)
+
+	if (errno == -EAGAIN) {
+		qdf_sleep(OSIF_PSOC_SYNC_OP_WAIT_TIME);
+		hdd_debug("rescheduling country change work");
+		qdf_sched_work(0, &hdd_ctx->country_change_work);
 		return;
+	} else if (errno) {
+		hdd_err("can not handle country change %d", errno);
+		return;
+	}
 
 	__hdd_country_change_work_handle(hdd_ctx);