diff options
author | Gil Adam <gil.adam@intel.com> | 2019-11-07 21:23:21 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-12-20 13:35:42 +0200 |
commit | 160bab43419ebca9ee57219b2ccf02f0fa2c59e8 (patch) | |
tree | 670bc4ab5dc33b27afb248f4212ca5210f6953d3 /drivers/net/wireless | |
parent | 33328bfab892d676920abb440d41fbf4b16c2717 (diff) | |
download | linux-160bab43419ebca9ee57219b2ccf02f0fa2c59e8.tar.gz linux-160bab43419ebca9ee57219b2ccf02f0fa2c59e8.tar.bz2 linux-160bab43419ebca9ee57219b2ccf02f0fa2c59e8.zip |
iwlwifi: don't send PPAG command if disabled
we should not send the PPAG (Per-Platform Antenna Gain)
command to FW unless the platform has this ACPI table and it was
read and validated during the init flow. also no need to send the
command if the feature is disabled, so check if enabled before
sending, as if there is no valid table the feature is disabled.
Signed-off-by: Gil Adam <gil.adam@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index dd685f7eb410..c09624d8d7ee 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -841,9 +841,13 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm) return 0; } + if (!mvm->fwrt.ppag_table.enabled) { + IWL_DEBUG_RADIO(mvm, + "PPAG not enabled, command not sent.\n"); + return 0; + } + IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n"); - IWL_DEBUG_RADIO(mvm, "PPAG is %s\n", - mvm->fwrt.ppag_table.enabled ? "enabled" : "disabled"); for (i = 0; i < ACPI_PPAG_NUM_CHAINS; i++) { for (j = 0; j < ACPI_PPAG_NUM_SUB_BANDS; j++) { |