#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/sched/signal.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/sco.h>
static bool disable_esco;
static const struct proto_ops sco_sock_ops;
static struct bt_sock_list sco_sk_list = …;
struct sco_conn { … };
#define sco_conn_lock(c) …
#define sco_conn_unlock(c) …
static void sco_sock_close(struct sock *sk);
static void sco_sock_kill(struct sock *sk);
#define sco_pi(sk) …
struct sco_pinfo { … };
#define SCO_CONN_TIMEOUT …
#define SCO_DISCONN_TIMEOUT …
static struct sock *sco_sock_hold(struct sco_conn *conn)
{ … }
static void sco_sock_timeout(struct work_struct *work)
{ … }
static void sco_sock_set_timer(struct sock *sk, long timeout)
{ … }
static void sco_sock_clear_timer(struct sock *sk)
{ … }
static struct sco_conn *sco_conn_add(struct hci_conn *hcon)
{ … }
static void sco_chan_del(struct sock *sk, int err)
{ … }
static void sco_conn_del(struct hci_conn *hcon, int err)
{ … }
static void __sco_chan_add(struct sco_conn *conn, struct sock *sk,
struct sock *parent)
{ … }
static int sco_chan_add(struct sco_conn *conn, struct sock *sk,
struct sock *parent)
{ … }
static int sco_connect(struct sock *sk)
{ … }
static int sco_send_frame(struct sock *sk, struct sk_buff *skb)
{ … }
static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
{ … }
static struct sock *__sco_get_sock_listen_by_addr(bdaddr_t *ba)
{ … }
static struct sock *sco_get_sock_listen(bdaddr_t *src)
{ … }
static void sco_sock_destruct(struct sock *sk)
{ … }
static void sco_sock_cleanup_listen(struct sock *parent)
{ … }
static void sco_sock_kill(struct sock *sk)
{ … }
static void __sco_sock_close(struct sock *sk)
{ … }
static void sco_sock_close(struct sock *sk)
{ … }
static void sco_sock_init(struct sock *sk, struct sock *parent)
{ … }
static struct proto sco_proto = …;
static struct sock *sco_sock_alloc(struct net *net, struct socket *sock,
int proto, gfp_t prio, int kern)
{ … }
static int sco_sock_create(struct net *net, struct socket *sock, int protocol,
int kern)
{ … }
static int sco_sock_bind(struct socket *sock, struct sockaddr *addr,
int addr_len)
{ … }
static int sco_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags)
{ … }
static int sco_sock_listen(struct socket *sock, int backlog)
{ … }
static int sco_sock_accept(struct socket *sock, struct socket *newsock,
struct proto_accept_arg *arg)
{ … }
static int sco_sock_getname(struct socket *sock, struct sockaddr *addr,
int peer)
{ … }
static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
size_t len)
{ … }
static void sco_conn_defer_accept(struct hci_conn *conn, u16 setting)
{ … }
static int sco_sock_recvmsg(struct socket *sock, struct msghdr *msg,
size_t len, int flags)
{ … }
static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
sockptr_t optval, unsigned int optlen)
{ … }
static int sco_sock_getsockopt_old(struct socket *sock, int optname,
char __user *optval, int __user *optlen)
{ … }
static int sco_sock_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{ … }
static int sco_sock_shutdown(struct socket *sock, int how)
{ … }
static int sco_sock_release(struct socket *sock)
{ … }
static void sco_conn_ready(struct sco_conn *conn)
{ … }
int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
{ … }
static void sco_connect_cfm(struct hci_conn *hcon, __u8 status)
{ … }
static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
{ … }
void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
{ … }
static struct hci_cb sco_cb = …;
static int sco_debugfs_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static struct dentry *sco_debugfs;
static const struct proto_ops sco_sock_ops = …;
static const struct net_proto_family sco_sock_family_ops = …;
int __init sco_init(void)
{ … }
void sco_exit(void)
{ … }
module_param(disable_esco, bool, 0644);
MODULE_PARM_DESC(…) …;