From: Peter Oh <poh@codeaurora.org>
To: Michal Kazior <michal.kazior@tieto.com>, Peter Oh <poh@qca.qualcomm.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
ath10k@lists.infradead.org
Subject: Re: [PATCH v5] ath10k: set MAC timestamp in management Rx frame
Date: Tue, 01 Mar 2016 09:54:43 -0800 [thread overview]
Message-ID: <56D5D763.5070709@codeaurora.org> (raw)
In-Reply-To: <CA+BoTQkCwSkARQKWcjkJri9xS6GGiHq4NwjOoewqtHOetjevGw@mail.gmail.com>
On 02/29/2016 10:33 AM, Michal Kazior wrote:
> On 26 February 2016 at 20:03, Peter Oh <poh@qca.qualcomm.com> wrote:
>> Check and set Rx MAC timestamp when firmware indicates it.
>> Firmware adds it in Rx beacon frame only at this moment.
>> Driver and mac80211 may utilize it to detect such clockdrift
>> or beacon collision and use the result for beacon collision
>> avoidance.
>>
>> Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
>> ---
> [...]
>> + if (rx_status & WMI_RX_STATUS_EXT_INFO) {
>> + status->mactime =
>> + __le32_to_cpu(arg.ext_info.rx_mac_timestamp_l32) |
>> +
>> (u64)__le32_to_cpu(arg.ext_info.rx_mac_timestamp_u32)
>> + << 32;
>> + status->flag |= RX_FLAG_MACTIME_END;
>> + }
>> /* Hardware can Rx CCK rates on 5GHz. In that case phy_mode is set
>> to
>> * MODE_11B. This means phy_mode is not a reliable source for the
>> band
>> * of mgmt rx.
>> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h
>> b/drivers/net/wireless/ath/ath10k/wmi.h
>> index 4d3cbc4..f209d51 100644
>> --- a/drivers/net/wireless/ath/ath10k/wmi.h
>> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
>> @@ -3037,11 +3037,18 @@ struct wmi_10_4_mgmt_rx_event {
>> u8 buf[0];
>> } __packed;
>>
>> +struct wmi_mgmt_rx_ext_info {
>> + __le32 rx_mac_timestamp_l32;
>> + __le32 rx_mac_timestamp_u32;
> Oh.. I feel bad for noticing this so late.
review is always appreciated.
> I think this can be
> represented with a mere __le64 and then accessed via le64_to_cpu().
sent new patch based on your comment.
Thanks,
Peter
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Peter Oh <poh@codeaurora.org>
To: Michal Kazior <michal.kazior@tieto.com>, Peter Oh <poh@qca.qualcomm.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
ath10k@lists.infradead.org
Subject: Re: [PATCH v5] ath10k: set MAC timestamp in management Rx frame
Date: Tue, 01 Mar 2016 09:54:43 -0800 [thread overview]
Message-ID: <56D5D763.5070709@codeaurora.org> (raw)
In-Reply-To: <CA+BoTQkCwSkARQKWcjkJri9xS6GGiHq4NwjOoewqtHOetjevGw@mail.gmail.com>
On 02/29/2016 10:33 AM, Michal Kazior wrote:
> On 26 February 2016 at 20:03, Peter Oh <poh@qca.qualcomm.com> wrote:
>> Check and set Rx MAC timestamp when firmware indicates it.
>> Firmware adds it in Rx beacon frame only at this moment.
>> Driver and mac80211 may utilize it to detect such clockdrift
>> or beacon collision and use the result for beacon collision
>> avoidance.
>>
>> Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
>> ---
> [...]
>> + if (rx_status & WMI_RX_STATUS_EXT_INFO) {
>> + status->mactime =
>> + __le32_to_cpu(arg.ext_info.rx_mac_timestamp_l32) |
>> +
>> (u64)__le32_to_cpu(arg.ext_info.rx_mac_timestamp_u32)
>> + << 32;
>> + status->flag |= RX_FLAG_MACTIME_END;
>> + }
>> /* Hardware can Rx CCK rates on 5GHz. In that case phy_mode is set
>> to
>> * MODE_11B. This means phy_mode is not a reliable source for the
>> band
>> * of mgmt rx.
>> diff --git a/drivers/net/wireless/ath/ath10k/wmi.h
>> b/drivers/net/wireless/ath/ath10k/wmi.h
>> index 4d3cbc4..f209d51 100644
>> --- a/drivers/net/wireless/ath/ath10k/wmi.h
>> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
>> @@ -3037,11 +3037,18 @@ struct wmi_10_4_mgmt_rx_event {
>> u8 buf[0];
>> } __packed;
>>
>> +struct wmi_mgmt_rx_ext_info {
>> + __le32 rx_mac_timestamp_l32;
>> + __le32 rx_mac_timestamp_u32;
> Oh.. I feel bad for noticing this so late.
review is always appreciated.
> I think this can be
> represented with a mere __le64 and then accessed via le64_to_cpu().
sent new patch based on your comment.
Thanks,
Peter
next prev parent reply other threads:[~2016-03-01 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 19:03 [PATCH v5] ath10k: set MAC timestamp in management Rx frame Peter Oh
2016-02-26 19:03 ` Peter Oh
2016-02-29 18:33 ` Michal Kazior
2016-02-29 18:33 ` Michal Kazior
2016-03-01 17:54 ` Peter Oh [this message]
2016-03-01 17:54 ` Peter Oh
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=56D5D763.5070709@codeaurora.org \
--to=poh@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=poh@qca.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.