[PATCH v3 2/7] ath10k: add ATH10K_FW_IE_WMI_OP_VERSION

Michal Kazior michal.kazior at tieto.com
Tue Dec 2 04:16:33 PST 2014


On 1 December 2014 at 15:45, Kalle Valo <kvalo at qca.qualcomm.com> wrote:
[...]
> @@ -801,11 +812,24 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
>         }
>
>         if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
> -               ar->max_num_peers = TARGET_10X_NUM_PEERS;
> -               ar->max_num_stations = TARGET_10X_NUM_STATIONS;
> +               if (test_bit(ATH10K_FW_FEATURE_WMI_10_2, ar->fw_features))
> +                       ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_2;
> +               else
> +                       ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_10_1;
>         } else {
> +               ar->wmi.op_version = ATH10K_FW_WMI_OP_VERSION_MAIN;
> +       }

You always overwrite ar->wmi.op_version with MAIN if it's not 10.x
which means TLV is/wiil be effectively overwritten.

Perhaps the op_version enum values should start with 1 so that 0 can
be used as "unset" and only in that case should the above fallback be
attempted.


Also, I think it might be a good idea to reset ar->wmi.op_version in
ath10k_core_fetch_firmware_api_n (and api_1 as well) so that if any
attempt fails (e.g. due to IE binary corruption) ar->wmi.op_version
isn't propagated/left unchanged to another fw API attempt.


Michał



More information about the ath10k mailing list