wil6210: run-time PM when interface down
Allow run-time suspend when interface is down, keep card alive when interface is up. If driver is in wmi only or debug_fw mode run-time PM won't suspend. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:

committato da
Kalle Valo

parent
8ed05ed06f
commit
94162666cd
@@ -21,6 +21,7 @@
|
||||
static int wil_open(struct net_device *ndev)
|
||||
{
|
||||
struct wil6210_priv *wil = ndev_to_wil(ndev);
|
||||
int rc;
|
||||
|
||||
wil_dbg_misc(wil, "open\n");
|
||||
|
||||
@@ -30,16 +31,29 @@ static int wil_open(struct net_device *ndev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return wil_up(wil);
|
||||
rc = wil_pm_runtime_get(wil);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
rc = wil_up(wil);
|
||||
if (rc)
|
||||
wil_pm_runtime_put(wil);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int wil_stop(struct net_device *ndev)
|
||||
{
|
||||
struct wil6210_priv *wil = ndev_to_wil(ndev);
|
||||
int rc;
|
||||
|
||||
wil_dbg_misc(wil, "stop\n");
|
||||
|
||||
return wil_down(wil);
|
||||
rc = wil_down(wil);
|
||||
if (!rc)
|
||||
wil_pm_runtime_put(wil);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const struct net_device_ops wil_netdev_ops = {
|
||||
|
Fai riferimento in un nuovo problema
Block a user