Просмотр исходного кода

qcacld-3.0: Ignore country code change if driver enabled

Corner case: idle restart --> country code set from user space -->
idle shutdown start -->set country command pended --> idle shutdown
complete --> country_change_work_handle crashed

The crash root cause is getting country code set command when adapter
started, but work q country_change_work handle pended by idle shutdown
processing. After idle shutdown complete, work q country_change_work
gets chance to process the command, but driver already disabled.

The fixing is similar with Ic651e1abdf6b2efa27e57695c04ace249f9d21bb.
But 9f9d21bb can't cover the corner case.

So, add driver state checking in q country_change_work.

Change-Id: I1c9407f03273d4ad487e617fa3426f2c103ada7f
CRs-Fixed: 3247396
Yu Ouyang 2 лет назад
Родитель
Сommit
580d003ab6
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      core/hdd/src/wlan_hdd_regulatory.c

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

@@ -1824,7 +1824,10 @@ static void hdd_country_change_work_handle(void *arg)
 		return;
 	}
 
-	__hdd_country_change_work_handle(hdd_ctx);
+	if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED)
+		hdd_err("Driver disabled, ignore country code change");
+	else
+		__hdd_country_change_work_handle(hdd_ctx);
 
 	osif_psoc_sync_op_stop(psoc_sync);
 }