Home
last modified time | relevance | path

Searched refs:wg (Results 1 – 17 of 17) sorted by relevance

/drivers/net/wireguard/
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->peer_list, peer_list) { in wg_pm_notification()
88 mutex_unlock(&wg->device_update_lock); in wg_pm_notification()
[all …]
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->device_update_lock); in wg_get_device_dump()
222 cb->seq = wg->device_update_gen; in wg_get_device_dump()
233 wg->incoming_port) || in wg_get_device_dump()
[all …]
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->fwmark; in send6()
[all …]
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->dev->name, skb); in wg_receive_handshake_packet()
[all …]
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->dev->name, peer->internal_id); in wg_peer_create()
[all …]
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,
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()
Dnoise.c585 struct wg_device *wg) in wg_noise_handshake_consume_initiation() argument
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() argument
742 down_read(&wg->static_identity.lock); in wg_noise_handshake_consume_response()
744 if (unlikely(!wg->static_identity.has_identity)) in wg_noise_handshake_consume_response()
[all …]
Dcookie.c20 struct wg_device *wg) in wg_cookie_checker_init() argument
25 checker->device = wg; in wg_cookie_checker_init()
199 struct wg_device *wg) in wg_cookie_message_consume() argument
205 if (unlikely(!wg_index_hashtable_lookup(wg->index_hashtable, in wg_cookie_message_consume()
231 wg->dev->name); in wg_cookie_message_consume()
Dcookie.h42 struct wg_device *wg);
57 struct wg_device *wg);
Dpeer.h69 struct wg_peer *wg_peer_create(struct wg_device *wg,
81 void wg_peer_remove_all(struct wg_device *wg);
Dnoise.h124 struct wg_device *wg);
130 struct wg_device *wg);
Dqueueing.h31 void wg_packet_receive(struct wg_device *wg, struct sk_buff *skb);
42 void wg_packet_send_handshake_cookie(struct wg_device *wg,
/drivers/gpio/
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 = gpiochip_get_data(chip); in wcove_gpio_dir_out() local
164 return regmap_write(wg->regmap, reg, CTLO_OUTPUT_SET | value); in wcove_gpio_dir_out()
[all …]
/drivers/media/platform/omap3isp/
Disphist.c78 wb_gain = conf->wg[0] << ISPHIST_WB_GAIN_WG00_SHIFT; in hist_setup_regs()
79 wb_gain |= conf->wg[1] << ISPHIST_WB_GAIN_WG01_SHIFT; in hist_setup_regs()
80 wb_gain |= conf->wg[2] << ISPHIST_WB_GAIN_WG02_SHIFT; in hist_setup_regs()
82 wb_gain |= conf->wg[3] << ISPHIST_WB_GAIN_WG03_SHIFT; in hist_setup_regs()
378 else if (cur_cfg->wg[c] != user_cfg->wg[c]) in hist_comp_params()
/drivers/dma/mediatek/
Dmtk-uart-apdma.c215 unsigned int len, wg, rg; in mtk_uart_apdma_rx_handler() local
228 wg = mtk_uart_apdma_read(c, VFF_WPT); in mtk_uart_apdma_rx_handler()
229 cnt = (wg & VFF_RING_SIZE) - (rg & VFF_RING_SIZE); in mtk_uart_apdma_rx_handler()
235 if ((rg ^ wg) & VFF_RING_WRAP) in mtk_uart_apdma_rx_handler()
239 mtk_uart_apdma_write(c, VFF_RPT, wg); in mtk_uart_apdma_rx_handler()
/drivers/md/
Draid5.c5518 struct r5worker_group *wg; in __get_priority_stripe() local
5525 wg = NULL; in __get_priority_stripe()
5533 wg = &conf->worker_groups[group]; in __get_priority_stripe()
5539 wg = &conf->worker_groups[i]; in __get_priority_stripe()
5586 wg = NULL; in __get_priority_stripe()
5597 if (wg) { in __get_priority_stripe()
5598 wg->stripes_cnt--; in __get_priority_stripe()