From: "Valo, Kalle" <kvalo@qca.qualcomm.com>
To: Mohammed Shafi Shajakhan <mohammed@codeaurora.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
"Shajakhan,
Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>
Subject: Re: [PATCH v2] ath10k: Fix 10.4 extended peer stats update
Date: Tue, 31 May 2016 18:57:52 +0000 [thread overview]
Message-ID: <87r3cicaxi.fsf@qca.qualcomm.com> (raw)
In-Reply-To: <20160531133700.GB3146@atheros-ThinkPad-T61> (Mohammed Shafi Shajakhan's message of "Tue, 31 May 2016 19:07:00 +0530")
Mohammed Shafi Shajakhan <mohammed@codeaurora.org> writes:
>> > +void ath10k_sta_update_rx_duration(struct ath10k *ar,
>> > + struct ath10k_fw_stats *stats)
>> > +{
>> > + struct ath10k_fw_file *fw_file = &ar->normal_mode_fw.fw_file;
>> > +
>> > + if (fw_file->wmi_op_version < ATH10K_FW_WMI_OP_VERSION_10_4)
>> > + ath10k_sta_update_stats_rx_duration(ar, &stats->peers);
>> > + else
>> > + ath10k_sta_update_extd_stats_rx_duration(ar,
>> > + &stats->peers_extd);
>> > +}
>>
>> _Ideally_ wmi_op_version should be used only in ath10k_wmi_attach() and
>> nowhere else. Isn't there any other way to detect this scenario? For
>> example, what if you store stats_id to struct ath10k_fw_stats and do
>> something like this:
>>
>> if (stats->stats_id & WMI_10_4_STAT_PEER_EXTD)
>> ath10k_sta_update_extd_stats_rx_duration(ar,
>> &stats->peers_extd);
>> else
>> ath10k_sta_update_stats_rx_duration(ar, &stats->peers);
>>
>> Would that work?
>
> [shafi] I am also thinking to re-use (ar->fw_stats_req_mask & WMI_10_4_STAT_PEER_EXTD)
> it might work, but will it conflict vdev stats WMI_STAT_VDEV (though its not currently
> supported for 10.2 )
Can you describe more how they conflict?
> let me know your thoughts about this, seems extended stats was
> implemented for 10.4 wmi version so i made it explicit
I don't like hard coding features like this based on wmi_op_version as
that might create problems managing the firmware interfaces in the
future. The simplest is if we can automatically runtime detect if
firmware uses the extended version or not.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: "Valo, Kalle" <kvalo@qca.qualcomm.com>
To: Mohammed Shafi Shajakhan <mohammed@codeaurora.org>
Cc: "Shajakhan,
Mohammed Shafi (Mohammed Shafi)" <mohammed@qti.qualcomm.com>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] ath10k: Fix 10.4 extended peer stats update
Date: Tue, 31 May 2016 18:57:52 +0000 [thread overview]
Message-ID: <87r3cicaxi.fsf@qca.qualcomm.com> (raw)
In-Reply-To: <20160531133700.GB3146@atheros-ThinkPad-T61> (Mohammed Shafi Shajakhan's message of "Tue, 31 May 2016 19:07:00 +0530")
Mohammed Shafi Shajakhan <mohammed@codeaurora.org> writes:
>> > +void ath10k_sta_update_rx_duration(struct ath10k *ar,
>> > + struct ath10k_fw_stats *stats)
>> > +{
>> > + struct ath10k_fw_file *fw_file = &ar->normal_mode_fw.fw_file;
>> > +
>> > + if (fw_file->wmi_op_version < ATH10K_FW_WMI_OP_VERSION_10_4)
>> > + ath10k_sta_update_stats_rx_duration(ar, &stats->peers);
>> > + else
>> > + ath10k_sta_update_extd_stats_rx_duration(ar,
>> > + &stats->peers_extd);
>> > +}
>>
>> _Ideally_ wmi_op_version should be used only in ath10k_wmi_attach() and
>> nowhere else. Isn't there any other way to detect this scenario? For
>> example, what if you store stats_id to struct ath10k_fw_stats and do
>> something like this:
>>
>> if (stats->stats_id & WMI_10_4_STAT_PEER_EXTD)
>> ath10k_sta_update_extd_stats_rx_duration(ar,
>> &stats->peers_extd);
>> else
>> ath10k_sta_update_stats_rx_duration(ar, &stats->peers);
>>
>> Would that work?
>
> [shafi] I am also thinking to re-use (ar->fw_stats_req_mask & WMI_10_4_STAT_PEER_EXTD)
> it might work, but will it conflict vdev stats WMI_STAT_VDEV (though its not currently
> supported for 10.2 )
Can you describe more how they conflict?
> let me know your thoughts about this, seems extended stats was
> implemented for 10.4 wmi version so i made it explicit
I don't like hard coding features like this based on wmi_op_version as
that might create problems managing the firmware interfaces in the
future. The simplest is if we can automatically runtime detect if
firmware uses the extended version or not.
--
Kalle Valo
next prev parent reply other threads:[~2016-05-31 18:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 9:05 [PATCH v2] ath10k: Fix 10.4 extended peer stats update Mohammed Shafi Shajakhan
2016-05-27 9:05 ` Mohammed Shafi Shajakhan
2016-05-31 12:18 ` Valo, Kalle
2016-05-31 12:18 ` Valo, Kalle
2016-05-31 13:37 ` Mohammed Shafi Shajakhan
2016-05-31 13:37 ` Mohammed Shafi Shajakhan
2016-05-31 18:57 ` Valo, Kalle [this message]
2016-05-31 18:57 ` Valo, Kalle
2016-06-01 9:08 ` Mohammed Shafi Shajakhan
2016-06-01 9:08 ` Mohammed Shafi Shajakhan
2016-06-01 13:00 ` Valo, Kalle
2016-06-01 13:00 ` Valo, Kalle
2016-06-01 15:12 ` Mohammed Shafi Shajakhan
2016-06-01 15:12 ` Mohammed Shafi Shajakhan
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=87r3cicaxi.fsf@qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mohammed@codeaurora.org \
--cc=mohammed@qti.qualcomm.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.