Lines Matching refs:proto
67 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument
73 bt_slock_key_strings[proto], &bt_slock_key[proto], in bt_sock_reclassify_lock()
74 bt_key_strings[proto], &bt_lock_key[proto]); in bt_sock_reclassify_lock()
78 int bt_sock_register(int proto, const struct net_proto_family *ops) in bt_sock_register() argument
82 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_register()
87 if (bt_proto[proto]) in bt_sock_register()
90 bt_proto[proto] = ops; in bt_sock_register()
98 void bt_sock_unregister(int proto) in bt_sock_unregister() argument
100 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_unregister()
104 bt_proto[proto] = NULL; in bt_sock_unregister()
109 static int bt_sock_create(struct net *net, struct socket *sock, int proto, in bt_sock_create() argument
117 if (proto < 0 || proto >= BT_MAX_PROTO) in bt_sock_create()
120 if (!bt_proto[proto]) in bt_sock_create()
121 request_module("bt-proto-%d", proto); in bt_sock_create()
127 if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { in bt_sock_create()
128 err = bt_proto[proto]->create(net, sock, proto, kern); in bt_sock_create()
130 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
131 module_put(bt_proto[proto]->owner); in bt_sock_create()