diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-09-07 03:55:17 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-09-16 11:48:34 -0400 |
commit | 8a13748034e93b4134455ebf51e2fada8eb00aca (patch) | |
tree | 1058c2afee2b9e8e14780781e08878c57ef7ae9b | |
parent | 639d0b8996aa5913402b846932d57a51a23a40c9 (diff) |
ath6kl: read reserved ram size from firmware file
A new version of firmware needs different reserved ram size so read that
from the firmware image.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 3365dc8bab3b..abb4aaf48c08 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -67,6 +67,7 @@ enum ath6kl_fw_ie_type { | |||
67 | ATH6KL_FW_IE_OTP_IMAGE = 2, | 67 | ATH6KL_FW_IE_OTP_IMAGE = 2, |
68 | ATH6KL_FW_IE_FW_IMAGE = 3, | 68 | ATH6KL_FW_IE_FW_IMAGE = 3, |
69 | ATH6KL_FW_IE_PATCH_IMAGE = 4, | 69 | ATH6KL_FW_IE_PATCH_IMAGE = 4, |
70 | ATH6KL_FW_IE_RESERVED_RAM_SIZE = 5, | ||
70 | }; | 71 | }; |
71 | 72 | ||
72 | struct ath6kl_fw_ie { | 73 | struct ath6kl_fw_ie { |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 5865466e884c..e2a29b25884c 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -902,6 +902,7 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar) | |||
902 | const char *filename; | 902 | const char *filename; |
903 | const u8 *data; | 903 | const u8 *data; |
904 | int ret, ie_id; | 904 | int ret, ie_id; |
905 | __le32 *val; | ||
905 | 906 | ||
906 | switch (ar->version.target_ver) { | 907 | switch (ar->version.target_ver) { |
907 | case AR6003_REV2_VERSION: | 908 | case AR6003_REV2_VERSION: |
@@ -987,6 +988,10 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar) | |||
987 | 988 | ||
988 | ar->fw_patch_len = ie_len; | 989 | ar->fw_patch_len = ie_len; |
989 | break; | 990 | break; |
991 | case ATH6KL_FW_IE_RESERVED_RAM_SIZE: | ||
992 | val = (__le32 *) data; | ||
993 | ar->hw.reserved_ram_size = le32_to_cpup(val); | ||
994 | break; | ||
990 | default: | 995 | default: |
991 | ath6kl_dbg(ATH6KL_DBG_TRC, "Unknown fw ie: %u\n", | 996 | ath6kl_dbg(ATH6KL_DBG_TRC, "Unknown fw ie: %u\n", |
992 | le32_to_cpup(&hdr->id)); | 997 | le32_to_cpup(&hdr->id)); |