All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.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 09:03:30 +0200	[thread overview]
Message-ID: <87fvcq4o8t.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQ=MbCkF11QwqCGbtPm4veFKrUmN=3dQ_zK+APeWifCRPQ@mail.gmail.com> (Michal Kazior's message of "Mon, 8 Dec 2014 07:51:28 +0100")

Michal Kazior <michal.kazior@tieto.com> writes:

> 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.

Correct. I folded this change:

--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4786,7 +4786,8 @@ int ath10k_wmi_attach(struct ath10k *ar)
                ar->wmi.vdev_param = &wmi_vdev_param_map;
                ar->wmi.pdev_param = &wmi_pdev_param_map;
                break;
-       default:
+       case ATH10K_FW_WMI_OP_VERSION_UNSET:
+       case ATH10K_FW_WMI_OP_VERSION_MAX:
                ath10k_err(ar, "unsupported WMI op version: %d\n",
                           ar->wmi.op_version);
                return -EINVAL;

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.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 09:03:30 +0200	[thread overview]
Message-ID: <87fvcq4o8t.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQ=MbCkF11QwqCGbtPm4veFKrUmN=3dQ_zK+APeWifCRPQ@mail.gmail.com> (Michal Kazior's message of "Mon, 8 Dec 2014 07:51:28 +0100")

Michal Kazior <michal.kazior@tieto.com> writes:

> 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.

Correct. I folded this change:

--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -4786,7 +4786,8 @@ int ath10k_wmi_attach(struct ath10k *ar)
                ar->wmi.vdev_param = &wmi_vdev_param_map;
                ar->wmi.pdev_param = &wmi_pdev_param_map;
                break;
-       default:
+       case ATH10K_FW_WMI_OP_VERSION_UNSET:
+       case ATH10K_FW_WMI_OP_VERSION_MAX:
                ath10k_err(ar, "unsupported WMI op version: %d\n",
                           ar->wmi.op_version);
                return -EINVAL;

-- 
Kalle Valo

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

  reply	other threads:[~2014-12-08  7:03 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
2014-12-08  6:51     ` Michal Kazior
2014-12-08  7:03     ` Kalle Valo [this message]
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=87fvcq4o8t.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    --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.