Search Linux Wireless

Re: [PATCH v3 2/7] ath10k: add ATH10K_FW_IE_WMI_OP_VERSION

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1 December 2014 at 15:45, Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> 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ł
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux