Home
last modified time | relevance | path

Searched refs:conn (Results 1 – 25 of 72) sorted by relevance

123

/net/bluetooth/
Dhci_conn.c63 static void hci_connect_le_scan_cleanup(struct hci_conn *conn) in hci_connect_le_scan_cleanup() argument
66 struct hci_dev *hdev = conn->hdev; in hci_connect_le_scan_cleanup()
71 bdaddr = &conn->dst; in hci_connect_le_scan_cleanup()
72 bdaddr_type = conn->dst_type; in hci_connect_le_scan_cleanup()
114 static void hci_conn_cleanup(struct hci_conn *conn) in hci_conn_cleanup() argument
116 struct hci_dev *hdev = conn->hdev; in hci_conn_cleanup()
118 if (test_bit(HCI_CONN_PARAM_REMOVAL_PEND, &conn->flags)) in hci_conn_cleanup()
119 hci_conn_params_del(conn->hdev, &conn->dst, conn->dst_type); in hci_conn_cleanup()
121 hci_chan_list_flush(conn); in hci_conn_cleanup()
123 hci_conn_hash_del(hdev, conn); in hci_conn_cleanup()
[all …]
Dhci_event.c119 struct hci_conn *conn; in hci_cc_role_discovery() local
128 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle)); in hci_cc_role_discovery()
129 if (conn) in hci_cc_role_discovery()
130 conn->role = rp->role; in hci_cc_role_discovery()
138 struct hci_conn *conn; in hci_cc_read_link_policy() local
147 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle)); in hci_cc_read_link_policy()
148 if (conn) in hci_cc_read_link_policy()
149 conn->link_policy = __le16_to_cpu(rp->policy); in hci_cc_read_link_policy()
157 struct hci_conn *conn; in hci_cc_write_link_policy() local
171 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle)); in hci_cc_write_link_policy()
[all …]
Dl2cap_core.c56 static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn,
58 static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len,
90 static struct l2cap_chan *__l2cap_get_chan_by_dcid(struct l2cap_conn *conn, in __l2cap_get_chan_by_dcid() argument
95 list_for_each_entry(c, &conn->chan_l, list) { in __l2cap_get_chan_by_dcid()
102 static struct l2cap_chan *__l2cap_get_chan_by_scid(struct l2cap_conn *conn, in __l2cap_get_chan_by_scid() argument
107 list_for_each_entry(c, &conn->chan_l, list) { in __l2cap_get_chan_by_scid()
116 static struct l2cap_chan *l2cap_get_chan_by_scid(struct l2cap_conn *conn, in l2cap_get_chan_by_scid() argument
121 mutex_lock(&conn->chan_lock); in l2cap_get_chan_by_scid()
122 c = __l2cap_get_chan_by_scid(conn, cid); in l2cap_get_chan_by_scid()
125 mutex_unlock(&conn->chan_lock); in l2cap_get_chan_by_scid()
[all …]
Dsco.c68 struct sco_conn *conn; member
105 struct sco_conn *conn = hcon->sco_data; in sco_conn_add() local
107 if (conn) in sco_conn_add()
108 return conn; in sco_conn_add()
110 conn = kzalloc(sizeof(struct sco_conn), GFP_KERNEL); in sco_conn_add()
111 if (!conn) in sco_conn_add()
114 spin_lock_init(&conn->lock); in sco_conn_add()
116 hcon->sco_data = conn; in sco_conn_add()
117 conn->hcon = hcon; in sco_conn_add()
120 conn->mtu = hdev->sco_mtu; in sco_conn_add()
[all …]
Dhci_sysfs.c29 struct hci_conn *conn = to_hci_conn(dev); in show_link_type() local
30 return sprintf(buf, "%s\n", link_typetostr(conn->type)); in show_link_type()
36 struct hci_conn *conn = to_hci_conn(dev); in show_link_address() local
37 return sprintf(buf, "%pMR\n", &conn->dst); in show_link_address()
56 struct hci_conn *conn = to_hci_conn(dev); in bt_link_release() local
57 kfree(conn); in bt_link_release()
76 void hci_conn_init_sysfs(struct hci_conn *conn) in hci_conn_init_sysfs() argument
78 struct hci_dev *hdev = conn->hdev; in hci_conn_init_sysfs()
80 BT_DBG("conn %p", conn); in hci_conn_init_sysfs()
82 conn->dev.type = &bt_link; in hci_conn_init_sysfs()
[all …]
Dsmp.c96 struct l2cap_conn *conn; member
603 static void smp_send_cmd(struct l2cap_conn *conn, u8 code, u16 len, void *data) in smp_send_cmd() argument
605 struct l2cap_chan *chan = conn->smp; in smp_send_cmd()
661 static void build_pairing_cmd(struct l2cap_conn *conn, in build_pairing_cmd() argument
665 struct l2cap_chan *chan = conn->smp; in build_pairing_cmd()
667 struct hci_conn *hcon = conn->hcon; in build_pairing_cmd()
716 req->io_capability = conn->hcon->io_capability; in build_pairing_cmd()
727 rsp->io_capability = conn->hcon->io_capability; in build_pairing_cmd()
737 static u8 check_enc_key_size(struct l2cap_conn *conn, __u8 max_key_size) in check_enc_key_size() argument
739 struct l2cap_chan *chan = conn->smp; in check_enc_key_size()
[all …]
/net/rds/
Dconnection.c78 struct rds_connection *conn, *ret = NULL; in rds_conn_lookup() local
80 hlist_for_each_entry_rcu(conn, head, c_hash_node) { in rds_conn_lookup()
81 if (conn->c_faddr == faddr && conn->c_laddr == laddr && in rds_conn_lookup()
82 conn->c_trans == trans && net == rds_conn_net(conn)) { in rds_conn_lookup()
83 ret = conn; in rds_conn_lookup()
98 static void rds_conn_reset(struct rds_connection *conn) in rds_conn_reset() argument
101 &conn->c_laddr, &conn->c_faddr); in rds_conn_reset()
104 rds_send_reset(conn); in rds_conn_reset()
105 conn->c_flags = 0; in rds_conn_reset()
126 struct rds_connection *conn, *parent = NULL; in __rds_conn_create() local
[all …]
Dthreads.c74 void rds_connect_complete(struct rds_connection *conn) in rds_connect_complete() argument
76 if (!rds_conn_transition(conn, RDS_CONN_CONNECTING, RDS_CONN_UP)) { in rds_connect_complete()
80 atomic_read(&conn->c_state)); in rds_connect_complete()
81 rds_conn_drop(conn); in rds_connect_complete()
86 conn, &conn->c_laddr, &conn->c_faddr); in rds_connect_complete()
88 conn->c_reconnect_jiffies = 0; in rds_connect_complete()
89 set_bit(0, &conn->c_map_queued); in rds_connect_complete()
90 queue_delayed_work(rds_wq, &conn->c_send_w, 0); in rds_connect_complete()
91 queue_delayed_work(rds_wq, &conn->c_recv_w, 0); in rds_connect_complete()
113 void rds_queue_reconnect(struct rds_connection *conn) in rds_queue_reconnect() argument
[all …]
Dsend.c65 void rds_send_reset(struct rds_connection *conn) in rds_send_reset() argument
70 if (conn->c_xmit_rm) { in rds_send_reset()
71 rm = conn->c_xmit_rm; in rds_send_reset()
72 conn->c_xmit_rm = NULL; in rds_send_reset()
81 conn->c_xmit_sg = 0; in rds_send_reset()
82 conn->c_xmit_hdr_off = 0; in rds_send_reset()
83 conn->c_xmit_data_off = 0; in rds_send_reset()
84 conn->c_xmit_atomic_sent = 0; in rds_send_reset()
85 conn->c_xmit_rdma_sent = 0; in rds_send_reset()
86 conn->c_xmit_data_sent = 0; in rds_send_reset()
[all …]
Dib_cm.c45 static void rds_ib_set_protocol(struct rds_connection *conn, unsigned int version) in rds_ib_set_protocol() argument
47 conn->c_version = version; in rds_ib_set_protocol()
53 static void rds_ib_set_flow_control(struct rds_connection *conn, u32 credits) in rds_ib_set_flow_control() argument
55 struct rds_ib_connection *ic = conn->c_transport_data; in rds_ib_set_flow_control()
60 rds_ib_send_add_credits(conn, credits); in rds_ib_set_flow_control()
95 void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_event *event) in rds_ib_cm_connect_complete() argument
98 struct rds_ib_connection *ic = conn->c_transport_data; in rds_ib_cm_connect_complete()
102 if (event->param.conn.private_data_len >= sizeof(*dp)) { in rds_ib_cm_connect_complete()
103 dp = event->param.conn.private_data; in rds_ib_cm_connect_complete()
107 rds_ib_set_protocol(conn, in rds_ib_cm_connect_complete()
[all …]
Diw_cm.c45 static void rds_iw_set_protocol(struct rds_connection *conn, unsigned int version) in rds_iw_set_protocol() argument
47 conn->c_version = version; in rds_iw_set_protocol()
53 static void rds_iw_set_flow_control(struct rds_connection *conn, u32 credits) in rds_iw_set_flow_control() argument
55 struct rds_iw_connection *ic = conn->c_transport_data; in rds_iw_set_flow_control()
60 rds_iw_send_add_credits(conn, credits); in rds_iw_set_flow_control()
70 void rds_iw_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_event *event) in rds_iw_cm_connect_complete() argument
73 struct rds_iw_connection *ic = conn->c_transport_data; in rds_iw_cm_connect_complete()
77 if (event->param.conn.private_data_len) { in rds_iw_cm_connect_complete()
78 dp = event->param.conn.private_data; in rds_iw_cm_connect_complete()
80 rds_iw_set_protocol(conn, in rds_iw_cm_connect_complete()
[all …]
Dloop.c60 static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm, in rds_loop_xmit() argument
70 rds_cong_map_updated(conn->c_fcong, ~(u64) 0); in rds_loop_xmit()
71 ret = min_t(int, ret, sgp->length - conn->c_xmit_data_off); in rds_loop_xmit()
77 rds_inc_init(&rm->m_inc, conn, conn->c_laddr); in rds_loop_xmit()
81 rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc, in rds_loop_xmit()
84 rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence), in rds_loop_xmit()
103 static int rds_loop_recv(struct rds_connection *conn) in rds_loop_recv() argument
110 struct rds_connection *conn; member
119 static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp) in rds_loop_conn_alloc() argument
129 lc->conn = conn; in rds_loop_conn_alloc()
[all …]
Dtcp_connect.c43 struct rds_connection *conn; in rds_tcp_state_change() local
47 conn = sk->sk_user_data; in rds_tcp_state_change()
48 if (!conn) { in rds_tcp_state_change()
52 tc = conn->c_transport_data; in rds_tcp_state_change()
63 rds_connect_complete(conn); in rds_tcp_state_change()
67 rds_conn_drop(conn); in rds_tcp_state_change()
76 int rds_tcp_conn_connect(struct rds_connection *conn) in rds_tcp_conn_connect() argument
82 ret = sock_create_kern(rds_conn_net(conn), PF_INET, in rds_tcp_conn_connect()
90 src.sin_addr.s_addr = (__force u32)conn->c_laddr; in rds_tcp_conn_connect()
96 ret, &conn->c_laddr); in rds_tcp_conn_connect()
[all …]
Dtcp_recv.c105 static void rds_tcp_cong_recv(struct rds_connection *conn, in rds_tcp_cong_recv() argument
121 map = conn->c_fcong; in rds_tcp_cong_recv()
150 struct rds_connection *conn; member
158 struct rds_connection *conn = arg->conn; in rds_tcp_data_recv() local
159 struct rds_tcp_connection *tc = conn->c_transport_data; in rds_tcp_data_recv()
181 rds_inc_init(&tinc->ti_inc, conn, conn->c_faddr); in rds_tcp_data_recv()
240 rds_tcp_cong_recv(conn, tinc); in rds_tcp_data_recv()
242 rds_recv_incoming(conn, conn->c_faddr, in rds_tcp_data_recv()
243 conn->c_laddr, &tinc->ti_inc, in rds_tcp_data_recv()
261 static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp) in rds_tcp_read_sock() argument
[all …]
Drdma_transport.c45 struct rds_connection *conn = cm_id->context; in rds_rdma_cm_event_handler() local
49 rdsdebug("conn %p id %p handling event %u (%s)\n", conn, cm_id, in rds_rdma_cm_event_handler()
59 if (conn) { in rds_rdma_cm_event_handler()
60 mutex_lock(&conn->c_cm_lock); in rds_rdma_cm_event_handler()
65 if (rds_conn_state(conn) == RDS_CONN_DISCONNECTING) { in rds_rdma_cm_event_handler()
89 if (conn) { in rds_rdma_cm_event_handler()
92 ibic = conn->c_transport_data; in rds_rdma_cm_event_handler()
96 rds_conn_drop(conn); in rds_rdma_cm_event_handler()
101 trans->cm_connect_complete(conn, event); in rds_rdma_cm_event_handler()
111 if (conn) in rds_rdma_cm_event_handler()
[all …]
Diw_recv.c137 static int rds_iw_recv_refill_one(struct rds_connection *conn, in rds_iw_recv_refill_one() argument
141 struct rds_iw_connection *ic = conn->c_transport_data; in rds_iw_recv_refill_one()
158 rds_inc_init(&recv->r_iwinc->ii_inc, conn, conn->c_faddr); in rds_iw_recv_refill_one()
224 int rds_iw_recv_refill(struct rds_connection *conn, gfp_t kptr_gfp, in rds_iw_recv_refill() argument
227 struct rds_iw_connection *ic = conn->c_transport_data; in rds_iw_recv_refill()
234 while ((prefill || rds_conn_up(conn)) && in rds_iw_recv_refill()
244 ret = rds_iw_recv_refill_one(conn, recv, kptr_gfp, page_gfp); in rds_iw_recv_refill()
256 rds_iw_conn_error(conn, "recv post on " in rds_iw_recv_refill()
258 "reconnecting\n", &conn->c_faddr, in rds_iw_recv_refill()
269 rds_iw_advertise_credits(conn, posted); in rds_iw_recv_refill()
[all …]
Drds.h139 struct net *rds_conn_net(struct rds_connection *conn) in rds_conn_net() argument
141 return read_pnet(&conn->c_net); in rds_conn_net()
145 void rds_conn_net_set(struct rds_connection *conn, struct net *net) in rds_conn_net_set() argument
147 write_pnet(&conn->c_net, net); in rds_conn_net_set()
444 int (*conn_alloc)(struct rds_connection *conn, gfp_t gfp);
446 int (*conn_connect)(struct rds_connection *conn);
447 void (*conn_shutdown)(struct rds_connection *conn);
448 void (*xmit_prepare)(struct rds_connection *conn);
449 void (*xmit_complete)(struct rds_connection *conn);
450 int (*xmit)(struct rds_connection *conn, struct rds_message *rm,
[all …]
Dib_recv.c265 rds_inc_init(&ibinc->ii_inc, ic->conn, ic->conn->c_faddr); in rds_ib_refill_one_inc()
299 static int rds_ib_recv_refill_one(struct rds_connection *conn, in rds_ib_recv_refill_one() argument
302 struct rds_ib_connection *ic = conn->c_transport_data; in rds_ib_recv_refill_one()
350 static int acquire_refill(struct rds_connection *conn) in acquire_refill() argument
352 return test_and_set_bit(RDS_RECV_REFILL, &conn->c_flags) == 0; in acquire_refill()
355 static void release_refill(struct rds_connection *conn) in release_refill() argument
357 clear_bit(RDS_RECV_REFILL, &conn->c_flags); in release_refill()
364 if (waitqueue_active(&conn->c_waitq)) in release_refill()
365 wake_up_all(&conn->c_waitq); in release_refill()
375 void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp) in rds_ib_recv_refill() argument
[all …]
/net/rxrpc/
Dar-connection.c200 struct rxrpc_connection *conn; in rxrpc_alloc_connection() local
204 conn = kzalloc(sizeof(struct rxrpc_connection), gfp); in rxrpc_alloc_connection()
205 if (conn) { in rxrpc_alloc_connection()
206 INIT_WORK(&conn->processor, &rxrpc_process_connection); in rxrpc_alloc_connection()
207 INIT_LIST_HEAD(&conn->bundle_link); in rxrpc_alloc_connection()
208 conn->calls = RB_ROOT; in rxrpc_alloc_connection()
209 skb_queue_head_init(&conn->rx_queue); in rxrpc_alloc_connection()
210 rwlock_init(&conn->lock); in rxrpc_alloc_connection()
211 spin_lock_init(&conn->state_lock); in rxrpc_alloc_connection()
212 atomic_set(&conn->usage, 1); in rxrpc_alloc_connection()
[all …]
Dar-connevent.c28 static void rxrpc_abort_calls(struct rxrpc_connection *conn, int state, in rxrpc_abort_calls() argument
34 _enter("{%d},%x", conn->debug_id, abort_code); in rxrpc_abort_calls()
36 read_lock_bh(&conn->lock); in rxrpc_abort_calls()
38 for (p = rb_first(&conn->calls); p; p = rb_next(p)) { in rxrpc_abort_calls()
53 read_unlock_bh(&conn->lock); in rxrpc_abort_calls()
60 static int rxrpc_abort_connection(struct rxrpc_connection *conn, in rxrpc_abort_connection() argument
70 _enter("%d,,%u,%u", conn->debug_id, error, abort_code); in rxrpc_abort_connection()
73 spin_lock_bh(&conn->state_lock); in rxrpc_abort_connection()
74 if (conn->state < RXRPC_CONN_REMOTELY_ABORTED) { in rxrpc_abort_connection()
75 conn->state = RXRPC_CONN_LOCALLY_ABORTED; in rxrpc_abort_connection()
[all …]
Drxkad.c62 static int rxkad_init_connection_security(struct rxrpc_connection *conn) in rxkad_init_connection_security() argument
68 _enter("{%d},{%x}", conn->debug_id, key_serial(conn->key)); in rxkad_init_connection_security()
70 token = conn->key->payload.data[0]; in rxkad_init_connection_security()
71 conn->security_ix = token->security_index; in rxkad_init_connection_security()
84 switch (conn->security_level) { in rxkad_init_connection_security()
88 conn->size_align = 8; in rxkad_init_connection_security()
89 conn->security_size = sizeof(struct rxkad_level1_hdr); in rxkad_init_connection_security()
90 conn->header_size += sizeof(struct rxkad_level1_hdr); in rxkad_init_connection_security()
93 conn->size_align = 8; in rxkad_init_connection_security()
94 conn->security_size = sizeof(struct rxkad_level2_hdr); in rxkad_init_connection_security()
[all …]
Dar-security.c124 int rxrpc_init_client_conn_security(struct rxrpc_connection *conn) in rxrpc_init_client_conn_security() argument
128 struct key *key = conn->key; in rxrpc_init_client_conn_security()
131 _enter("{%d},{%x}", conn->debug_id, key_serial(key)); in rxrpc_init_client_conn_security()
147 conn->security = sec; in rxrpc_init_client_conn_security()
149 ret = conn->security->init_connection_security(conn); in rxrpc_init_client_conn_security()
151 rxrpc_security_put(conn->security); in rxrpc_init_client_conn_security()
152 conn->security = NULL; in rxrpc_init_client_conn_security()
163 int rxrpc_init_server_conn_security(struct rxrpc_connection *conn) in rxrpc_init_server_conn_security() argument
166 struct rxrpc_local *local = conn->trans->local; in rxrpc_init_server_conn_security()
174 sprintf(kdesc, "%u:%u", ntohs(conn->service_id), conn->security_ix); in rxrpc_init_server_conn_security()
[all …]
Dar-call.c124 call->conn->trans->local, addr_size, in rxrpc_call_hash_add()
294 call->epoch = call->conn->epoch; in rxrpc_alloc_client_call()
295 call->service_id = call->conn->service_id; in rxrpc_alloc_client_call()
296 call->in_clientflag = call->conn->in_clientflag; in rxrpc_alloc_client_call()
300 spin_lock(&call->conn->trans->peer->lock); in rxrpc_alloc_client_call()
301 list_add(&call->error_link, &call->conn->trans->peer->error_targets); in rxrpc_alloc_client_call()
302 spin_unlock(&call->conn->trans->peer->lock); in rxrpc_alloc_client_call()
390 _net("CALL new %d on CONN %d", call->debug_id, call->conn->debug_id); in rxrpc_get_client_call()
416 struct rxrpc_connection *conn, in rxrpc_incoming_call() argument
424 _enter(",%d,,%x", conn->debug_id, gfp); in rxrpc_incoming_call()
[all …]
Dar-proc.c62 trans = call->conn->trans; in rxrpc_call_seq_show()
77 ntohs(call->conn->service_id), in rxrpc_call_seq_show()
78 ntohl(call->conn->cid), in rxrpc_call_seq_show()
80 call->conn->in_clientflag ? "Svc" : "Clt", in rxrpc_call_seq_show()
131 struct rxrpc_connection *conn; in rxrpc_connection_seq_show() local
144 conn = list_entry(v, struct rxrpc_connection, link); in rxrpc_connection_seq_show()
145 trans = conn->trans; in rxrpc_connection_seq_show()
160 ntohs(conn->service_id), in rxrpc_connection_seq_show()
161 ntohl(conn->cid), in rxrpc_connection_seq_show()
162 conn->call_counter, in rxrpc_connection_seq_show()
[all …]
/net/wireless/
Dsme.c53 if (!wdev->conn) in cfg80211_sme_free()
56 kfree(wdev->conn->ie); in cfg80211_sme_free()
57 kfree(wdev->conn); in cfg80211_sme_free()
58 wdev->conn = NULL; in cfg80211_sme_free()
73 if (wdev->conn->params.channel) in cfg80211_conn_scan()
84 if (wdev->conn->params.channel) { in cfg80211_conn_scan()
85 enum ieee80211_band band = wdev->conn->params.channel->band; in cfg80211_conn_scan()
93 request->channels[0] = wdev->conn->params.channel; in cfg80211_conn_scan()
119 memcpy(request->ssids[0].ssid, wdev->conn->params.ssid, in cfg80211_conn_scan()
120 wdev->conn->params.ssid_len); in cfg80211_conn_scan()
[all …]

123