[PATCH v4 6/8] ath10k: introduce wmi ops
Michal Kazior
michal.kazior at tieto.com
Sun Dec 7 22:51:28 PST 2014
On 3 December 2014 at 09:10, Kalle Valo <kvalo at qca.qualcomm.com> wrote:
[...]
> int ath10k_wmi_attach(struct ath10k *ar)
> {
> - if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) {
> - if (test_bit(ATH10K_FW_FEATURE_WMI_10_2, ar->fw_features))
> - ar->wmi.cmd = &wmi_10_2_cmd_map;
> - else
> - ar->wmi.cmd = &wmi_10x_cmd_map;
> -
> + switch (ar->wmi.op_version) {
> + case ATH10K_FW_WMI_OP_VERSION_10_2:
> + ar->wmi.cmd = &wmi_10_2_cmd_map;
> + ar->wmi.ops = &wmi_10_2_ops;
> ar->wmi.vdev_param = &wmi_10x_vdev_param_map;
> ar->wmi.pdev_param = &wmi_10x_pdev_param_map;
> - } else {
> + break;
> + case ATH10K_FW_WMI_OP_VERSION_10_1:
> + ar->wmi.cmd = &wmi_10x_cmd_map;
> + ar->wmi.ops = &wmi_10_1_ops;
> + ar->wmi.vdev_param = &wmi_10x_vdev_param_map;
> + ar->wmi.pdev_param = &wmi_10x_pdev_param_map;
> + break;
> + case ATH10K_FW_WMI_OP_VERSION_MAIN:
> ar->wmi.cmd = &wmi_cmd_map;
> + ar->wmi.ops = &wmi_ops;
> ar->wmi.vdev_param = &wmi_vdev_param_map;
> ar->wmi.pdev_param = &wmi_pdev_param_map;
> + break;
> + default:
I think we don't need the `default` here now, do we? Instead _UNSET
and _MAX should be handled.
Michał
More information about the ath10k
mailing list