mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
wifi: iwlwifi: make iwl_uefi_get_uats_table() return void
This sets both fwrt->uats_valid and returns 0, but in the static inline it returns 0 without setting uats_valid, which is confusing and the iwlmvm code misbehaves in this case. Since it already sets uats_valid, just remove the extra return value. Reported-by: Bjoern A. Zeeb <bz@FreeBSD.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250505215513.e981a7911228.Ic94b5e03e2053a08b84cabeb58ce3b6598fd9fc6@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
committed by
Miri Korenblit
parent
f214221512
commit
beda255463
@@ -410,8 +410,8 @@ static int iwl_uefi_uats_parse(struct uefi_cnv_wlan_uats_data *uats_data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
void iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct uefi_cnv_wlan_uats_data *data;
|
||||
int ret;
|
||||
@@ -419,17 +419,12 @@ int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
data = iwl_uefi_get_verified_variable(trans, IWL_UEFI_UATS_NAME,
|
||||
"UATS", sizeof(*data), NULL);
|
||||
if (IS_ERR(data))
|
||||
return -EINVAL;
|
||||
return;
|
||||
|
||||
ret = iwl_uefi_uats_parse(data, fwrt);
|
||||
if (ret < 0) {
|
||||
if (ret < 0)
|
||||
IWL_DEBUG_FW(trans, "Cannot read UATS table. rev is invalid\n");
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
kfree(data);
|
||||
return 0;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_uefi_get_uats_table);
|
||||
|
||||
|
||||
@@ -272,8 +272,8 @@ int iwl_uefi_get_wbem(struct iwl_fw_runtime *fwrt, u32 *value);
|
||||
int iwl_uefi_get_dsm(struct iwl_fw_runtime *fwrt, enum iwl_dsm_funcs func,
|
||||
u32 *value);
|
||||
void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt);
|
||||
int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt);
|
||||
void iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt);
|
||||
int iwl_uefi_get_puncturing(struct iwl_fw_runtime *fwrt);
|
||||
int iwl_uefi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value);
|
||||
int iwl_uefi_get_phy_filters(struct iwl_fw_runtime *fwrt);
|
||||
@@ -368,11 +368,9 @@ void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwr
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
static inline void
|
||||
iwl_uefi_get_uats_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
|
||||
@@ -63,9 +63,7 @@ void iwl_mld_get_bios_tables(struct iwl_mld *mld)
|
||||
/* we don't fail if the table is not available */
|
||||
}
|
||||
|
||||
ret = iwl_uefi_get_uats_table(mld->trans, &mld->fwrt);
|
||||
if (ret)
|
||||
IWL_DEBUG_RADIO(mld, "failed to read UATS table (%d)\n", ret);
|
||||
iwl_uefi_get_uats_table(mld->trans, &mld->fwrt);
|
||||
|
||||
iwl_bios_get_phy_filters(&mld->fwrt);
|
||||
}
|
||||
|
||||
@@ -511,11 +511,10 @@ static void iwl_mvm_uats_init(struct iwl_mvm *mvm)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = iwl_uefi_get_uats_table(mvm->trans, &mvm->fwrt);
|
||||
if (ret < 0) {
|
||||
IWL_DEBUG_FW(mvm, "failed to read UATS table (%d)\n", ret);
|
||||
iwl_uefi_get_uats_table(mvm->trans, &mvm->fwrt);
|
||||
|
||||
if (!mvm->fwrt.uats_valid)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = iwl_mvm_send_cmd(mvm, &cmd);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user