diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2018-01-25 11:37:36 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-01-25 11:37:35 -0800 |
| commit | 80418e1d7cf8772c8d49ef1bc5706684166fec0a (patch) | |
| tree | 93c4ab435259379745b0f4e0cd81cad48ff24b0e /drivers | |
| parent | b0fcba45b8520ab83305722d9e2f1296497f1e17 (diff) | |
| parent | 0c89a0b5b2e67cdcdaaf6131174812301102a689 (diff) | |
Merge "icnss: Avoid qmi exchange when fw is down"
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/soc/qcom/icnss.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 7f71824d9548..543eeaa1e7df 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -3073,6 +3073,12 @@ int icnss_set_fw_log_mode(struct device *dev, uint8_t fw_log_mode) if (!dev) return -ENODEV; + if (test_bit(ICNSS_FW_DOWN, &penv->state)) { + icnss_pr_err("FW down, ignoring fw_log_mode state: 0x%lx\n", + penv->state); + return -EINVAL; + } + icnss_pr_dbg("FW log mode: %u\n", fw_log_mode); ret = wlfw_ini_send_sync_msg(fw_log_mode); @@ -3166,6 +3172,12 @@ int icnss_wlan_enable(struct device *dev, struct icnss_wlan_enable_cfg *config, if (!dev) return -ENODEV; + if (test_bit(ICNSS_FW_DOWN, &penv->state)) { + icnss_pr_err("FW down, ignoring wlan_enable state: 0x%lx\n", + penv->state); + return -EINVAL; + } + icnss_pr_dbg("Mode: %d, config: %p, host_version: %s\n", mode, config, host_version); |
