Search Linux Wireless

Re: [PATCH v4 6/8] ath10k: introduce wmi ops

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

 



On 3 December 2014 at 09:10, Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> 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ł
--
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