Commit 6256760f authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: fix warnings from dmi_get_system_info()

dmi_get_system_info() will statically return NULL when the
kernel is compiled without CONFIG_DMI, leading to compiler
warnings. Fix that by printing "<unknown>" in that case.

Fixes: c3f40c3e ("iwlwifi: mvm: add US/CA to TAS block list if OEM isn't allowed")
Fixes: 9457077d ("wifi: iwlwifi: mvm: Add debugfs to get TAS status")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4c60c805
...@@ -880,7 +880,7 @@ static ssize_t iwl_dbgfs_tas_get_status_read(struct file *file, ...@@ -880,7 +880,7 @@ static ssize_t iwl_dbgfs_tas_get_status_read(struct file *file,
le16_to_cpu(rsp->block_list[i])); le16_to_cpu(rsp->block_list[i]));
pos += scnprintf(pos, endpos - pos, "\nOEM name: %s\n", pos += scnprintf(pos, endpos - pos, "\nOEM name: %s\n",
dmi_get_system_info(DMI_SYS_VENDOR)); dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>");
pos += scnprintf(pos, endpos - pos, "\tVendor In Approved List: %s\n", pos += scnprintf(pos, endpos - pos, "\tVendor In Approved List: %s\n",
iwl_is_tas_approved() ? "YES" : "NO"); iwl_is_tas_approved() ? "YES" : "NO");
pos += scnprintf(pos, endpos - pos, pos += scnprintf(pos, endpos - pos,
......
...@@ -1159,7 +1159,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm) ...@@ -1159,7 +1159,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
if (!iwl_is_tas_approved()) { if (!iwl_is_tas_approved()) {
IWL_DEBUG_RADIO(mvm, IWL_DEBUG_RADIO(mvm,
"System vendor '%s' is not in the approved list, disabling TAS in US and Canada.\n", "System vendor '%s' is not in the approved list, disabling TAS in US and Canada.\n",
dmi_get_system_info(DMI_SYS_VENDOR)); dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>");
if ((!iwl_mvm_add_to_tas_block_list(data.block_list_array, if ((!iwl_mvm_add_to_tas_block_list(data.block_list_array,
&data.block_list_size, &data.block_list_size,
IWL_MCC_US)) || IWL_MCC_US)) ||
...@@ -1173,7 +1173,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm) ...@@ -1173,7 +1173,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
} else { } else {
IWL_DEBUG_RADIO(mvm, IWL_DEBUG_RADIO(mvm,
"System vendor '%s' is in the approved list.\n", "System vendor '%s' is in the approved list.\n",
dmi_get_system_info(DMI_SYS_VENDOR)); dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>");
} }
fw_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, fw_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment