Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
|
*/
|
|
|
|
#ifndef _WG_TIMERS_H
|
|
#define _WG_TIMERS_H
|
|
|
|
#include <linux/ktime.h>
|
|
|
|
struct wg_peer;
|
|
|
|
void wg_timers_init(struct wg_peer *peer);
|
|
void wg_timers_stop(struct wg_peer *peer);
|
|
void wg_timers_data_sent(struct wg_peer *peer);
|
|
void wg_timers_data_received(struct wg_peer *peer);
|
|
void wg_timers_any_authenticated_packet_sent(struct wg_peer *peer);
|
|
void wg_timers_any_authenticated_packet_received(struct wg_peer *peer);
|
|
void wg_timers_handshake_initiated(struct wg_peer *peer);
|
|
void wg_timers_handshake_complete(struct wg_peer *peer);
|
|
void wg_timers_session_derived(struct wg_peer *peer);
|
|
void wg_timers_any_authenticated_packet_traversal(struct wg_peer *peer);
|
|
|
|
static inline bool wg_birthdate_has_expired(u64 birthday_nanoseconds,
|
|
u64 expiration_seconds)
|
|
{
|
|
return (s64)(birthday_nanoseconds + expiration_seconds * NSEC_PER_SEC)
|
|
<= (s64)ktime_get_coarse_boottime_ns();
|
|
}
|
|
|
|
#endif /* _WG_TIMERS_H */
|