diff options
author | Naveen Singh <navesing@qca.qualcomm.com> | 2012-06-07 03:44:02 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-06-11 09:18:03 -0400 |
commit | b5b6f6a9a07ac230d54a85a9fb9e691c85f2eb0a (patch) | |
tree | 578d71b2c8bc64d2eba660faae24e11f3502f564 /drivers/net/wireless/ath/ath6kl | |
parent | 7940bad50859026c0f11d2b7766571175b5e55c3 (diff) |
ath6kl: use firmware version from FW IE
Need to have different FW versioning for different FW binaries.
This is handled by appending different meta data in firmware
binaries.
kvalo: add an empty line before a debug message, use '0' instead of '0x00',
fix indentation
Signed-off-by: Naveen Singh <navesing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 22 |
2 files changed, 21 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index daf24ee9d28a..62e25ccd1016 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -943,6 +943,14 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name) | |||
943 | } | 943 | } |
944 | 944 | ||
945 | switch (ie_id) { | 945 | switch (ie_id) { |
946 | case ATH6KL_FW_IE_FW_VERSION: | ||
947 | strlcpy(ar->wiphy->fw_version, data, | ||
948 | sizeof(ar->wiphy->fw_version)); | ||
949 | |||
950 | ath6kl_dbg(ATH6KL_DBG_BOOT, | ||
951 | "found fw version %s\n", | ||
952 | ar->wiphy->fw_version); | ||
953 | break; | ||
946 | case ATH6KL_FW_IE_OTP_IMAGE: | 954 | case ATH6KL_FW_IE_OTP_IMAGE: |
947 | ath6kl_dbg(ATH6KL_DBG_BOOT, "found otp image ie (%zd B)\n", | 955 | ath6kl_dbg(ATH6KL_DBG_BOOT, "found otp image ie (%zd B)\n", |
948 | ie_len); | 956 | ie_len); |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 3e6768ae80af..45621baca24a 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -554,20 +554,24 @@ void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver, | |||
554 | struct ath6kl *ar = devt; | 554 | struct ath6kl *ar = devt; |
555 | 555 | ||
556 | memcpy(ar->mac_addr, datap, ETH_ALEN); | 556 | memcpy(ar->mac_addr, datap, ETH_ALEN); |
557 | ath6kl_dbg(ATH6KL_DBG_TRC, "%s: mac addr = %pM\n", | 557 | |
558 | __func__, ar->mac_addr); | 558 | ath6kl_dbg(ATH6KL_DBG_BOOT, |
559 | "ready event mac addr %pM sw_ver 0x%x abi_ver 0x%x cap 0x%x\n", | ||
560 | ar->mac_addr, sw_ver, abi_ver, cap); | ||
559 | 561 | ||
560 | ar->version.wlan_ver = sw_ver; | 562 | ar->version.wlan_ver = sw_ver; |
561 | ar->version.abi_ver = abi_ver; | 563 | ar->version.abi_ver = abi_ver; |
562 | ar->hw.cap = cap; | 564 | ar->hw.cap = cap; |
563 | 565 | ||
564 | snprintf(ar->wiphy->fw_version, | 566 | if (strlen(ar->wiphy->fw_version) == 0) { |
565 | sizeof(ar->wiphy->fw_version), | 567 | snprintf(ar->wiphy->fw_version, |
566 | "%u.%u.%u.%u", | 568 | sizeof(ar->wiphy->fw_version), |
567 | (ar->version.wlan_ver & 0xf0000000) >> 28, | 569 | "%u.%u.%u.%u", |
568 | (ar->version.wlan_ver & 0x0f000000) >> 24, | 570 | (ar->version.wlan_ver & 0xf0000000) >> 28, |
569 | (ar->version.wlan_ver & 0x00ff0000) >> 16, | 571 | (ar->version.wlan_ver & 0x0f000000) >> 24, |
570 | (ar->version.wlan_ver & 0x0000ffff)); | 572 | (ar->version.wlan_ver & 0x00ff0000) >> 16, |
573 | (ar->version.wlan_ver & 0x0000ffff)); | ||
574 | } | ||
571 | 575 | ||
572 | /* indicate to the waiting thread that the ready event was received */ | 576 | /* indicate to the waiting thread that the ready event was received */ |
573 | set_bit(WMI_READY, &ar->flag); | 577 | set_bit(WMI_READY, &ar->flag); |