Skip to contentSkip to conversation

ath10k: firmware version related changes

PATCH New Kalle Valo 2 participants 6 messages May 2, 2013 – May 4, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

cover ath10k: firmware version related changes

Few simple changes how we handle firmware versions.

---

Kalle Valo (2):
ath10k: print firmware version string during boot
ath10k: only warn about incompatible firmware versions

 drivers/net/wireless/ath/ath10k/core.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
author
#1 lore raw

PATCH 1/2 ath10k: print firmware version string during boot

Currently we don't print firmware version at all. Move the current "firmware dowloaded" message later once firmware has booted and include firmware version in the message.

---
 drivers/net/wireless/ath/ath10k/core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/core.c +2 -1
index 13ffe78..a511aaf 100644
@@ -375,7 +375,6 @@ static int ath10k_init_download_firmware(struct ath10k *ar)
 	if (ret)
 		return ret;
 
-	ath10k_info("firmware downloaded\n");
 	return ret;
 }
 
@@ -569,6 +568,8 @@ int ath10k_core_register(struct ath10k *ar)
 	if (status)
 		goto err_htt_detach;
 
+	ath10k_info("firmware %s booted\n", ar->hw->wiphy->fw_version);
+
 	status = ath10k_check_fw_version(ar);
 	if (status)
 		goto err_disconnect_htc;
author
#2 lore raw

PATCH 2/2 ath10k: only warn about incompatible firmware versions

In reply to Kalle Valo

Most of the time it does more harm than good to halt the driver initialisation if the firmware version is not supported. For example, sometimes it's good to test something from older versions etc. So just change the check to a warning.

---
 drivers/net/wireless/ath/ath10k/core.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +4 -3
index a511aaf..475ca1a 100644
@@ -84,10 +84,11 @@ static int ath10k_check_fw_version(struct ath10k *ar)
 		 SUPPORTED_FW_MAJOR, SUPPORTED_FW_MINOR,
 		 SUPPORTED_FW_RELEASE, SUPPORTED_FW_BUILD);
 
-	ath10k_err("Firmware %s is not supported. Please use version %s (or newer)\n",
-		   ar->hw->wiphy->fw_version, version);
+	ath10k_warn("WARNING: Firmware version %s is not officially supported.\n",
+		    ar->hw->wiphy->fw_version);
+	ath10k_warn("Please upgrade to version %s (or newer)\n", version);
 
-	return -EINVAL;
+	return 0;
 }
 
 static int ath10k_init_connect_htc(struct ath10k *ar)
#3 lore raw

PATCH 2/2 ath10k: only warn about incompatible firmware versions

Quoted 18 lines · Kalle Valo

Most of the time it does more harm than good to halt the driver initialisation if the firmware version is not supported. For example, sometimes it's good to test something from older versions etc. So just change the check to a warning.

---
  drivers/net/wireless/ath/ath10k/core.c |    7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +0 -0
index a511aaf..475ca1a 100644
@@ -84,10 +84,11 @@ static int ath10k_check_fw_version(struct ath10k *ar)
  		 SUPPORTED_FW_MAJOR, SUPPORTED_FW_MINOR,
  		 SUPPORTED_FW_RELEASE, SUPPORTED_FW_BUILD);

drivers/net/wireless/ath/ath10k/core.c static int ath10k_check_fw_version(struct ath10k *ar) · line 92

Quoted 10 lines
drivers/net/wireless/ath/ath10k/core.c +4 -3
 
-	ath10k_err("Firmware %s is not supported. Please use version %s (or newer)\n",
-		   ar->hw->wiphy->fw_version, version);
+	ath10k_warn("WARNING: Firmware version %s is not officially supported.\n",
+		    ar->hw->wiphy->fw_version);
+	ath10k_warn("Please upgrade to version %s (or newer)\n", version);
 
-	return -EINVAL;
+	return 0;
  }

Perhaps we should also be taking the abi_version (from wmi_service_ready_event) into account. I'm not sure if FW really fills that one out though.

The "or newer" doesn't seem to suit here either. If new FW has ABI changes we're screwed.

-- Pozdrawiam / Best regards, Michal Kazior.

author
#4 lore raw

PATCH 2/2 ath10k: only warn about incompatible firmware versions

Quoted 9 lines · Michal Kazior
Quoted 8 lines · Kalle Valo

Most of the time it does more harm than good to halt the driver initialisation if the firmware version is not supported. For example, sometimes it's good to test something from older versions etc. So just change the check to a warning.

---

[...]

Quoted 6 lines
Quoted 6 lines
drivers/net/wireless/ath/ath10k/core.c +3 -2
-	ath10k_err("Firmware %s is not supported. Please use version %s (or newer)\n",
-		   ar->hw->wiphy->fw_version, version);
+	ath10k_warn("WARNING: Firmware version %s is not officially supported.\n",
+		    ar->hw->wiphy->fw_version);
+	ath10k_warn("Please upgrade to version %s (or newer)\n", version);
Quoted 7 lines

drivers/net/wireless/ath/ath10k/core.c static int ath10k_check_fw_version(struct ath10k *ar) · line 92

Quoted 3 lines
drivers/net/wireless/ath/ath10k/core.c +1 -1
-	return -EINVAL;
+	return 0;
  }

Perhaps we should also be taking the abi_version (from wmi_service_ready_event) into account. I'm not sure if FW really fills that one out though.

AFAIK the firmware team doesn't use the abi_version for anything.

Quoted 2 lines

The "or newer" doesn't seem to suit here either. If new FW has ABI changes we're screwed.

You are right but we need to revisit the firmware version handling anyway in the near future anyway so I'll just keep the warning as is for now.

Signature · 1 line
Kalle Valo
author Applied
#5 lore raw

cover ath10k: firmware version related changes

In reply to Kalle Valo
Quoted 7 lines · Kalle Valo

Few simple changes how we handle firmware versions.

---

Kalle Valo (2):
ath10k: print firmware version string during boot
ath10k: only warn about incompatible firmware versions

Applied.

Signature · 1 line
Kalle Valo