Lines Matching refs:proto
74 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument
80 bt_slock_key_strings[proto], &bt_slock_key[proto], in bt_sock_reclassify_lock()
81 bt_key_strings[proto], &bt_lock_key[proto]); in bt_sock_reclassify_lock()
85 int bt_sock_register(int proto, const struct net_proto_family *ops) in bt_sock_register() argument
89 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_register()
94 if (bt_proto[proto]) in bt_sock_register()
97 bt_proto[proto] = ops; in bt_sock_register()
105 void bt_sock_unregister(int proto) in bt_sock_unregister() argument
107 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_unregister()
111 bt_proto[proto] = NULL; in bt_sock_unregister()
116 static int bt_sock_create(struct net *net, struct socket *sock, int proto, in bt_sock_create() argument
124 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_create()
127 if (!bt_proto[proto]) in bt_sock_create()
128 request_module("bt-proto-%d", proto); in bt_sock_create()
134 if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { in bt_sock_create()
135 err = bt_proto[proto]->create(net, sock, proto, kern); in bt_sock_create()
137 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
138 module_put(bt_proto[proto]->owner); in bt_sock_create()
147 struct proto *prot, int proto, gfp_t prio, int kern) in bt_sock_alloc() argument
160 sk->sk_protocol = proto; in bt_sock_alloc()