ath10k: firmware version related changes
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(-)
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
@@ -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;
PATCH 2/2 ath10k: only warn about incompatible firmware versions
In reply to Kalle ValoMost 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
@@ -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)
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.
Signed-off-by Kalle Valo <[email protected]>--- drivers/net/wireless/ath/ath10k/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/net/wireless/ath/ath10k/core.c +0
-0@@ -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.
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.
Signed-off-by Kalle Valo <[email protected]>---
[...]
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(fromwmi_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
Kalle Valo
Appliedcover ath10k: firmware version related changes
In reply to Kalle ValoQuoted 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