public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* how bluez supports ESCO link?
@ 2008-12-09  6:38 Shi Buyun-FVBP83
  2008-12-12  1:46 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Shi Buyun-FVBP83 @ 2008-12-09  6:38 UTC (permalink / raw)
  To: linux-bluetooth

hi, all
In the current linux 2.6.25 kernel code, can Bluez setup ESCO link?
I found in net/bluetooth/sco.c, sco_connect defined as:

static int sco_connect(struct sock *sk)
{
 if (lmp_esco_capable(hdev) && !disable_esco)
  type = ESCO_LINK;
 else
  type = SCO_LINK;
 
 hcon = hci_connect(hdev, type, dst, HCI_AT_NO_BONDING);
 }
this code shows bluez supports ESCO link.
 
But in function struct hci_conn * hci_connect(struct hci_dev *hdev, int
type, bdaddr_t *dst)
{
 if (type == SCO_LINK) {
  struct hci_conn *sco;
 
  if (!(sco = hci_conn_hash_lookup_ba(hdev, SCO_LINK, dst))) {
   if (!(sco = hci_conn_add(hdev, SCO_LINK, dst))) {
    hci_conn_put(acl);
    return NULL;
   }
  }
  acl->link = sco;
  sco->link = acl;
 
  hci_conn_hold(sco);
 
  if (acl->state == BT_CONNECTED && 
    (sco->state == BT_OPEN || sco->state == BT_CLOSED))
   hci_add_sco(sco, acl->handle);
 
  return sco;
 } else {
  return acl;
 }
} 
the else switch shows it does nothing when type NOT equal to SCO_LINK.
Should this code need to modify or this is intended to designed?
 
Brs
Shi Buyun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-12  3:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09  6:38 how bluez supports ESCO link? Shi Buyun-FVBP83
2008-12-12  1:46 ` Marcel Holtmann
2008-12-12  3:22   ` shy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox