ath6kl: add firmware IE for board data address
authorKalle Valo <kvalo@qca.qualcomm.com>
Mon, 14 Nov 2011 17:30:47 +0000 (19:30 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 16 Nov 2011 08:22:33 +0000 (10:22 +0200)
Board data address can change between firmwares so we need to read that
from the firmware image.

Also fix debug log for the patch address to print the address in hex.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/init.c

index 83167be882e9de6b98108cc4558db0c9a07611f9..6227f116dbe0f7e6ea3ea71b647d7f5dc95e867e 100644 (file)
@@ -70,6 +70,7 @@ enum ath6kl_fw_ie_type {
        ATH6KL_FW_IE_RESERVED_RAM_SIZE = 5,
        ATH6KL_FW_IE_CAPABILITIES = 6,
        ATH6KL_FW_IE_PATCH_ADDR = 7,
+       ATH6KL_FW_IE_BOARD_ADDR = 8,
 };
 
 enum ath6kl_fw_capability {
index bed468d3208bfc10bc56f2bf4f3415f22352ab55..0b0ae5ed280f77b2fb88c8b11fb8bb5ced574325 100644 (file)
@@ -976,9 +976,20 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar)
                        ar->hw.dataset_patch_addr = le32_to_cpup(val);
 
                        ath6kl_dbg(ATH6KL_DBG_BOOT,
-                                  "found patch address ie 0x%d\n",
+                                  "found patch address ie 0x%x\n",
                                   ar->hw.dataset_patch_addr);
                        break;
+               case ATH6KL_FW_IE_BOARD_ADDR:
+                       if (ie_len != sizeof(*val))
+                               break;
+
+                       val = (__le32 *) data;
+                       ar->hw.board_addr = le32_to_cpup(val);
+
+                       ath6kl_dbg(ATH6KL_DBG_BOOT,
+                                  "found board address ie 0x%x\n",
+                                  ar->hw.board_addr);
+                       break;
                default:
                        ath6kl_dbg(ATH6KL_DBG_BOOT, "Unknown fw ie: %u\n",
                                   le32_to_cpup(&hdr->id));