wifi: iwlmei: don't send SAP messages if AMT is disabled
SAP messages should not be sent when AMT is disabled. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230822103048.db16b55c27c1.I48834c14f5af8d31792f5048b3023509cba191dd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
057381ddac
commit
ef030ab17e
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/etherdevice.h>
|
||||
|
@ -1532,7 +1532,7 @@ void iwl_mei_host_associated(const struct iwl_mei_conn_info *conn_info,
|
|||
|
||||
mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
if (!mei && !mei->amt_enabled)
|
||||
if (!mei || !mei->amt_enabled)
|
||||
goto out;
|
||||
|
||||
iwl_mei_send_sap_msg_payload(mei->cldev, &msg.hdr);
|
||||
|
@ -1561,7 +1561,7 @@ void iwl_mei_host_disassociated(void)
|
|||
|
||||
mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
if (!mei && !mei->amt_enabled)
|
||||
if (!mei || !mei->amt_enabled)
|
||||
goto out;
|
||||
|
||||
iwl_mei_send_sap_msg_payload(mei->cldev, &msg.hdr);
|
||||
|
@ -1597,7 +1597,7 @@ void iwl_mei_set_rfkill_state(bool hw_rfkill, bool sw_rfkill)
|
|||
|
||||
mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
if (!mei && !mei->amt_enabled)
|
||||
if (!mei || !mei->amt_enabled)
|
||||
goto out;
|
||||
|
||||
iwl_mei_send_sap_msg_payload(mei->cldev, &msg.hdr);
|
||||
|
@ -1626,7 +1626,7 @@ void iwl_mei_set_nic_info(const u8 *mac_address, const u8 *nvm_address)
|
|||
|
||||
mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
if (!mei && !mei->amt_enabled)
|
||||
if (!mei || !mei->amt_enabled)
|
||||
goto out;
|
||||
|
||||
iwl_mei_send_sap_msg_payload(mei->cldev, &msg.hdr);
|
||||
|
@ -1654,7 +1654,7 @@ void iwl_mei_set_country_code(u16 mcc)
|
|||
|
||||
mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
if (!mei && !mei->amt_enabled)
|
||||
if (!mei || !mei->amt_enabled)
|
||||
goto out;
|
||||
|
||||
iwl_mei_send_sap_msg_payload(mei->cldev, &msg.hdr);
|
||||
|
@ -1680,7 +1680,7 @@ void iwl_mei_set_power_limit(const __le16 *power_limit)
|
|||
|
||||
mei = mei_cldev_get_drvdata(iwl_mei_global_cldev);
|
||||
|
||||
if (!mei && !mei->amt_enabled)
|
||||
if (!mei || !mei->amt_enabled)
|
||||
goto out;
|
||||
|
||||
memcpy(msg.sar_chain_info_table, power_limit, sizeof(msg.sar_chain_info_table));
|
||||
|
|
Loading…
Reference in New Issue