Commit b71e5b78 authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Remove USB zero packet option

This patch removes the USB zero packet option from the HCI USB
Bluetooth driver, because it is useless. It also corrects the
config name of the SCO audio support.
parent e6348be6
...@@ -13,22 +13,14 @@ config BT_HCIUSB ...@@ -13,22 +13,14 @@ config BT_HCIUSB
Say Y here to compile support for Bluetooth USB devices into the Say Y here to compile support for Bluetooth USB devices into the
kernel or say M to compile it as module (hci_usb). kernel or say M to compile it as module (hci_usb).
config BT_USB_SCO config BT_HCIUSB_SCO
bool "SCO over HCI USB support" bool "SCO (voice) support"
depends on BT_HCIUSB depends on BT_HCIUSB
help help
This option enables the SCO support in the HCI USB driver. You need this This option enables the SCO support in the HCI USB driver. You need this
to transmit voice data with your Bluetooth USB device. to transmit voice data with your Bluetooth USB device.
Say Y here to compile support for SCO over HCI USB.
config BT_USB_ZERO_PACKET Say Y here to compile support for SCO over HCI USB.
bool "USB zero packet support"
depends on BT_HCIUSB
help
This option is provided only as a work around for buggy Bluetooth USB
devices. Do _not_ enable it unless you know for sure that your device
requires zero packets.
Most people should say N here.
config BT_HCIUART config BT_HCIUART
tristate "HCI UART driver" tristate "HCI UART driver"
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#define BT_DMP( A... ) #define BT_DMP( A... )
#endif #endif
#ifndef CONFIG_BT_USB_ZERO_PACKET #ifndef CONFIG_BT_HCIUSB_ZERO_PACKET
#undef URB_ZERO_PACKET #undef URB_ZERO_PACKET
#define URB_ZERO_PACKET 0 #define URB_ZERO_PACKET 0
#endif #endif
...@@ -140,7 +140,7 @@ static inline struct _urb *__get_completed(struct hci_usb *husb, int type) ...@@ -140,7 +140,7 @@ static inline struct _urb *__get_completed(struct hci_usb *husb, int type)
return _urb_dequeue(__completed_q(husb, type)); return _urb_dequeue(__completed_q(husb, type));
} }
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
static void __fill_isoc_desc(struct urb *urb, int len, int mtu) static void __fill_isoc_desc(struct urb *urb, int len, int mtu)
{ {
int offset = 0, i; int offset = 0, i;
...@@ -238,7 +238,7 @@ static int hci_usb_bulk_rx_submit(struct hci_usb *husb) ...@@ -238,7 +238,7 @@ static int hci_usb_bulk_rx_submit(struct hci_usb *husb)
return err; return err;
} }
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
static int hci_usb_isoc_rx_submit(struct hci_usb *husb) static int hci_usb_isoc_rx_submit(struct hci_usb *husb)
{ {
struct _urb *_urb; struct _urb *_urb;
...@@ -307,7 +307,7 @@ static int hci_usb_open(struct hci_dev *hdev) ...@@ -307,7 +307,7 @@ static int hci_usb_open(struct hci_dev *hdev)
for (i = 0; i < HCI_MAX_BULK_RX; i++) for (i = 0; i < HCI_MAX_BULK_RX; i++)
hci_usb_bulk_rx_submit(husb); hci_usb_bulk_rx_submit(husb);
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
if (husb->isoc_iface) if (husb->isoc_iface)
for (i = 0; i < HCI_MAX_ISOC_RX; i++) for (i = 0; i < HCI_MAX_ISOC_RX; i++)
hci_usb_isoc_rx_submit(husb); hci_usb_isoc_rx_submit(husb);
...@@ -473,7 +473,7 @@ static inline int hci_usb_send_bulk(struct hci_usb *husb, struct sk_buff *skb) ...@@ -473,7 +473,7 @@ static inline int hci_usb_send_bulk(struct hci_usb *husb, struct sk_buff *skb)
return __tx_submit(husb, _urb); return __tx_submit(husb, _urb);
} }
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
static inline int hci_usb_send_isoc(struct hci_usb *husb, struct sk_buff *skb) static inline int hci_usb_send_isoc(struct hci_usb *husb, struct sk_buff *skb)
{ {
struct _urb *_urb = __get_completed(husb, skb->pkt_type); struct _urb *_urb = __get_completed(husb, skb->pkt_type);
...@@ -524,7 +524,7 @@ static void hci_usb_tx_process(struct hci_usb *husb) ...@@ -524,7 +524,7 @@ static void hci_usb_tx_process(struct hci_usb *husb)
skb_queue_head(q, skb); skb_queue_head(q, skb);
} }
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
/* Process SCO queue */ /* Process SCO queue */
q = __transmit_q(husb, HCI_SCODATA_PKT); q = __transmit_q(husb, HCI_SCODATA_PKT);
if (atomic_read(__pending_tx(husb, HCI_SCODATA_PKT)) < HCI_MAX_ISOC_TX && if (atomic_read(__pending_tx(husb, HCI_SCODATA_PKT)) < HCI_MAX_ISOC_TX &&
...@@ -583,7 +583,7 @@ static int hci_usb_send_frame(struct sk_buff *skb) ...@@ -583,7 +583,7 @@ static int hci_usb_send_frame(struct sk_buff *skb)
hdev->stat.acl_tx++; hdev->stat.acl_tx++;
break; break;
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
case HCI_SCODATA_PKT: case HCI_SCODATA_PKT:
hdev->stat.sco_tx++; hdev->stat.sco_tx++;
break; break;
...@@ -633,7 +633,7 @@ static inline int __recv_frame(struct hci_usb *husb, int type, void *data, int c ...@@ -633,7 +633,7 @@ static inline int __recv_frame(struct hci_usb *husb, int type, void *data, int c
} else } else
return -EILSEQ; return -EILSEQ;
break; break;
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
case HCI_SCODATA_PKT: case HCI_SCODATA_PKT:
if (count >= HCI_SCO_HDR_SIZE) { if (count >= HCI_SCO_HDR_SIZE) {
struct hci_sco_hdr *h = data; struct hci_sco_hdr *h = data;
...@@ -698,7 +698,7 @@ static void hci_usb_rx_complete(struct urb *urb, struct pt_regs *regs) ...@@ -698,7 +698,7 @@ static void hci_usb_rx_complete(struct urb *urb, struct pt_regs *regs)
goto resubmit; goto resubmit;
if (_urb->type == HCI_SCODATA_PKT) { if (_urb->type == HCI_SCODATA_PKT) {
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
int i; int i;
for (i=0; i < urb->number_of_packets; i++) { for (i=0; i < urb->number_of_packets; i++) {
BT_DBG("desc %d status %d offset %d len %d", i, BT_DBG("desc %d status %d offset %d len %d", i,
...@@ -833,7 +833,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -833,7 +833,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
bulk_out_ep[i] = ep; bulk_out_ep[i] = ep;
break; break;
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
case USB_ENDPOINT_XFER_ISOC: case USB_ENDPOINT_XFER_ISOC:
if (ep->desc.wMaxPacketSize < size || a > 2) if (ep->desc.wMaxPacketSize < size || a > 2)
break; break;
...@@ -859,7 +859,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -859,7 +859,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
goto done; goto done;
} }
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
if (!isoc_in_ep[1] || !isoc_out_ep[1]) { if (!isoc_in_ep[1] || !isoc_out_ep[1]) {
BT_DBG("Isoc endpoints not found"); BT_DBG("Isoc endpoints not found");
isoc_iface = NULL; isoc_iface = NULL;
...@@ -883,7 +883,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -883,7 +883,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
else else
husb->ctrl_req = HCI_CTRL_REQ; husb->ctrl_req = HCI_CTRL_REQ;
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_HCIUSB_SCO
if (isoc_iface) { if (isoc_iface) {
BT_DBG("isoc ifnum %d alts %d", isoc_ifnum, isoc_alts); BT_DBG("isoc ifnum %d alts %d", isoc_ifnum, isoc_alts);
if (usb_set_interface(udev, isoc_ifnum, isoc_alts)) { if (usb_set_interface(udev, isoc_ifnum, isoc_alts)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment