aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-27 05:07:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commit1eee8d7aa0740a86c6109f181689be49e58175be (patch)
tree31c4d45852651e4789a1fecd0e8b401df79f31fe /src/compat/compat.h
parentblake2s: feed fpu functions PAGE_SIZE at a time (diff)
downloadwireguard-linux-compat-1eee8d7aa0740a86c6109f181689be49e58175be.tar.xz
wireguard-linux-compat-1eee8d7aa0740a86c6109f181689be49e58175be.zip
blake2s: rename arch function and use slicker le32 helper
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 17606f5..2e67edb 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -689,6 +689,13 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
+static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
+{
+ while (words--) {
+ __le32_to_cpus(buf);
+ buf++;
+ }
+}
static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
{
while (words--) {