Commit 4a16fbec authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by Kalle Valo

ath10k: add 10.2.4 firmware support

10.2.4 firmware uses bitmask in wmi_resource_config to configure
10.2 firmware features like airtime fairness and rx batch mode instead
of maintaining separete bool entry. This allows new features that can be
configure during init time without breaking backward compatibility.

kvalo: use WMI op version, bump up FW API to 4 to not break older versions of
ath10k
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent ffdd0757
...@@ -687,6 +687,13 @@ static int ath10k_core_fetch_firmware_files(struct ath10k *ar) ...@@ -687,6 +687,13 @@ static int ath10k_core_fetch_firmware_files(struct ath10k *ar)
/* calibration file is optional, don't check for any errors */ /* calibration file is optional, don't check for any errors */
ath10k_fetch_cal_file(ar); ath10k_fetch_cal_file(ar);
ar->fw_api = 4;
ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api);
ret = ath10k_core_fetch_firmware_api_n(ar, ATH10K_FW_API4_FILE);
if (ret == 0)
goto success;
ar->fw_api = 3; ar->fw_api = 3;
ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api); ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api);
...@@ -891,7 +898,8 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ...@@ -891,7 +898,8 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
*/ */
if (ar->wmi.op_version == ATH10K_FW_WMI_OP_VERSION_UNSET) { if (ar->wmi.op_version == ATH10K_FW_WMI_OP_VERSION_UNSET) {
if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) { if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
if (test_bit(ATH10K_FW_FEATURE_WMI_10_2, ar->fw_features)) if (test_bit(ATH10K_FW_FEATURE_WMI_10_2,
ar->fw_features))
ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_2; ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_2;
else else
ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_1; ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_1;
...@@ -909,6 +917,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ...@@ -909,6 +917,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
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:
ar->max_num_peers = TARGET_10X_NUM_PEERS; ar->max_num_peers = TARGET_10X_NUM_PEERS;
ar->max_num_stations = TARGET_10X_NUM_STATIONS; ar->max_num_stations = TARGET_10X_NUM_STATIONS;
ar->max_num_vdevs = TARGET_10X_NUM_VDEVS; ar->max_num_vdevs = TARGET_10X_NUM_VDEVS;
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
#define ATH10K_FW_API2_FILE "firmware-2.bin" #define ATH10K_FW_API2_FILE "firmware-2.bin"
#define ATH10K_FW_API3_FILE "firmware-3.bin" #define ATH10K_FW_API3_FILE "firmware-3.bin"
/* added support for ATH10K_FW_IE_WMI_OP_VERSION */
#define ATH10K_FW_API4_FILE "firmware-4.bin"
#define ATH10K_FW_UTF_FILE "utf.bin" #define ATH10K_FW_UTF_FILE "utf.bin"
/* includes also the null byte */ /* includes also the null byte */
...@@ -72,6 +75,7 @@ enum ath10k_fw_wmi_op_version { ...@@ -72,6 +75,7 @@ enum ath10k_fw_wmi_op_version {
ATH10K_FW_WMI_OP_VERSION_10_1 = 2, ATH10K_FW_WMI_OP_VERSION_10_1 = 2,
ATH10K_FW_WMI_OP_VERSION_10_2 = 3, ATH10K_FW_WMI_OP_VERSION_10_2 = 3,
ATH10K_FW_WMI_OP_VERSION_TLV = 4, ATH10K_FW_WMI_OP_VERSION_TLV = 4,
ATH10K_FW_WMI_OP_VERSION_10_2_4 = 5,
/* keep last */ /* keep last */
ATH10K_FW_WMI_OP_VERSION_MAX, ATH10K_FW_WMI_OP_VERSION_MAX,
......
...@@ -5139,6 +5139,7 @@ int ath10k_mac_register(struct ath10k *ar) ...@@ -5139,6 +5139,7 @@ int ath10k_mac_register(struct ath10k *ar)
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:
ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb; ar->hw->wiphy->iface_combinations = ath10k_10x_if_comb;
ar->hw->wiphy->n_iface_combinations = ar->hw->wiphy->n_iface_combinations =
ARRAY_SIZE(ath10k_10x_if_comb); ARRAY_SIZE(ath10k_10x_if_comb);
......
This diff is collapsed.
...@@ -1940,6 +1940,11 @@ struct wmi_resource_config_10x { ...@@ -1940,6 +1940,11 @@ struct wmi_resource_config_10x {
__le32 max_frag_entries; __le32 max_frag_entries;
} __packed; } __packed;
enum wmi_10_2_feature_mask {
WMI_10_2_RX_BATCH_MODE = BIT(0),
WMI_10_2_ATF_CONFIG = BIT(1),
};
struct wmi_resource_config_10_2 { struct wmi_resource_config_10_2 {
struct wmi_resource_config_10x common; struct wmi_resource_config_10x common;
__le32 max_peer_ext_stats; __le32 max_peer_ext_stats;
...@@ -1948,7 +1953,7 @@ struct wmi_resource_config_10_2 { ...@@ -1948,7 +1953,7 @@ struct wmi_resource_config_10_2 {
__le32 be_min_free; __le32 be_min_free;
__le32 vi_min_free; __le32 vi_min_free;
__le32 vo_min_free; __le32 vo_min_free;
__le32 rx_batchmode; /* 0-disable, 1-enable */ __le32 feature_mask;
} __packed; } __packed;
#define NUM_UNITS_IS_NUM_VDEVS 0x1 #define NUM_UNITS_IS_NUM_VDEVS 0x1
......
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