Message ID | 20201231000523.14963-3-greearb@candelatech.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Miri Korenblit |
Headers | show |
Series | [1/6] iwlwifi: Decrease firmware monitor debug area from 4MB to 512k. | expand |
Hi Ben, On Thu, Dec 31, 2020 at 11:17 AM <greearb@candelatech.com> wrote: > > 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 --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 */ You probably don't need the comment anymore =) > + err = firmware_request_nowarn(&fw, fname, dev); Would it make sense to fall back to "iwl-dbg-cfg.ini" if the per-device one isn't available? Thanks,
On 12/30/20 5:19 PM, Julian Calaby wrote: > Hi Ben, > > On Thu, Dec 31, 2020 at 11:17 AM <greearb@candelatech.com> wrote: >> >> 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 --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 */ > > You probably don't need the comment anymore =) > >> + err = firmware_request_nowarn(&fw, fname, dev); > > Would it make sense to fall back to "iwl-dbg-cfg.ini" if the > per-device one isn't available? It would be fine with me, lets see if Luca has any interest in the patches in general before I go tweaking on them... Thanks, Ben > > Thanks, >
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;