diff mbox series

[3/6] iwlwifi: Allow per-device fwcfg files.

Message ID 20201231000523.14963-3-greearb@candelatech.com
State New
Headers show
Series [1/6] iwlwifi: Decrease firmware monitor debug area from 4MB to 512k. | expand

Commit Message

Ben Greear Dec. 31, 2020, 12:05 a.m. UTC
From: Ben Greear <greearb@candelatech.com>

This allows one to set the NSS and some
other low-level features for ax200 radios.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.c
index 223c716d9fce..e2ae509d1650 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-cfg.c
@@ -246,12 +246,16 @@  void iwl_dbg_cfg_load_ini(struct device *dev, struct iwl_dbg_cfg *dbgcfg)
 	const struct firmware *fw;
 	char *data, *end, *pos;
 	int err;
+	char fname[128];
 
 	if (dbgcfg->loaded)
 		return;
 
-	/* TODO: maybe add a per-device file? */
-	err = firmware_request_nowarn(&fw, "iwl-dbg-cfg.ini", dev);
+	snprintf(fname, 127, "iwl-dbg-cfg-%s.ini", dev_name(dev));
+	fname[127] = 0;
+
+	/* TODO: maybe add a per-device file?  Yes, did that. --Ben */
+	err = firmware_request_nowarn(&fw, fname, dev);
 	if (err)
 		return;