浏览代码

cnss2: Skip HW re-enable if HW is already probed at boot

Peripheral control service can send notification to enable WLAN HW
even if HW is already enabled at boot. Thus skip wlan device pci
re-enumeration if PCI probe is already complete.

Change-Id: I5687b9ee74afe9331e11ec1fc5f1cf20f94117c8
CRs-fixed: 3224613
Manikandan Mohan 2 年之前
父节点
当前提交
fc97f926b0
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cnss2/main.c

+ 3 - 0
cnss2/main.c

@@ -3979,6 +3979,9 @@ int cnss_wlan_hw_enable(void)
 	struct cnss_plat_data *plat_priv = cnss_get_plat_priv(NULL);
 	int ret = 0;
 
+	if (test_bit(CNSS_PCI_PROBE_DONE, &plat_priv->driver_state))
+		return 0;
+
 	clear_bit(CNSS_WLAN_HW_DISABLED, &plat_priv->driver_state);
 
 	ret = cnss_wlan_device_init(plat_priv);