Commit 9764a2af authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo

ath10k: put board size into hw_params

This makes it easier to extend the list of
supported hardware.
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7505f7c3
...@@ -54,6 +54,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -54,6 +54,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.fw = QCA988X_HW_2_0_FW_FILE, .fw = QCA988X_HW_2_0_FW_FILE,
.otp = QCA988X_HW_2_0_OTP_FILE, .otp = QCA988X_HW_2_0_OTP_FILE,
.board = QCA988X_HW_2_0_BOARD_DATA_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, ...@@ -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, static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
size_t data_len) size_t data_len)
{ {
u32 board_data_size = QCA988X_BOARD_DATA_SZ; u32 board_data_size = ar->hw_params.fw.board_size;
u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ; u32 board_ext_data_size = ar->hw_params.fw.board_ext_size;
u32 board_ext_data_addr; u32 board_ext_data_addr;
int ret; int ret;
...@@ -194,7 +196,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data, ...@@ -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, static int ath10k_download_board_data(struct ath10k *ar, const void *data,
size_t data_len) size_t data_len)
{ {
u32 board_data_size = QCA988X_BOARD_DATA_SZ; u32 board_data_size = ar->hw_params.fw.board_size;
u32 address; u32 address;
int ret; int ret;
......
...@@ -489,6 +489,8 @@ struct ath10k { ...@@ -489,6 +489,8 @@ struct ath10k {
const char *fw; const char *fw;
const char *otp; const char *otp;
const char *board; const char *board;
size_t board_size;
size_t board_ext_size;
} fw; } fw;
} hw_params; } hw_params;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment