iwlwifi: don't WARN when calling iwl_get_shared_mem_conf with RF-Kill
iwl_mvm_send_cmd returns 0 when the command won't be sent because RF-Kill is asserted. Do the same when we call iwl_get_shared_mem_conf since it is not sent through iwl_mvm_send_cmd but directly calls the transport layer. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
committed by
Luca Coelho
parent
3b57a10ca1
commit
0d53cfd0cc
@ -8,7 +8,7 @@
|
|||||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||||
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
||||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||||
* Copyright(c) 2018 Intel Corporation
|
* Copyright(c) 2018 - 2019 Intel Corporation
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of version 2 of the GNU General Public License as
|
* it under the terms of version 2 of the GNU General Public License as
|
||||||
@ -31,7 +31,7 @@
|
|||||||
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
||||||
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
|
||||||
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
|
||||||
* Copyright(c) 2018 Intel Corporation
|
* Copyright(c) 2018 - 2019 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -134,6 +134,7 @@ void iwl_get_shared_mem_conf(struct iwl_fw_runtime *fwrt)
|
|||||||
.len = { 0, },
|
.len = { 0, },
|
||||||
};
|
};
|
||||||
struct iwl_rx_packet *pkt;
|
struct iwl_rx_packet *pkt;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (fw_has_capa(&fwrt->fw->ucode_capa,
|
if (fw_has_capa(&fwrt->fw->ucode_capa,
|
||||||
IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG))
|
IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG))
|
||||||
@ -141,8 +142,13 @@ void iwl_get_shared_mem_conf(struct iwl_fw_runtime *fwrt)
|
|||||||
else
|
else
|
||||||
cmd.id = SHARED_MEM_CFG;
|
cmd.id = SHARED_MEM_CFG;
|
||||||
|
|
||||||
if (WARN_ON(iwl_trans_send_cmd(fwrt->trans, &cmd)))
|
ret = iwl_trans_send_cmd(fwrt->trans, &cmd);
|
||||||
|
|
||||||
|
if (ret) {
|
||||||
|
WARN(ret != -ERFKILL,
|
||||||
|
"Could not send the SMEM command: %d\n", ret);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pkt = cmd.resp_pkt;
|
pkt = cmd.resp_pkt;
|
||||||
if (fwrt->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22000)
|
if (fwrt->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22000)
|
||||||
|
Reference in New Issue
Block a user