diff options
| author | Miri Korenblit <[email protected]> | 2024-01-31 08:24:39 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2024-02-02 13:15:14 +0000 |
| commit | 427661e4c48887ea2a226cd972e574ae7686fb95 (patch) | |
| tree | 32fe77d9da95bfe2955a72650822521e6af8919a /drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | |
| parent | wifi: iwlwifi: cleanup sending PER_CHAIN_LIMIT_OFFSET_CMD (diff) | |
| download | kernel-427661e4c48887ea2a226cd972e574ae7686fb95.tar.gz kernel-427661e4c48887ea2a226cd972e574ae7686fb95.zip | |
wifi: iwlwifi: read SAR tables from UEFI
All the regulatory tables will be read from UEFI, and
only if it doesn't exist - they will be read from ACPI.
Read SAR tables (WRDS, EWRD and WGDS) from UEFI.
Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Link: https://msgid.link/20240131091413.533b687e1efb.Icb316291e593c8d53f41fdea2d083367dc97e3c4@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/regulatory.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/regulatory.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c index 58290bf64f42..862d8b8b0fc9 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c @@ -6,6 +6,23 @@ #include "iwl-debug.h" #include "regulatory.h" #include "fw/runtime.h" +#include "fw/uefi.h" + +#define IWL_BIOS_TABLE_LOADER(__name) \ +int iwl_bios_get_ ## __name ## _table(struct iwl_fw_runtime *fwrt) \ +{ \ + int ret = -ENOENT; \ + if (fwrt->uefi_tables_lock_status > UEFI_WIFI_GUID_UNLOCKED) \ + ret = iwl_uefi_get_ ## __name ## _table(fwrt); \ + if (ret < 0) \ + ret = iwl_acpi_get_ ## __name ## _table(fwrt); \ + return ret; \ +} \ +IWL_EXPORT_SYMBOL(iwl_bios_get_ ## __name ## _table) + +IWL_BIOS_TABLE_LOADER(wrds); +IWL_BIOS_TABLE_LOADER(ewrd); +IWL_BIOS_TABLE_LOADER(wgds); bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt) { |
