diff options
| author | Benjamin Berg <benjamin.berg@intel.com> | 2026-03-26 12:14:33 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-04-07 15:36:02 +0200 |
| commit | b16df0dacb3a77d4c1ce95f21c58a2b99ae10213 (patch) | |
| tree | 353ff664a81eb41252b24e670d0be22d37e65445 /include/net | |
| parent | 8ea6b92faebe4bad0e271cb9a8d819b8955ed476 (diff) | |
| download | lwn-b16df0dacb3a77d4c1ce95f21c58a2b99ae10213.tar.gz lwn-b16df0dacb3a77d4c1ce95f21c58a2b99ae10213.zip | |
wifi: mac80211: export ieee80211_calculate_rx_timestamp
The function is quite useful when handling beacon timestamps. Export it
so that it can be used by mac80211_hwsim and others.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260326121156.a1abc9c52f37.Ieabfe66768b1bf64c3076d62e73c50794faeacdc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/mac80211.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b1c412eabf2b..8b513f777187 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -7394,6 +7394,24 @@ void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); int ieee80211_ave_rssi(struct ieee80211_vif *vif, int link_id); /** + * ieee80211_calculate_rx_timestamp - calculate timestamp in frame + * @hw: pointer as obtained from ieee80211_alloc_hw() + * @status: RX status + * @mpdu_len: total MPDU length (including FCS) + * @mpdu_offset: offset into MPDU to calculate timestamp at + * + * This function calculates the RX timestamp at the given MPDU offset, taking + * into account what the RX timestamp was. An offset of 0 will just normalize + * the timestamp to TSF at beginning of MPDU reception. + * + * Returns: the calculated timestamp + */ +u64 ieee80211_calculate_rx_timestamp(struct ieee80211_hw *hw, + struct ieee80211_rx_status *status, + unsigned int mpdu_len, + unsigned int mpdu_offset); + +/** * ieee80211_report_wowlan_wakeup - report WoWLAN wakeup * @vif: virtual interface * @wakeup: wakeup reason(s) |
