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 v3 2/7] ath10k: add ATH10K_FW_IE_WMI_OP_VERSION
Date: Wed, 3 Dec 2014 08:32:09 +0200 [thread overview]
Message-ID: <87r3whjlau.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQm+JqCEXPQ4njxGvm-v_Typ0BDTK5g8627O_-gKiTWHZw@mail.gmail.com> (Michal Kazior's message of "Tue, 2 Dec 2014 12:51:58 +0100")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 1 December 2014 at 15:45, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> [...]
>> @@ -562,6 +562,17 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name)
>> ar->otp_len = ie_len;
>>
>> break;
>> + case ATH10K_FW_IE_WMI_OP_VERSION:
>> + if (ie_len != sizeof(u32))
>> + break;
>> +
>> + version = (__le32 *)data;
>> +
>> + ar->wmi.op_version = le32_to_cpup(version);
>> +
>> + ath10k_dbg(ar, ATH10K_DBG_BOOT, "found fw ie wmi op version %d\n",
>> + ar->wmi.op_version);
>
> Hmm.. wouldn't it make sense to have a ATH10K_FW_WMI_OP_VERSION_MAX
> (or _LAST) and verify if the IE value doesn't exceed the last known
> value? This way switch()es won't need default handler by design and
> thus we'll get the benefit of compiler telling us about unhandled
> cases when we add new enums.
A good idea, I'll add that.
--
Kalle Valo
WARNING: multiple messages have this Message-ID (diff)
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 v3 2/7] ath10k: add ATH10K_FW_IE_WMI_OP_VERSION
Date: Wed, 3 Dec 2014 08:32:09 +0200 [thread overview]
Message-ID: <87r3whjlau.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQm+JqCEXPQ4njxGvm-v_Typ0BDTK5g8627O_-gKiTWHZw@mail.gmail.com> (Michal Kazior's message of "Tue, 2 Dec 2014 12:51:58 +0100")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 1 December 2014 at 15:45, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> [...]
>> @@ -562,6 +562,17 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name)
>> ar->otp_len = ie_len;
>>
>> break;
>> + case ATH10K_FW_IE_WMI_OP_VERSION:
>> + if (ie_len != sizeof(u32))
>> + break;
>> +
>> + version = (__le32 *)data;
>> +
>> + ar->wmi.op_version = le32_to_cpup(version);
>> +
>> + ath10k_dbg(ar, ATH10K_DBG_BOOT, "found fw ie wmi op version %d\n",
>> + ar->wmi.op_version);
>
> Hmm.. wouldn't it make sense to have a ATH10K_FW_WMI_OP_VERSION_MAX
> (or _LAST) and verify if the IE value doesn't exceed the last known
> value? This way switch()es won't need default handler by design and
> thus we'll get the benefit of compiler telling us about unhandled
> cases when we add new enums.
A good idea, I'll add that.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2014-12-03 6:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 14:44 [PATCH v3 0/7] ath10k: add support for new wmi-tlv backend Kalle Valo
2014-12-01 14:44 ` Kalle Valo
2014-12-01 14:44 ` [PATCH v3 1/7] ath10k: create ath10k_core_init_features() Kalle Valo
2014-12-01 14:44 ` Kalle Valo
2014-12-02 6:58 ` Michal Kazior
2014-12-02 6:58 ` Michal Kazior
2014-12-02 7:09 ` Kalle Valo
2014-12-02 7:09 ` Kalle Valo
2014-12-01 14:45 ` [PATCH v3 2/7] ath10k: add ATH10K_FW_IE_WMI_OP_VERSION Kalle Valo
2014-12-01 14:45 ` Kalle Valo
2014-12-02 8:28 ` Michal Kazior
2014-12-02 8:28 ` Michal Kazior
2014-12-02 8:48 ` Kalle Valo
2014-12-02 8:48 ` Kalle Valo
2014-12-02 11:51 ` Michal Kazior
2014-12-02 11:51 ` Michal Kazior
2014-12-03 6:32 ` Kalle Valo [this message]
2014-12-03 6:32 ` Kalle Valo
2014-12-02 12:16 ` Michal Kazior
2014-12-02 12:16 ` Michal Kazior
2014-12-03 6:30 ` Kalle Valo
2014-12-03 6:30 ` Kalle Valo
2014-12-01 14:45 ` [PATCH v3 3/7] ath10k: set max_num_pending_tx in ath10k_core_init_firmware_features() Kalle Valo
2014-12-01 14:45 ` Kalle Valo
2014-12-01 14:45 ` [PATCH v3 4/7] ath10k: implement intermediate event args Kalle Valo
2014-12-01 14:45 ` Kalle Valo
2014-12-01 14:46 ` [PATCH v3 5/7] ath10k: introduce wmi ops Kalle Valo
2014-12-01 14:46 ` Kalle Valo
2014-12-01 14:46 ` [PATCH v3 6/7] ath10k: make some wmi functions public Kalle Valo
2014-12-01 14:46 ` Kalle Valo
2014-12-01 14:46 ` [PATCH v3 7/7] ath10k: implement wmi-tlv backend Kalle Valo
2014-12-01 14:46 ` Kalle Valo
2014-12-02 6:38 ` Michal Kazior
2014-12-02 6:38 ` Michal Kazior
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=87r3whjlau.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 \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.