All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v4 6/8] ath10k: introduce wmi ops
Date: Mon, 8 Dec 2014 07:51:28 +0100	[thread overview]
Message-ID: <CA+BoTQ=MbCkF11QwqCGbtPm4veFKrUmN=3dQ_zK+APeWifCRPQ@mail.gmail.com> (raw)
In-Reply-To: <20141203081054.31187.10953.stgit@potku.adurom.net>

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

WARNING: multiple messages have this Message-ID
From: Michal Kazior <michal.kazior@tieto.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH v4 6/8] ath10k: introduce wmi ops
Date: Mon, 8 Dec 2014 07:51:28 +0100	[thread overview]
Message-ID: <CA+BoTQ=MbCkF11QwqCGbtPm4veFKrUmN=3dQ_zK+APeWifCRPQ@mail.gmail.com> (raw)
In-Reply-To: <20141203081054.31187.10953.stgit@potku.adurom.net>

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

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2014-12-08  6:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  8:09 [PATCH v4 0/8] ath10k: add support for new wmi-tlv backend Kalle Valo
2014-12-03  8:09 ` Kalle Valo
2014-12-03  8:09 ` [PATCH v4 1/8] ath10k: clean up error handling in ath10k_core_probe_fw() Kalle Valo
2014-12-03  8:09   ` Kalle Valo
2014-12-03  8:09 ` [PATCH v4 2/8] ath10k: create ath10k_core_init_features() Kalle Valo
2014-12-03  8:09   ` Kalle Valo
2014-12-03  8:10 ` [PATCH v4 3/8] ath10k: add ATH10K_FW_IE_WMI_OP_VERSION Kalle Valo
2014-12-03  8:10   ` Kalle Valo
2014-12-03  8:10 ` [PATCH v4 4/8] ath10k: set max_num_pending_tx in ath10k_core_init_firmware_features() Kalle Valo
2014-12-03  8:10   ` Kalle Valo
2014-12-03  8:10 ` [PATCH v4 5/8] ath10k: implement intermediate event args Kalle Valo
2014-12-03  8:10   ` Kalle Valo
2014-12-03  8:10 ` [PATCH v4 6/8] ath10k: introduce wmi ops Kalle Valo
2014-12-03  8:10   ` Kalle Valo
2014-12-03 12:59   ` Michal Kazior
2014-12-03 12:59     ` Michal Kazior
2014-12-08  6:58     ` Kalle Valo
2014-12-08  6:58       ` Kalle Valo
2014-12-08  6:51   ` Michal Kazior [this message]
2014-12-08  6:51     ` Michal Kazior
2014-12-08  7:03     ` Kalle Valo
2014-12-08  7:03       ` Kalle Valo
2014-12-03  8:11 ` [PATCH v4 7/8] ath10k: make some wmi functions public Kalle Valo
2014-12-03  8:11   ` Kalle Valo
2014-12-03  8:11 ` [PATCH v4 8/8] ath10k: implement wmi-tlv backend Kalle Valo
2014-12-03  8:11   ` Kalle Valo
2014-12-03 13:01   ` Michal Kazior
2014-12-03 13:01     ` Michal Kazior
2014-12-08  6:54     ` Kalle Valo
2014-12-08  6:54       ` Kalle Valo
2014-12-08 15:41 ` [PATCH v4 0/8] ath10k: add support for new " Kalle Valo
2014-12-08 15:41   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+BoTQ=MbCkF11QwqCGbtPm4veFKrUmN=3dQ_zK+APeWifCRPQ@mail.gmail.com' \
    --to=michal.kazior@tieto.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --subject='Re: [PATCH v4 6/8] ath10k: introduce wmi ops' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.