summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/fw
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-06-21 13:12:18 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-06-21 15:07:01 +0300
commit31aeae2446d50665b6ec51d564f5e7fe751d53d4 (patch)
tree036a74848c8871bd262fb637f74328425cc8d038 /drivers/net/wireless/intel/iwlwifi/fw
parentecf11f4e4950defa89ca9d813ba9684c19d85f6e (diff)
downloadlinux-31aeae2446d50665b6ec51d564f5e7fe751d53d4.tar.xz
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')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/pnvm.h16
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__ */