Home
last modified time | relevance | path

Searched refs:wg (Results 1 - 25 of 44) sorted by relevance

12

/kernel/linux/linux-6.6/drivers/net/wireguard/
H A Ddevice.c35 struct wg_device *wg = netdev_priv(dev); in wg_open() local
50 mutex_lock(&wg->device_update_lock); in wg_open()
51 ret = wg_socket_init(wg, wg->incoming_port); in wg_open()
54 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_open()
60 mutex_unlock(&wg->device_update_lock); in wg_open()
66 struct wg_device *wg; in wg_pm_notification() local
81 list_for_each_entry(wg, &device_list, device_list) { in wg_pm_notification()
82 mutex_lock(&wg->device_update_lock); in wg_pm_notification()
83 list_for_each_entry(peer, &wg in wg_pm_notification()
99 struct wg_device *wg; wg_vm_notification() local
117 struct wg_device *wg = netdev_priv(dev); wg_stop() local
139 struct wg_device *wg = netdev_priv(dev); wg_xmit() local
245 struct wg_device *wg = netdev_priv(dev); wg_destruct() local
278 struct wg_device *wg = netdev_priv(dev); wg_setup() local
314 struct wg_device *wg = netdev_priv(dev); wg_newlink() local
418 struct wg_device *wg; wg_netns_pre_exit() local
[all...]
H A Dnetlink.c97 struct wg_device *wg; member
201 struct wg_device *wg; in wg_get_device_start() local
203 wg = lookup_interface(genl_info_dump(cb)->attrs, cb->skb); in wg_get_device_start()
204 if (IS_ERR(wg)) in wg_get_device_start()
205 return PTR_ERR(wg); in wg_get_device_start()
206 DUMP_CTX(cb)->wg = wg; in wg_get_device_start()
214 struct wg_device *wg = ctx->wg; in wg_get_device_dump() local
221 mutex_lock(&wg in wg_get_device_dump()
314 set_port(struct wg_device *wg, u16 port) set_port() argument
357 set_peer(struct wg_device *wg, struct nlattr **attrs) set_peer() argument
495 struct wg_device *wg = lookup_interface(info->attrs, skb); wg_set_device() local
[all...]
H A Dsocket.c20 static int send4(struct wg_device *wg, struct sk_buff *skb, in send4() argument
27 .flowi4_mark = wg->fwmark, in send4()
35 skb->dev = wg->dev; in send4()
36 skb->mark = wg->fwmark; in send4()
39 sock = rcu_dereference_bh(wg->sock4); in send4()
77 wg->dev->name, &endpoint->addr, ret); in send4()
97 static int send6(struct wg_device *wg, struct sk_buff *skb, in send6() argument
105 .flowi6_mark = wg->fwmark, in send6()
115 skb->dev = wg->dev; in send6()
116 skb->mark = wg in send6()
203 wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg, struct sk_buff *in_skb, void *buffer, size_t len) wg_socket_send_buffer_as_reply_to_skb() argument
318 struct wg_device *wg; wg_receive() local
349 wg_socket_init(struct wg_device *wg, u16 port) wg_socket_init() argument
419 wg_socket_reinit(struct wg_device *wg, struct sock *new4, struct sock *new6) wg_socket_reinit() argument
[all...]
H A Dreceive.c47 static int prepare_skb_header(struct sk_buff *skb, struct wg_device *wg) in prepare_skb_header() argument
92 static void wg_receive_handshake_packet(struct wg_device *wg, in wg_receive_handshake_packet() argument
106 wg->dev->name, skb); in wg_receive_handshake_packet()
108 (struct message_handshake_cookie *)skb->data, wg); in wg_receive_handshake_packet()
112 under_load = atomic_read(&wg->handshake_queue_len) >= in wg_receive_handshake_packet()
121 mac_state = wg_cookie_validate_packet(&wg->cookie_checker, skb, in wg_receive_handshake_packet()
130 wg->dev->name, skb); in wg_receive_handshake_packet()
140 wg_packet_send_handshake_cookie(wg, skb, in wg_receive_handshake_packet()
144 peer = wg_noise_handshake_consume_initiation(message, wg); in wg_receive_handshake_packet()
147 wg in wg_receive_handshake_packet()
209 struct wg_device *wg = container_of(queue, struct wg_device, handshake_queue); wg_packet_handshake_receive_worker() local
509 wg_packet_consume_data(struct wg_device *wg, struct sk_buff *skb) wg_packet_consume_data() argument
542 wg_packet_receive(struct wg_device *wg, struct sk_buff *skb) wg_packet_receive() argument
[all...]
H A Dpeer.c21 struct wg_peer *wg_peer_create(struct wg_device *wg, in wg_peer_create() argument
28 lockdep_assert_held(&wg->device_update_lock); in wg_peer_create()
30 if (wg->num_peers >= MAX_PEERS_PER_DEVICE) in wg_peer_create()
39 peer->device = wg; in wg_peer_create()
40 wg_noise_handshake_init(&peer->handshake, &wg->static_identity, in wg_peer_create()
57 netif_napi_add(wg->dev, &peer->napi, wg_packet_rx_poll); in wg_peer_create()
59 list_add_tail(&peer->peer_list, &wg->peer_list); in wg_peer_create()
61 wg_pubkey_hashtable_add(wg->peer_hashtable, peer); in wg_peer_create()
62 ++wg->num_peers; in wg_peer_create()
63 pr_debug("%s: Peer %llu created\n", wg in wg_peer_create()
167 wg_peer_remove_all(struct wg_device *wg) wg_peer_remove_all() argument
[all...]
H A Dsocket.h14 int wg_socket_init(struct wg_device *wg, u16 port);
15 void wg_socket_reinit(struct wg_device *wg, struct sock *new4,
21 int wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg,
H A Dnoise.c585 struct wg_device *wg) in wg_noise_handshake_consume_initiation()
598 down_read(&wg->static_identity.lock); in wg_noise_handshake_consume_initiation()
599 if (unlikely(!wg->static_identity.has_identity)) in wg_noise_handshake_consume_initiation()
602 handshake_init(chaining_key, hash, wg->static_identity.static_public); in wg_noise_handshake_consume_initiation()
608 if (!mix_dh(chaining_key, key, wg->static_identity.static_private, e)) in wg_noise_handshake_consume_initiation()
617 peer = wg_pubkey_hashtable_lookup(wg->peer_hashtable, s); in wg_noise_handshake_consume_initiation()
661 up_read(&wg->static_identity.lock); in wg_noise_handshake_consume_initiation()
729 struct wg_device *wg) in wg_noise_handshake_consume_response()
742 down_read(&wg->static_identity.lock); in wg_noise_handshake_consume_response()
744 if (unlikely(!wg in wg_noise_handshake_consume_response()
584 wg_noise_handshake_consume_initiation(struct message_handshake_initiation *src, struct wg_device *wg) wg_noise_handshake_consume_initiation() argument
728 wg_noise_handshake_consume_response(struct message_handshake_response *src, struct wg_device *wg) wg_noise_handshake_consume_response() argument
[all...]
H A Dcookie.c20 struct wg_device *wg) in wg_cookie_checker_init()
25 checker->device = wg; in wg_cookie_checker_init()
199 struct wg_device *wg) in wg_cookie_message_consume()
205 if (unlikely(!wg_index_hashtable_lookup(wg->index_hashtable, in wg_cookie_message_consume()
231 wg->dev->name); in wg_cookie_message_consume()
19 wg_cookie_checker_init(struct cookie_checker *checker, struct wg_device *wg) wg_cookie_checker_init() argument
198 wg_cookie_message_consume(struct message_handshake_cookie *src, struct wg_device *wg) wg_cookie_message_consume() argument
H A Dsend.c110 void wg_packet_send_handshake_cookie(struct wg_device *wg, in wg_packet_send_handshake_cookie() argument
117 wg->dev->name, initiating_skb); in wg_packet_send_handshake_cookie()
119 &wg->cookie_checker); in wg_packet_send_handshake_cookie()
120 wg_socket_send_buffer_as_reply_to_skb(wg, initiating_skb, &packet, in wg_packet_send_handshake_cookie()
313 struct wg_device *wg = peer->device; in wg_packet_create_data() local
320 ret = wg_queue_enqueue_per_device_and_peer(&wg->encrypt_queue, &peer->tx_queue, first, in wg_packet_create_data()
321 wg->packet_crypt_wq); in wg_packet_create_data()
H A Dcookie.h42 struct wg_device *wg);
57 struct wg_device *wg);
/kernel/linux/linux-5.10/drivers/net/wireguard/
H A Ddevice.c34 struct wg_device *wg = netdev_priv(dev); in wg_open() local
49 mutex_lock(&wg->device_update_lock); in wg_open()
50 ret = wg_socket_init(wg, wg->incoming_port); in wg_open()
53 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_open()
59 mutex_unlock(&wg->device_update_lock); in wg_open()
67 struct wg_device *wg; in wg_pm_notification() local
81 list_for_each_entry(wg, &device_list, device_list) { in wg_pm_notification()
82 mutex_lock(&wg->device_update_lock); in wg_pm_notification()
83 list_for_each_entry(peer, &wg in wg_pm_notification()
100 struct wg_device *wg = netdev_priv(dev); wg_stop() local
122 struct wg_device *wg = netdev_priv(dev); wg_xmit() local
228 struct wg_device *wg = netdev_priv(dev); wg_destruct() local
261 struct wg_device *wg = netdev_priv(dev); wg_setup() local
297 struct wg_device *wg = netdev_priv(dev); wg_newlink() local
401 struct wg_device *wg; wg_netns_pre_exit() local
[all...]
H A Dnetlink.c97 struct wg_device *wg; member
201 struct wg_device *wg; in wg_get_device_start() local
203 wg = lookup_interface(genl_dumpit_info(cb)->attrs, cb->skb); in wg_get_device_start()
204 if (IS_ERR(wg)) in wg_get_device_start()
205 return PTR_ERR(wg); in wg_get_device_start()
206 DUMP_CTX(cb)->wg = wg; in wg_get_device_start()
214 struct wg_device *wg = ctx->wg; in wg_get_device_dump() local
221 mutex_lock(&wg in wg_get_device_dump()
314 set_port(struct wg_device *wg, u16 port) set_port() argument
357 set_peer(struct wg_device *wg, struct nlattr **attrs) set_peer() argument
495 struct wg_device *wg = lookup_interface(info->attrs, skb); wg_set_device() local
[all...]
H A Dsocket.c20 static int send4(struct wg_device *wg, struct sk_buff *skb, in send4() argument
27 .flowi4_mark = wg->fwmark, in send4()
35 skb->dev = wg->dev; in send4()
36 skb->mark = wg->fwmark; in send4()
39 sock = rcu_dereference_bh(wg->sock4); in send4()
77 wg->dev->name, &endpoint->addr, ret); in send4()
97 static int send6(struct wg_device *wg, struct sk_buff *skb, in send6() argument
105 .flowi6_mark = wg->fwmark, in send6()
115 skb->dev = wg->dev; in send6()
116 skb->mark = wg in send6()
203 wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg, struct sk_buff *in_skb, void *buffer, size_t len) wg_socket_send_buffer_as_reply_to_skb() argument
318 struct wg_device *wg; wg_receive() local
349 wg_socket_init(struct wg_device *wg, u16 port) wg_socket_init() argument
419 wg_socket_reinit(struct wg_device *wg, struct sock *new4, struct sock *new6) wg_socket_reinit() argument
[all...]
H A Dreceive.c54 static int prepare_skb_header(struct sk_buff *skb, struct wg_device *wg) in prepare_skb_header() argument
99 static void wg_receive_handshake_packet(struct wg_device *wg, in wg_receive_handshake_packet() argument
113 wg->dev->name, skb); in wg_receive_handshake_packet()
115 (struct message_handshake_cookie *)skb->data, wg); in wg_receive_handshake_packet()
119 under_load = atomic_read(&wg->handshake_queue_len) >= in wg_receive_handshake_packet()
128 mac_state = wg_cookie_validate_packet(&wg->cookie_checker, skb, in wg_receive_handshake_packet()
137 wg->dev->name, skb); in wg_receive_handshake_packet()
147 wg_packet_send_handshake_cookie(wg, skb, in wg_receive_handshake_packet()
151 peer = wg_noise_handshake_consume_initiation(message, wg); in wg_receive_handshake_packet()
154 wg in wg_receive_handshake_packet()
216 struct wg_device *wg = container_of(queue, struct wg_device, handshake_queue); wg_packet_handshake_receive_worker() local
516 wg_packet_consume_data(struct wg_device *wg, struct sk_buff *skb) wg_packet_consume_data() argument
549 wg_packet_receive(struct wg_device *wg, struct sk_buff *skb) wg_packet_receive() argument
[all...]
H A Dpeer.c21 struct wg_peer *wg_peer_create(struct wg_device *wg, in wg_peer_create() argument
28 lockdep_assert_held(&wg->device_update_lock); in wg_peer_create()
30 if (wg->num_peers >= MAX_PEERS_PER_DEVICE) in wg_peer_create()
39 peer->device = wg; in wg_peer_create()
40 wg_noise_handshake_init(&peer->handshake, &wg->static_identity, in wg_peer_create()
57 netif_napi_add(wg->dev, &peer->napi, wg_packet_rx_poll, in wg_peer_create()
60 list_add_tail(&peer->peer_list, &wg->peer_list); in wg_peer_create()
62 wg_pubkey_hashtable_add(wg->peer_hashtable, peer); in wg_peer_create()
63 ++wg->num_peers; in wg_peer_create()
64 pr_debug("%s: Peer %llu created\n", wg in wg_peer_create()
168 wg_peer_remove_all(struct wg_device *wg) wg_peer_remove_all() argument
[all...]
H A Dsocket.h14 int wg_socket_init(struct wg_device *wg, u16 port);
15 void wg_socket_reinit(struct wg_device *wg, struct sock *new4,
21 int wg_socket_send_buffer_as_reply_to_skb(struct wg_device *wg,
H A Dnoise.c585 struct wg_device *wg) in wg_noise_handshake_consume_initiation()
598 down_read(&wg->static_identity.lock); in wg_noise_handshake_consume_initiation()
599 if (unlikely(!wg->static_identity.has_identity)) in wg_noise_handshake_consume_initiation()
602 handshake_init(chaining_key, hash, wg->static_identity.static_public); in wg_noise_handshake_consume_initiation()
608 if (!mix_dh(chaining_key, key, wg->static_identity.static_private, e)) in wg_noise_handshake_consume_initiation()
617 peer = wg_pubkey_hashtable_lookup(wg->peer_hashtable, s); in wg_noise_handshake_consume_initiation()
661 up_read(&wg->static_identity.lock); in wg_noise_handshake_consume_initiation()
729 struct wg_device *wg) in wg_noise_handshake_consume_response()
742 down_read(&wg->static_identity.lock); in wg_noise_handshake_consume_response()
744 if (unlikely(!wg in wg_noise_handshake_consume_response()
584 wg_noise_handshake_consume_initiation(struct message_handshake_initiation *src, struct wg_device *wg) wg_noise_handshake_consume_initiation() argument
728 wg_noise_handshake_consume_response(struct message_handshake_response *src, struct wg_device *wg) wg_noise_handshake_consume_response() argument
[all...]
H A Dcookie.c20 struct wg_device *wg) in wg_cookie_checker_init()
25 checker->device = wg; in wg_cookie_checker_init()
199 struct wg_device *wg) in wg_cookie_message_consume()
205 if (unlikely(!wg_index_hashtable_lookup(wg->index_hashtable, in wg_cookie_message_consume()
231 wg->dev->name); in wg_cookie_message_consume()
19 wg_cookie_checker_init(struct cookie_checker *checker, struct wg_device *wg) wg_cookie_checker_init() argument
198 wg_cookie_message_consume(struct message_handshake_cookie *src, struct wg_device *wg) wg_cookie_message_consume() argument
H A Dsend.c110 void wg_packet_send_handshake_cookie(struct wg_device *wg, in wg_packet_send_handshake_cookie() argument
117 wg->dev->name, initiating_skb); in wg_packet_send_handshake_cookie()
119 &wg->cookie_checker); in wg_packet_send_handshake_cookie()
120 wg_socket_send_buffer_as_reply_to_skb(wg, initiating_skb, &packet, in wg_packet_send_handshake_cookie()
313 struct wg_device *wg = peer->device; in wg_packet_create_data() local
320 ret = wg_queue_enqueue_per_device_and_peer(&wg->encrypt_queue, &peer->tx_queue, first, in wg_packet_create_data()
321 wg->packet_crypt_wq); in wg_packet_create_data()
H A Dcookie.h42 struct wg_device *wg);
57 struct wg_device *wg);
H A Dpeer.h69 struct wg_peer *wg_peer_create(struct wg_device *wg,
81 void wg_peer_remove_all(struct wg_device *wg);
/kernel/linux/linux-6.6/drivers/gpio/
H A Dgpio-wcove.c127 static void wcove_update_irq_mask(struct wcove_gpio *wg, irq_hw_number_t gpio) in wcove_update_irq_mask() argument
131 if (wg->set_irq_mask) in wcove_update_irq_mask()
132 regmap_set_bits(wg->regmap, reg, mask); in wcove_update_irq_mask()
134 regmap_clear_bits(wg->regmap, reg, mask); in wcove_update_irq_mask()
137 static void wcove_update_irq_ctrl(struct wcove_gpio *wg, irq_hw_number_t gpio) in wcove_update_irq_ctrl() argument
141 regmap_update_bits(wg->regmap, reg, CTLI_INTCNT_BE, wg->intcnt); in wcove_update_irq_ctrl()
146 struct wcove_gpio *wg = gpiochip_get_data(chip); in wcove_gpio_dir_in() local
152 return regmap_write(wg->regmap, reg, CTLO_INPUT_SET); in wcove_gpio_dir_in()
158 struct wcove_gpio *wg in wcove_gpio_dir_out() local
169 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_get_direction() local
188 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_get() local
204 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_set() local
219 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_set_config() local
242 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_irq_type() local
273 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_bus_lock() local
281 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_bus_sync_unlock() local
296 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_irq_unmask() local
311 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_irq_mask() local
336 struct wcove_gpio *wg = (struct wcove_gpio *)data; wcove_gpio_irq_handler() local
376 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_dbg_show() local
408 struct wcove_gpio *wg; wcove_gpio_probe() local
[all...]
/kernel/linux/linux-5.10/drivers/gpio/
H A Dgpio-wcove.c115 static void wcove_update_irq_mask(struct wcove_gpio *wg, int gpio) in wcove_update_irq_mask() argument
127 if (wg->set_irq_mask) in wcove_update_irq_mask()
128 regmap_update_bits(wg->regmap, reg, mask, mask); in wcove_update_irq_mask()
130 regmap_update_bits(wg->regmap, reg, mask, 0); in wcove_update_irq_mask()
133 static void wcove_update_irq_ctrl(struct wcove_gpio *wg, int gpio) in wcove_update_irq_ctrl() argument
140 regmap_update_bits(wg->regmap, reg, CTLI_INTCNT_BE, wg->intcnt); in wcove_update_irq_ctrl()
145 struct wcove_gpio *wg = gpiochip_get_data(chip); in wcove_gpio_dir_in() local
151 return regmap_write(wg->regmap, reg, CTLO_INPUT_SET); in wcove_gpio_dir_in()
157 struct wcove_gpio *wg in wcove_gpio_dir_out() local
168 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_get_direction() local
187 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_get() local
203 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_set() local
218 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_set_config() local
241 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_irq_type() local
271 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_bus_lock() local
279 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_bus_sync_unlock() local
294 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_irq_unmask() local
306 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_irq_mask() local
326 struct wcove_gpio *wg = (struct wcove_gpio *)data; wcove_gpio_irq_handler() local
369 struct wcove_gpio *wg = gpiochip_get_data(chip); wcove_gpio_dbg_show() local
400 struct wcove_gpio *wg; wcove_gpio_probe() local
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/wireguard/
H A Dnetns.sh29 netns0="wg-test-$$-0"
30 netns1="wg-test-$$-1"
31 netns2="wg-test-$$-2"
80 key1="$(pp wg genkey)"
81 key2="$(pp wg genkey)"
82 key3="$(pp wg genkey)"
83 key4="$(pp wg genkey)"
84 pub1="$(pp wg pubkey <<<"$key1")"
85 pub2="$(pp wg pubkey <<<"$key2")"
86 pub3="$(pp wg pubke
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/wireguard/
H A Dnetns.sh31 netns0="wg-test-$$-0"
32 netns1="wg-test-$$-1"
33 netns2="wg-test-$$-2"
82 key1="$(pp wg genkey)"
83 key2="$(pp wg genkey)"
84 key3="$(pp wg genkey)"
85 key4="$(pp wg genkey)"
86 pub1="$(pp wg pubkey <<<"$key1")"
87 pub2="$(pp wg pubkey <<<"$key2")"
88 pub3="$(pp wg pubke
[all...]

Completed in 12 milliseconds

12