diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2021-01-31 21:22:07 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2021-02-05 12:57:45 +0300 |
commit | a2ac0f48a07c2b4272ced5886221e3954e7dfc0c (patch) | |
tree | 2729482f1194a9ac194947376eb699be9e78196a /drivers/net/wireless/intel/iwlwifi/mvm | |
parent | efaa85cf2294d5e10a724e24356507eeb3836f72 (diff) | |
download | linux-a2ac0f48a07c2b4272ced5886221e3954e7dfc0c.tar.xz |
iwlwifi: mvm: implement approved list for the PPAG feature
We should only allow PPAG to be enabled by OEMs that are in the
approved list. In order to do this, we need to compare the system
vendor string retrieved from SMBIOS to a list maintained in the
driver. If the vendor string is not in the list, we don't allow PPAG
to be used.
For now the list is empty, but entries will be added to it
individually, in subsequent patches.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210131201908.c9d35b7d8748.I4e4cf61d8fa6ff91d9b0cab2b1ec9ede4be346f5@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 9f8751ceb45b..e29f2d310fb6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -6,6 +6,7 @@ */ #include <net/mac80211.h> #include <linux/netdevice.h> +#include <linux/dmi.h> #include "iwl-trans.h" #include "iwl-op-mode.h" @@ -1043,6 +1044,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm) return ret; } +static const struct dmi_system_id dmi_ppag_approved_list[] = { +}; + static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) { int ret; @@ -1054,6 +1058,15 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm) ret); return 0; } + + if (!dmi_check_system(dmi_ppag_approved_list)) { + IWL_DEBUG_RADIO(mvm, + "System vendor '%s' is not in the approved list, disabling PPAG.\n", + dmi_get_system_info(DMI_SYS_VENDOR)); + mvm->fwrt.ppag_table.v1.enabled = cpu_to_le32(0); + return 0; + } + return iwl_mvm_ppag_send_cmd(mvm); } |