Lines Matching refs:proto
71 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument
77 bt_slock_key_strings[proto], &bt_slock_key[proto], in bt_sock_reclassify_lock()
78 bt_key_strings[proto], &bt_lock_key[proto]); in bt_sock_reclassify_lock()
82 int bt_sock_register(int proto, const struct net_proto_family *ops) in bt_sock_register() argument
86 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_register()
91 if (bt_proto[proto]) in bt_sock_register()
94 bt_proto[proto] = ops; in bt_sock_register()
102 void bt_sock_unregister(int proto) in bt_sock_unregister() argument
104 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_unregister()
108 bt_proto[proto] = NULL; in bt_sock_unregister()
113 static int bt_sock_create(struct net *net, struct socket *sock, int proto, in bt_sock_create() argument
121 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_create()
124 if (!bt_proto[proto]) in bt_sock_create()
125 request_module("bt-proto-%d", proto); in bt_sock_create()
131 if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { in bt_sock_create()
132 err = bt_proto[proto]->create(net, sock, proto, kern); in bt_sock_create()
134 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
135 module_put(bt_proto[proto]->owner); in bt_sock_create()
144 struct proto *prot, int proto, gfp_t prio, int kern) in bt_sock_alloc() argument
157 sk->sk_protocol = proto; in bt_sock_alloc()