Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/bluetooth/bluetooth-next
  • Loading branch information
linvjw committed Jul 18, 2012
2 parents e8c7b33 + e048210 commit 0cd0664
Show file tree
Hide file tree
Showing 21 changed files with 1,124 additions and 286 deletions.
12 changes: 12 additions & 0 deletions drivers/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ config BT_HCIUART_LL

Say Y here to compile support for HCILL protocol.

config BT_HCIUART_3WIRE
bool "Three-wire UART (H5) protocol support"
depends on BT_HCIUART
help
The HCI Three-wire UART Transport Layer makes it possible to
user the Bluetooth HCI over a serial port interface. The HCI
Three-wire UART Transport Layer assumes that the UART
communication may have bit errors, overrun errors or burst
errors and thereby making CTS/RTS lines unnecessary.

Say Y here to compile support for Three-wire UART protocol.

config BT_HCIBCM203X
tristate "HCI BCM203x USB driver"
depends on USB
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ hci_uart-$(CONFIG_BT_HCIUART_H4) += hci_h4.o
hci_uart-$(CONFIG_BT_HCIUART_BCSP) += hci_bcsp.o
hci_uart-$(CONFIG_BT_HCIUART_LL) += hci_ll.o
hci_uart-$(CONFIG_BT_HCIUART_ATH3K) += hci_ath.o
hci_uart-$(CONFIG_BT_HCIUART_3WIRE) += hci_h5.o
hci_uart-objs := $(hci_uart-y)
6 changes: 4 additions & 2 deletions drivers/bluetooth/bluecard_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
static int bluecard_hci_open(struct hci_dev *hdev)
{
bluecard_info_t *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
Expand All @@ -630,6 +629,8 @@ static int bluecard_hci_open(struct hci_dev *hdev)
return 0;

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
unsigned int iobase = info->p_dev->resource[0]->start;

/* Enable LED */
outb(0x08 | 0x20, iobase + 0x30);
}
Expand All @@ -641,14 +642,15 @@ static int bluecard_hci_open(struct hci_dev *hdev)
static int bluecard_hci_close(struct hci_dev *hdev)
{
bluecard_info_t *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;

if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
return 0;

bluecard_hci_flush(hdev);

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
unsigned int iobase = info->p_dev->resource[0]->start;

/* Disable LED */
outb(0x00, iobase + 0x30);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/bt3c_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data)
{
int *try = priv_data;

if (try == 0)
if (!try)
p_dev->io_lines = 16;

if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
Expand Down
8 changes: 5 additions & 3 deletions drivers/bluetooth/btmrvl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ EXPORT_SYMBOL_GPL(btmrvl_interrupt);
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
struct hci_event_hdr *hdr = (void *) skb->data;
struct hci_ev_cmd_complete *ec;
u16 opcode, ocf, ogf;

if (hdr->evt == HCI_EV_CMD_COMPLETE) {
struct hci_ev_cmd_complete *ec;
u16 opcode, ocf, ogf;

ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode);
ocf = hci_opcode_ocf(opcode);
Expand All @@ -64,7 +65,8 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
}

if (ogf == OGF) {
BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
BT_DBG("vendor event skipped: ogf 0x%4.4x ocf 0x%4.4x",
ogf, ocf);
kfree_skb(skb);
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/bluetooth/btmrvl_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,9 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
if (type == HCI_EVENT_PKT) {
if (btmrvl_check_evtpkt(priv, skb))
hci_recv_frame(skb);
} else
} else {
hci_recv_frame(skb);
}

hdev->stat.byte_rx += buf_len;
break;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/btuart_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data)
{
int *try = priv_data;

if (try == 0)
if (!try)
p_dev->io_lines = 16;

if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
Expand Down
18 changes: 10 additions & 8 deletions drivers/bluetooth/dtl1_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,29 +586,31 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data)
static int dtl1_config(struct pcmcia_device *link)
{
dtl1_info_t *info = link->priv;
int i;
int ret;

/* Look for a generic full-sized window */
link->resource[0]->end = 8;
if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
ret = pcmcia_loop_config(link, dtl1_confcheck, NULL);
if (ret)
goto failed;

i = pcmcia_request_irq(link, dtl1_interrupt);
if (i != 0)
ret = pcmcia_request_irq(link, dtl1_interrupt);
if (ret)
goto failed;

i = pcmcia_enable_device(link);
if (i != 0)
ret = pcmcia_enable_device(link);
if (ret)
goto failed;

if (dtl1_open(info) != 0)
ret = dtl1_open(info);
if (ret)
goto failed;

return 0;

failed:
dtl1_detach(link);
return -ENODEV;
return ret;
}

static const struct pcmcia_device_id dtl1_ids[] = {
Expand Down
Loading

0 comments on commit 0cd0664

Please sign in to comment.