diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-07-03 04:02:29 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-07-03 22:53:56 -0400 |
commit | da1f519851d1c66331363253f364bdb5d924ea96 (patch) | |
tree | 8760b2edb53a50d679403385dc2cbf960bb3cffc /net/bluetooth | |
parent | dcdcf63ef12dc3fbaa17a6d04f16ada8e63bb4d0 (diff) |
[Bluetooth] Correct SCO buffer size on request
This patch introduces a quirk that allows the drivers to tell the host
to correct the SCO buffer size values.
Signed-off-by: Olivier Galibert <galibert@pobox.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_event.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 618bacee1b1c..f41cf1a6c11a 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -319,9 +319,17 @@ static void hci_cc_info_param(struct hci_dev *hdev, __u16 ocf, struct sk_buff *s | |||
319 | } | 319 | } |
320 | 320 | ||
321 | hdev->acl_mtu = __le16_to_cpu(bs->acl_mtu); | 321 | hdev->acl_mtu = __le16_to_cpu(bs->acl_mtu); |
322 | hdev->sco_mtu = bs->sco_mtu ? bs->sco_mtu : 64; | 322 | hdev->sco_mtu = bs->sco_mtu; |
323 | hdev->acl_pkts = hdev->acl_cnt = __le16_to_cpu(bs->acl_max_pkt); | 323 | hdev->acl_pkts = __le16_to_cpu(bs->acl_max_pkt); |
324 | hdev->sco_pkts = hdev->sco_cnt = __le16_to_cpu(bs->sco_max_pkt); | 324 | hdev->sco_pkts = __le16_to_cpu(bs->sco_max_pkt); |
325 | |||
326 | if (test_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks)) { | ||
327 | hdev->sco_mtu = 64; | ||
328 | hdev->sco_pkts = 8; | ||
329 | } | ||
330 | |||
331 | hdev->acl_cnt = hdev->acl_pkts; | ||
332 | hdev->sco_cnt = hdev->sco_pkts; | ||
325 | 333 | ||
326 | BT_DBG("%s mtu: acl %d, sco %d max_pkt: acl %d, sco %d", hdev->name, | 334 | BT_DBG("%s mtu: acl %d, sco %d max_pkt: acl %d, sco %d", hdev->name, |
327 | hdev->acl_mtu, hdev->sco_mtu, hdev->acl_pkts, hdev->sco_pkts); | 335 | hdev->acl_mtu, hdev->sco_mtu, hdev->acl_pkts, hdev->sco_pkts); |