On 26 February 2016 at 20:03, Peter Oh <poh@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx> > --- [...] > + 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. I think this can be represented with a mere __le64 and then accessed via le64_to_cpu(). Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html