diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-06-21 12:12:18 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-06-21 14:07:01 +0200 |
commit | 31aeae2446d50665b6ec51d564f5e7fe751d53d4 (patch) | |
tree | 036a74848c8871bd262fb637f74328425cc8d038 /drivers/net/wireless/intel/iwlwifi/fw/pnvm.h | |
parent | wifi: iwlwifi: also unify Ma device configurations (diff) | |
download | linux-31aeae2446d50665b6ec51d564f5e7fe751d53d4.tar.xz linux-31aeae2446d50665b6ec51d564f5e7fe751d53d4.zip |
wifi: iwlwifi: cfg: remove trailing dash from FW_PRE constants
We have the trailing dash here, but that complicates all
the code. Simplify this by removing the dashes, adding
them to the *_MODULE_FIRMWARE macros, and adjusting the
code using this accordingly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230621130443.72240ca13b83.I1f4ed547f0964719ed98a3ef928080462d594491@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/pnvm.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/pnvm.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h index 32fba08b7db1..1bac3466154c 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.h @@ -21,21 +21,9 @@ void iwl_pnvm_get_fs_name(struct iwl_trans *trans, u8 *pnvm_name, size_t max_len) { char _fw_name_pre[FW_NAME_PRE_BUFSIZE]; - const char *fw_name_pre; - int pre_len; - fw_name_pre = iwl_drv_get_fwname_pre(trans, _fw_name_pre); - - /* - * The prefix unfortunately includes a hyphen at the end, so - * don't add the dot here... - */ - snprintf(pnvm_name, max_len, "%spnvm", fw_name_pre); - - /* ...but replace the hyphen with the dot here. */ - pre_len = strlen(fw_name_pre); - if (pre_len < max_len && pre_len > 0) - pnvm_name[pre_len - 1] = '.'; + snprintf(pnvm_name, max_len, "%s.pnvm", + iwl_drv_get_fwname_pre(trans, _fw_name_pre)); } #endif /* __IWL_PNVM_H__ */ |