ath6kl: allow firmware to override firmware patch address
authorKalle Valo <kvalo@qca.qualcomm.com>
Tue, 27 Sep 2011 08:05:26 +0000 (11:05 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 27 Sep 2011 18:25:12 +0000 (21:25 +0300)
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>
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/init.c

index 82be42f5edc856c2544bf940e169bbf2d9cf6a9f..9ecf22bd4fc96a3cc8ec2ccf4d9ff3307316824f 100644 (file)
@@ -69,6 +69,7 @@ enum ath6kl_fw_ie_type {
        ATH6KL_FW_IE_PATCH_IMAGE = 4,
        ATH6KL_FW_IE_RESERVED_RAM_SIZE = 5,
        ATH6KL_FW_IE_CAPABILITIES = 6,
+       ATH6KL_FW_IE_PATCH_ADDR = 7,
 };
 
 enum ath6kl_fw_capability {
index 80c532d7f46d64a63faf24bc1fa452155292c926..e9785feeea17f1cbaaeca97661f28565a38040bb 100644 (file)
@@ -1000,6 +1000,13 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar)
                                        __set_bit(i, ar->fw_capabilities);
                        }
                        break;
+               case ATH6KL_FW_IE_PATCH_ADDR:
+                       if (ie_len != sizeof(*val))
+                               break;
+
+                       val = (__le32 *) data;
+                       ar->hw.dataset_patch_addr = le32_to_cpup(val);
+                       break;
                default:
                        ath6kl_dbg(ATH6KL_DBG_TRC, "Unknown fw ie: %u\n",
                                   le32_to_cpup(&hdr->id));