]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/bluetooth/sco.c
Bluetooth: Move struct sco_conn into net/bluetooth/sco.c
[mirror_ubuntu-bionic-kernel.git] / net / bluetooth / sco.c
index c06dbd3938e881e45d575b586830d2bea9d580a0..9868ec7c7dc47f37bdc3d1da25718e39dbab9490 100644 (file)
@@ -40,12 +40,37 @@ static struct bt_sock_list sco_sk_list = {
        .lock = __RW_LOCK_UNLOCKED(sco_sk_list.lock)
 };
 
+/* ---- SCO connections ---- */
+struct sco_conn {
+       struct hci_conn *hcon;
+
+       spinlock_t      lock;
+       struct sock     *sk;
+
+       unsigned int    mtu;
+};
+
+#define sco_conn_lock(c)       spin_lock(&c->lock);
+#define sco_conn_unlock(c)     spin_unlock(&c->lock);
+
 static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent);
 static void sco_chan_del(struct sock *sk, int err);
 
 static void sco_sock_close(struct sock *sk);
 static void sco_sock_kill(struct sock *sk);
 
+/* ----- SCO socket info ----- */
+#define sco_pi(sk) ((struct sco_pinfo *) sk)
+
+struct sco_pinfo {
+       struct bt_sock  bt;
+       bdaddr_t        src;
+       bdaddr_t        dst;
+       __u32           flags;
+       __u16           setting;
+       struct sco_conn *conn;
+};
+
 /* ---- SCO timers ---- */
 static void sco_sock_timeout(unsigned long arg)
 {