Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth...
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 18 Mar 2013 19:17:11 +0000 (15:17 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 18 Mar 2013 19:17:11 +0000 (15:17 -0400)
1  2 
drivers/bluetooth/ath3k.c
net/bluetooth/sco.c

@@@ -73,9 -73,11 +73,11 @@@ static struct usb_device_id ath3k_table
        { USB_DEVICE(0x03F0, 0x311D) },
  
        /* Atheros AR3012 with sflash firmware*/
+       { USB_DEVICE(0x0CF3, 0x0036) },
        { USB_DEVICE(0x0CF3, 0x3004) },
        { USB_DEVICE(0x0CF3, 0x3008) },
        { USB_DEVICE(0x0CF3, 0x311D) },
+       { USB_DEVICE(0x0CF3, 0x817a) },
        { USB_DEVICE(0x13d3, 0x3375) },
        { USB_DEVICE(0x04CA, 0x3004) },
        { USB_DEVICE(0x04CA, 0x3005) },
@@@ -107,9 -109,11 +109,11 @@@ MODULE_DEVICE_TABLE(usb, ath3k_table)
  static struct usb_device_id ath3k_blist_tbl[] = {
  
        /* Atheros AR3012 with sflash firmware*/
+       { USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 },
        { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
        { USB_DEVICE(0x0cf3, 0x3008), .driver_info = BTUSB_ATH3012 },
        { USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0CF3, 0x817a), .driver_info = BTUSB_ATH3012 },
        { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
        { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
        { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
@@@ -353,7 -357,7 +357,7 @@@ static int ath3k_load_syscfg(struct usb
  
        ret = ath3k_get_state(udev, &fw_state);
        if (ret < 0) {
 -              BT_ERR("Can't get state to change to load configration err");
 +              BT_ERR("Can't get state to change to load configuration err");
                return -EBUSY;
        }
  
diff --combined net/bluetooth/sco.c
@@@ -259,9 -259,10 +259,9 @@@ drop
  /* -------- Socket interface ---------- */
  static struct sock *__sco_get_sock_listen_by_addr(bdaddr_t *ba)
  {
 -      struct hlist_node *node;
        struct sock *sk;
  
 -      sk_for_each(sk, node, &sco_sk_list.head) {
 +      sk_for_each(sk, &sco_sk_list.head) {
                if (sk->sk_state != BT_LISTEN)
                        continue;
  
  static struct sock *sco_get_sock_listen(bdaddr_t *src)
  {
        struct sock *sk = NULL, *sk1 = NULL;
 -      struct hlist_node *node;
  
        read_lock(&sco_sk_list.lock);
  
 -      sk_for_each(sk, node, &sco_sk_list.head) {
 +      sk_for_each(sk, &sco_sk_list.head) {
                if (sk->sk_state != BT_LISTEN)
                        continue;
  
  
        read_unlock(&sco_sk_list.lock);
  
 -      return node ? sk : sk1;
 +      return sk ? sk : sk1;
  }
  
  static void sco_sock_destruct(struct sock *sk)
@@@ -359,6 -361,7 +359,7 @@@ static void __sco_sock_close(struct soc
                        sco_chan_del(sk, ECONNRESET);
                break;
  
+       case BT_CONNECT2:
        case BT_CONNECT:
        case BT_DISCONN:
                sco_chan_del(sk, ECONNRESET);
@@@ -898,6 -901,8 +899,6 @@@ static void sco_conn_ready(struct sco_c
  
        BT_DBG("conn %p", conn);
  
 -      sco_conn_lock(conn);
 -
        if (sk) {
                sco_sock_clear_timer(sk);
                bh_lock_sock(sk);
                sk->sk_state_change(sk);
                bh_unlock_sock(sk);
        } else {
 +              sco_conn_lock(conn);
 +
                parent = sco_get_sock_listen(conn->src);
 -              if (!parent)
 -                      goto done;
 +              if (!parent) {
 +                      sco_conn_unlock(conn);
 +                      return;
 +              }
  
                bh_lock_sock(parent);
  
                                    BTPROTO_SCO, GFP_ATOMIC);
                if (!sk) {
                        bh_unlock_sock(parent);
 -                      goto done;
 +                      sco_conn_unlock(conn);
 +                      return;
                }
  
                sco_sock_init(sk, parent);
                parent->sk_data_ready(parent, 1);
  
                bh_unlock_sock(parent);
 -      }
  
 -done:
 -      sco_conn_unlock(conn);
 +              sco_conn_unlock(conn);
 +      }
  }
  
  /* ----- SCO interface with lower layer (HCI) ----- */
  int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags)
  {
        struct sock *sk;
 -      struct hlist_node *node;
        int lm = 0;
  
        BT_DBG("hdev %s, bdaddr %pMR", hdev->name, bdaddr);
  
        /* Find listening sockets */
        read_lock(&sco_sk_list.lock);
 -      sk_for_each(sk, node, &sco_sk_list.head) {
 +      sk_for_each(sk, &sco_sk_list.head) {
                if (sk->sk_state != BT_LISTEN)
                        continue;
  
@@@ -1015,10 -1017,11 +1016,10 @@@ drop
  static int sco_debugfs_show(struct seq_file *f, void *p)
  {
        struct sock *sk;
 -      struct hlist_node *node;
  
        read_lock(&sco_sk_list.lock);
  
 -      sk_for_each(sk, node, &sco_sk_list.head) {
 +      sk_for_each(sk, &sco_sk_list.head) {
                seq_printf(f, "%pMR %pMR %d\n", &bt_sk(sk)->src,
                           &bt_sk(sk)->dst, sk->sk_state);
        }