diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-09-27 04:05:26 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-09-27 14:25:12 -0400 |
commit | 1b4304da0adcc31727da3ee7f89dd180f4e65473 (patch) | |
tree | 2df7bbbf168664fd4a78e1f3f59fc6d0e806accd | |
parent | 00b1edf16960695d820607845797b14e6ed1a26c (diff) |
ath6kl: allow firmware to override firmware patch address
In some firmware versions their patch address has changed. If the firmware
provides one, use it to override the default address.
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 | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 82be42f5edc8..9ecf22bd4fc9 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -69,6 +69,7 @@ enum ath6kl_fw_ie_type { | |||
69 | ATH6KL_FW_IE_PATCH_IMAGE = 4, | 69 | ATH6KL_FW_IE_PATCH_IMAGE = 4, |
70 | ATH6KL_FW_IE_RESERVED_RAM_SIZE = 5, | 70 | ATH6KL_FW_IE_RESERVED_RAM_SIZE = 5, |
71 | ATH6KL_FW_IE_CAPABILITIES = 6, | 71 | ATH6KL_FW_IE_CAPABILITIES = 6, |
72 | ATH6KL_FW_IE_PATCH_ADDR = 7, | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | enum ath6kl_fw_capability { | 75 | enum ath6kl_fw_capability { |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 80c532d7f46d..e9785feeea17 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -1000,6 +1000,13 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar) | |||
1000 | __set_bit(i, ar->fw_capabilities); | 1000 | __set_bit(i, ar->fw_capabilities); |
1001 | } | 1001 | } |
1002 | break; | 1002 | break; |
1003 | case ATH6KL_FW_IE_PATCH_ADDR: | ||
1004 | if (ie_len != sizeof(*val)) | ||
1005 | break; | ||
1006 | |||
1007 | val = (__le32 *) data; | ||
1008 | ar->hw.dataset_patch_addr = le32_to_cpup(val); | ||
1009 | break; | ||
1003 | default: | 1010 | default: |
1004 | ath6kl_dbg(ATH6KL_DBG_TRC, "Unknown fw ie: %u\n", | 1011 | ath6kl_dbg(ATH6KL_DBG_TRC, "Unknown fw ie: %u\n", |
1005 | le32_to_cpup(&hdr->id)); | 1012 | le32_to_cpup(&hdr->id)); |