Commit 77561f93 authored by Kalle Valo's avatar Kalle Valo

ath10k: move htt_op_version to struct ath10k_fw_file

Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n().
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent bf3c13ab
...@@ -1117,10 +1117,10 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name, ...@@ -1117,10 +1117,10 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
version = (__le32 *)data; version = (__le32 *)data;
ar->htt.op_version = le32_to_cpup(version); fw_file->htt_op_version = le32_to_cpup(version);
ath10k_dbg(ar, ATH10K_DBG_BOOT, "found fw ie htt op version %d\n", ath10k_dbg(ar, ATH10K_DBG_BOOT, "found fw ie htt op version %d\n",
ar->htt.op_version); fw_file->htt_op_version);
break; break;
case ATH10K_FW_IE_FW_CODE_SWAP_IMAGE: case ATH10K_FW_IE_FW_CODE_SWAP_IMAGE:
ath10k_dbg(ar, ATH10K_DBG_BOOT, ath10k_dbg(ar, ATH10K_DBG_BOOT,
...@@ -1569,18 +1569,18 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ...@@ -1569,18 +1569,18 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
/* Backwards compatibility for firmwares without /* Backwards compatibility for firmwares without
* ATH10K_FW_IE_HTT_OP_VERSION. * ATH10K_FW_IE_HTT_OP_VERSION.
*/ */
if (ar->htt.op_version == ATH10K_FW_HTT_OP_VERSION_UNSET) { if (fw_file->htt_op_version == ATH10K_FW_HTT_OP_VERSION_UNSET) {
switch (fw_file->wmi_op_version) { switch (fw_file->wmi_op_version) {
case ATH10K_FW_WMI_OP_VERSION_MAIN: case ATH10K_FW_WMI_OP_VERSION_MAIN:
ar->htt.op_version = ATH10K_FW_HTT_OP_VERSION_MAIN; fw_file->htt_op_version = ATH10K_FW_HTT_OP_VERSION_MAIN;
break; break;
case ATH10K_FW_WMI_OP_VERSION_10_1: case ATH10K_FW_WMI_OP_VERSION_10_1:
case ATH10K_FW_WMI_OP_VERSION_10_2: case ATH10K_FW_WMI_OP_VERSION_10_2:
case ATH10K_FW_WMI_OP_VERSION_10_2_4: case ATH10K_FW_WMI_OP_VERSION_10_2_4:
ar->htt.op_version = ATH10K_FW_HTT_OP_VERSION_10_1; fw_file->htt_op_version = ATH10K_FW_HTT_OP_VERSION_10_1;
break; break;
case ATH10K_FW_WMI_OP_VERSION_TLV: case ATH10K_FW_WMI_OP_VERSION_TLV:
ar->htt.op_version = ATH10K_FW_HTT_OP_VERSION_TLV; fw_file->htt_op_version = ATH10K_FW_HTT_OP_VERSION_TLV;
break; break;
case ATH10K_FW_WMI_OP_VERSION_10_4: case ATH10K_FW_WMI_OP_VERSION_10_4:
case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_UNSET:
......
...@@ -634,6 +634,7 @@ struct ath10k_fw_file { ...@@ -634,6 +634,7 @@ struct ath10k_fw_file {
DECLARE_BITMAP(fw_features, ATH10K_FW_FEATURE_COUNT); DECLARE_BITMAP(fw_features, ATH10K_FW_FEATURE_COUNT);
enum ath10k_fw_wmi_op_version wmi_op_version; enum ath10k_fw_wmi_op_version wmi_op_version;
enum ath10k_fw_htt_op_version htt_op_version;
const void *firmware_data; const void *firmware_data;
size_t firmware_len; size_t firmware_len;
......
...@@ -179,7 +179,7 @@ void ath10k_debug_print_boot_info(struct ath10k *ar) ...@@ -179,7 +179,7 @@ void ath10k_debug_print_boot_info(struct ath10k *ar)
ar->htt.target_version_major, ar->htt.target_version_major,
ar->htt.target_version_minor, ar->htt.target_version_minor,
ar->normal_mode_fw.fw_file.wmi_op_version, ar->normal_mode_fw.fw_file.wmi_op_version,
ar->htt.op_version, ar->normal_mode_fw.fw_file.htt_op_version,
ath10k_cal_mode_str(ar->cal_mode), ath10k_cal_mode_str(ar->cal_mode),
ar->max_num_stations, ar->max_num_stations,
test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags), test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags),
......
...@@ -183,7 +183,7 @@ int ath10k_htt_init(struct ath10k *ar) ...@@ -183,7 +183,7 @@ int ath10k_htt_init(struct ath10k *ar)
8 + /* llc snap */ 8 + /* llc snap */
2; /* ip4 dscp or ip6 priority */ 2; /* ip4 dscp or ip6 priority */
switch (ar->htt.op_version) { switch (ar->running_fw->fw_file.htt_op_version) {
case ATH10K_FW_HTT_OP_VERSION_10_4: case ATH10K_FW_HTT_OP_VERSION_10_4:
ar->htt.t2h_msg_types = htt_10_4_t2h_msg_types; ar->htt.t2h_msg_types = htt_10_4_t2h_msg_types;
ar->htt.t2h_msg_types_max = HTT_10_4_T2H_NUM_MSGS; ar->htt.t2h_msg_types_max = HTT_10_4_T2H_NUM_MSGS;
......
...@@ -1562,7 +1562,6 @@ struct ath10k_htt { ...@@ -1562,7 +1562,6 @@ struct ath10k_htt {
u8 target_version_major; u8 target_version_major;
u8 target_version_minor; u8 target_version_minor;
struct completion target_version_received; struct completion target_version_received;
enum ath10k_fw_htt_op_version op_version;
u8 max_num_amsdu; u8 max_num_amsdu;
u8 max_num_ampdu; u8 max_num_ampdu;
......
...@@ -3359,7 +3359,7 @@ bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar) ...@@ -3359,7 +3359,7 @@ bool ath10k_mac_tx_frm_has_freq(struct ath10k *ar)
*/ */
return (ar->htt.target_version_major >= 3 && return (ar->htt.target_version_major >= 3 &&
ar->htt.target_version_minor >= 4 && ar->htt.target_version_minor >= 4 &&
ar->htt.op_version == ATH10K_FW_HTT_OP_VERSION_TLV); ar->running_fw->fw_file.htt_op_version == ATH10K_FW_HTT_OP_VERSION_TLV);
} }
static int ath10k_mac_tx_wmi_mgmt(struct ath10k *ar, struct sk_buff *skb) static int ath10k_mac_tx_wmi_mgmt(struct ath10k *ar, struct sk_buff *skb)
......
...@@ -284,6 +284,7 @@ static int ath10k_tm_fetch_utf_firmware_api_1(struct ath10k *ar, ...@@ -284,6 +284,7 @@ static int ath10k_tm_fetch_utf_firmware_api_1(struct ath10k *ar,
*/ */
fw_file->wmi_op_version = ATH10K_FW_WMI_OP_VERSION_10_1; fw_file->wmi_op_version = ATH10K_FW_WMI_OP_VERSION_10_1;
fw_file->htt_op_version = ATH10K_FW_HTT_OP_VERSION_10_1;
fw_file->firmware_data = fw_file->firmware->data; fw_file->firmware_data = fw_file->firmware->data;
fw_file->firmware_len = fw_file->firmware->size; fw_file->firmware_len = fw_file->firmware->size;
......
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