Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315654
b: refs/heads/master
c: bda4f23
h: refs/heads/master
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Jun 12, 2012
1 parent 3540cb4 commit 11b517a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f246e890502fed387e0f959e2224ea680c03423
refs/heads/master: bda4f23a5c20deabb07545591be872145528b4ed
14 changes: 11 additions & 3 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1366,11 +1366,19 @@ int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr)
}

/* HCI command timer function */
static void hci_cmd_timer(unsigned long arg)
static void hci_cmd_timeout(unsigned long arg)
{
struct hci_dev *hdev = (void *) arg;

BT_ERR("%s command tx timeout", hdev->name);
if (hdev->sent_cmd) {
struct hci_command_hdr *sent = (void *) hdev->sent_cmd->data;
u16 opcode = __le16_to_cpu(sent->opcode);

BT_ERR("%s command 0x%4.4x tx timeout", hdev->name, opcode);
} else {
BT_ERR("%s command tx timeout", hdev->name);
}

atomic_set(&hdev->cmd_cnt, 1);
queue_work(hdev->workqueue, &hdev->cmd_work);
}
Expand Down Expand Up @@ -1668,7 +1676,7 @@ struct hci_dev *hci_alloc_dev(void)

init_waitqueue_head(&hdev->req_wait_q);

setup_timer(&hdev->cmd_timer, hci_cmd_timer, (unsigned long) hdev);
setup_timer(&hdev->cmd_timer, hci_cmd_timeout, (unsigned long) hdev);

hci_init_sysfs(hdev);
discovery_init(hdev);
Expand Down

0 comments on commit 11b517a

Please sign in to comment.