From bf491a72a41c8f0f62f760d993f37fd3e98ae668 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 13 Jun 2023 08:59:26 +0900 Subject: [PATCH] ODROID: Remove some redefined variables. in net/wireguard/compat/compat.h Change-Id: If0bbcca4cd24a08078a5163db1ecaa05ceee0442 --- net/wireguard/compat/compat.h | 45 ----------------------------------- 1 file changed, 45 deletions(-) diff --git a/net/wireguard/compat/compat.h b/net/wireguard/compat/compat.h index cf5b3fe915d0..8226e8fffee2 100644 --- a/net/wireguard/compat/compat.h +++ b/net/wireguard/compat/compat.h @@ -281,51 +281,6 @@ static const struct in6_addr __compat_in6addr_any = IN6ADDR_ANY_INIT; #define in6addr_any __compat_in6addr_any #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) -#include -#include -#include -struct rng_initializer { - struct completion done; - struct random_ready_callback cb; -}; -static inline void rng_initialized_callback(struct random_ready_callback *cb) -{ - complete(&container_of(cb, struct rng_initializer, cb)->done); -} -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) -/* This is a disaster. Without this API, we really have no way of - * knowing if it's initialized. We just return that it has and hope - * for the best... */ -static inline int wait_for_random_bytes(void) -{ - return 0; -} -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) && !defined(ISRHEL8) -#include -#include -struct rng_is_initialized_callback { - struct random_ready_callback cb; - atomic_t *rng_state; -}; -static inline void rng_is_initialized_callback(struct random_ready_callback *cb) -{ - struct rng_is_initialized_callback *rdy = container_of(cb, struct rng_is_initialized_callback, cb); - atomic_set(rdy->rng_state, 2); - kfree(rdy); -} -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) -/* This is a disaster. Without this API, we really have no way of - * knowing if it's initialized. We just return that it has and hope - * for the best... */ -static inline bool rng_is_initialized(void) -{ - return true; -} -#endif - #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) && !defined(ISRHEL7) #define system_power_efficient_wq system_unbound_wq #endif