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

Commit e1d64b86 authored by Yu Wang's avatar Yu Wang
Browse files

cnss: notify wlan driver when failed to power up



During SSR, if power-up fails, wlan driver will
enter ssr_in_progress state, which will block
driver unloading, it's not reasonable.
To improve this, notify wlan driver about the
failure, then driver unloading can be handled
properly according to this flag.

CRs-Fixed: 2246361
Change-Id: I669cc0137811a991c00ff9e73ebbb2bcf2d621a1
Signed-off-by: default avatarYu Wang <yyuwang@codeaurora.org>
parent 040b327f
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2717,11 +2717,15 @@ static int cnss_powerup(const struct subsys_desc *subsys)
	cnss_configure_wlan_en_gpio(WLAN_EN_LOW);
	cnss_wlan_vreg_set(vreg_info, VREG_OFF);
	if (penv->pdev) {
		if (wdrv && wdrv->update_status)
			wdrv->update_status(penv->pdev, CNSS_SSR_FAIL);
		if (!penv->recovery_in_progress) {
			pr_err("%d: Unregistering pci device\n", __LINE__);
			pci_unregister_driver(&cnss_wlan_pci_driver);
			penv->pdev = NULL;
			penv->pci_register_again = true;
		}
	}

err_wlan_vreg_on:
	return ret;
+5 −2
Original line number Diff line number Diff line
@@ -102,11 +102,14 @@ struct cnss_platform_cap {
	u32 cap_flag;
};

/* WLAN driver status */
/* WLAN driver status, keep it aligned with cnss2 */
enum cnss_driver_status {
	CNSS_UNINITIALIZED,
	CNSS_INITIALIZED,
	CNSS_LOAD_UNLOAD
	CNSS_LOAD_UNLOAD,
	CNSS_RECOVERY,
	CNSS_FW_DOWN,
	CNSS_SSR_FAIL,
};

enum cnss_runtime_request {