linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] ath10k: silence firmware file probing warnings
@ 2016-07-19 13:00 Michal Kazior
  2016-07-21  7:09 ` Stanislaw Gruszka
                   ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: Michal Kazior @ 2016-07-19 13:00 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath10k, Michal Kazior

Firmware files are versioned to prevent older
driver instances to load unsupported firmware
blobs. This is reflected with a fallback logic
which attempts to load several firmware files.

This however produced a lot of unnecessary
warnings sometimes confusing users and leading
them to rename firmware files making things even
more confusing.

Hence use request_firmware_direct() which does not
produce extra warnings. This shouldn't really
break anything because most modern systems don't
rely on udev/hotplug helpers to load firmware
files anymore.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c     | 11 +++++------
 drivers/net/wireless/ath/ath10k/testmode.c |  5 ++++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index e88982921aa3..81bfb71fe876 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -431,7 +431,10 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
 		dir = ".";
 
 	snprintf(filename, sizeof(filename), "%s/%s", dir, file);
-	ret = request_firmware(&fw, filename, ar->dev);
+	ret = request_firmware_direct(&fw, filename, ar->dev);
+	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
+		   filename, ret);
+
 	if (ret)
 		return ERR_PTR(ret);
 
@@ -1089,12 +1092,8 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
 	/* first fetch the firmware file (firmware-*.bin) */
 	fw_file->firmware = ath10k_fetch_fw_file(ar, ar->hw_params.fw.dir,
 						 name);
-	if (IS_ERR(fw_file->firmware)) {
-		ath10k_err(ar, "could not fetch firmware file '%s/%s': %ld\n",
-			   ar->hw_params.fw.dir, name,
-			   PTR_ERR(fw_file->firmware));
+	if (IS_ERR(fw_file->firmware))
 		return PTR_ERR(fw_file->firmware);
-	}
 
 	data = fw_file->firmware->data;
 	len = fw_file->firmware->size;
diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c
index 120f4234d3b0..fe49e7a83d00 100644
--- a/drivers/net/wireless/ath/ath10k/testmode.c
+++ b/drivers/net/wireless/ath/ath10k/testmode.c
@@ -149,7 +149,10 @@ static int ath10k_tm_fetch_utf_firmware_api_1(struct ath10k *ar,
 		 ar->hw_params.fw.dir, ATH10K_FW_UTF_FILE);
 
 	/* load utf firmware image */
-	ret = request_firmware(&fw_file->firmware, filename, ar->dev);
+	ret = request_firmware_direct(&fw_file->firmware, filename, ar->dev);
+	ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "testmode fw request '%s': %d\n",
+		   filename, ret);
+
 	if (ret) {
 		ath10k_warn(ar, "failed to retrieve utf firmware '%s': %d\n",
 			    filename, ret);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-01-31 15:06 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 13:00 [RFC] ath10k: silence firmware file probing warnings Michal Kazior
2016-07-21  7:09 ` Stanislaw Gruszka
2016-07-21  7:36   ` Emmanuel Grumbach
2016-07-21  8:05     ` Stanislaw Gruszka
2016-07-21 10:23       ` Prarit Bhargava
2016-07-21 11:51         ` Stanislaw Gruszka
2016-07-21 12:01           ` Prarit Bhargava
2016-07-22  8:38           ` Arend Van Spriel
2016-07-22 10:26             ` Stanislaw Gruszka
2016-07-22 12:21               ` Arend Van Spriel
2016-07-22 12:51                 ` Prarit Bhargava
2016-07-22 22:19                   ` Luis R. Rodriguez
2016-07-25  7:51                     ` Emmanuel Grumbach
2016-07-22 22:15               ` Luis R. Rodriguez
2016-07-28 19:23                 ` Arend van Spriel
2016-08-02 11:10                 ` Valo, Kalle
2016-08-02 14:16                   ` Luis R. Rodriguez
2016-08-03 11:33                     ` Arend van Spriel
2016-08-03 14:21                       ` Luis R. Rodriguez
2016-08-03 15:04                         ` Valo, Kalle
2016-08-03 17:10                           ` Luis R. Rodriguez
2016-08-03 19:19                             ` Arend van Spriel
2016-07-22 22:05             ` Luis R. Rodriguez
2016-07-28 19:23               ` Arend van Spriel
2016-07-28 23:28                 ` Luis R. Rodriguez
2016-08-02 11:18 ` Valo, Kalle
2016-08-02 11:24   ` Felix Fietkau
2017-01-20 12:51 ` Kalle Valo
2017-01-20 12:56   ` Michal Kazior
2017-01-31 15:02 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).