Lines Matching refs:proto
69 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument
75 bt_slock_key_strings[proto], &bt_slock_key[proto], in bt_sock_reclassify_lock()
76 bt_key_strings[proto], &bt_lock_key[proto]); in bt_sock_reclassify_lock()
80 int bt_sock_register(int proto, const struct net_proto_family *ops) in bt_sock_register() argument
84 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_register()
89 if (bt_proto[proto]) in bt_sock_register()
92 bt_proto[proto] = ops; in bt_sock_register()
100 void bt_sock_unregister(int proto) in bt_sock_unregister() argument
102 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_unregister()
106 bt_proto[proto] = NULL; in bt_sock_unregister()
111 static int bt_sock_create(struct net *net, struct socket *sock, int proto, in bt_sock_create() argument
119 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_create()
122 if (!bt_proto[proto]) in bt_sock_create()
123 request_module("bt-proto-%d", proto); in bt_sock_create()
129 if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { in bt_sock_create()
130 err = bt_proto[proto]->create(net, sock, proto, kern); in bt_sock_create()
132 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
133 module_put(bt_proto[proto]->owner); in bt_sock_create()