summaryrefslogtreecommitdiffstatshomepage
path: root/src/device.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-06-21 19:55:04 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-06-24 02:06:26 +0200
commit152f93e06d82a9c9d35ee74f216728bc10419415 (patch)
tree3316a8f3ff7b99bb869faa391e392a9b0618d485 /src/device.h
parentdevice: netdevice destruction logic change for 4.12 (diff)
downloadwireguard-monolithic-historical-152f93e06d82a9c9d35ee74f216728bc10419415.tar.xz
wireguard-monolithic-historical-152f93e06d82a9c9d35ee74f216728bc10419415.zip
device: only use one sleep notifier
This greatly improves performance when adding and removing interfaces, since the power registration function does a linear search each time.
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/device.h b/src/device.h
index f443191..5ba2c5d 100644
--- a/src/device.h
+++ b/src/device.h
@@ -14,7 +14,6 @@
#include <linux/mutex.h>
#include <linux/net.h>
#include <linux/padata.h>
-#include <linux/notifier.h>
struct wireguard_device;
struct handshake_worker {
@@ -23,6 +22,7 @@ struct handshake_worker {
};
struct wireguard_device {
+ struct list_head device_list;
struct sock __rcu *sock4, *sock6;
u16 incoming_port;
u32 fwmark;
@@ -39,9 +39,6 @@ struct wireguard_device {
struct list_head peer_list;
struct mutex device_update_lock;
struct mutex socket_update_lock;
-#ifdef CONFIG_PM_SLEEP
- struct notifier_block clear_peers_on_suspend;
-#endif
#ifdef CONFIG_WIREGUARD_PARALLEL
struct workqueue_struct *crypt_wq;
struct padata_instance *encrypt_pd, *decrypt_pd;