ath10k: put board size into hw_params
authorMichal Kazior <michal.kazior@tieto.com>
Tue, 2 Dec 2014 08:55:54 +0000 (10:55 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 8 Dec 2014 15:34:41 +0000 (17:34 +0200)
This makes it easier to extend the list of
supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h

index 3a299fc8be88691599a8873a2615d0a7b61cc5a9..e038e3e449717ea4f7219601a1d3ac1d6a0fbfdc 100644 (file)
@@ -54,6 +54,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
                        .fw = QCA988X_HW_2_0_FW_FILE,
                        .otp = QCA988X_HW_2_0_OTP_FILE,
                        .board = QCA988X_HW_2_0_BOARD_DATA_FILE,
+                       .board_size = QCA988X_BOARD_DATA_SZ,
+                       .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
                },
        },
 };
@@ -147,8 +149,8 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
 static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
                                      size_t data_len)
 {
-       u32 board_data_size = QCA988X_BOARD_DATA_SZ;
-       u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ;
+       u32 board_data_size = ar->hw_params.fw.board_size;
+       u32 board_ext_data_size = ar->hw_params.fw.board_ext_size;
        u32 board_ext_data_addr;
        int ret;
 
@@ -194,7 +196,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 static int ath10k_download_board_data(struct ath10k *ar, const void *data,
                                      size_t data_len)
 {
-       u32 board_data_size = QCA988X_BOARD_DATA_SZ;
+       u32 board_data_size = ar->hw_params.fw.board_size;
        u32 address;
        int ret;
 
index 69f78bf88023be3d77354243146e739dc54928e9..2de5a0c6d7254a65796da3ba335b12c9615ff36c 100644 (file)
@@ -489,6 +489,8 @@ struct ath10k {
                        const char *fw;
                        const char *otp;
                        const char *board;
+                       size_t board_size;
+                       size_t board_ext_size;
                } fw;
        } hw_params;
 
This page took 0.027626 seconds and 5 git commands to generate.