Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377394
b: refs/heads/master
c: 59f45d5
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg authored and John W. Linville committed Jun 13, 2013
1 parent fbeff95 commit 2a93eca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: 300b962e5244a1ea010df7e88595faa0085b461d
refs/heads/master: 59f45d576a0715026d1919ab8a12047616204656
15 changes: 10 additions & 5 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ static void hci_init1_req(struct hci_request *req, unsigned long opt)

static void bredr_setup(struct hci_request *req)
{
struct hci_cp_delete_stored_link_key cp;
__le16 param;
__u8 flt_type;

Expand All @@ -365,10 +364,6 @@ static void bredr_setup(struct hci_request *req)
param = __constant_cpu_to_le16(0x7d00);
hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, &param);

bacpy(&cp.bdaddr, BDADDR_ANY);
cp.delete_all = 0x01;
hci_req_add(req, HCI_OP_DELETE_STORED_LINK_KEY, sizeof(cp), &cp);

/* Read page scan parameters */
if (req->hdev->hci_ver > BLUETOOTH_VER_1_1) {
hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL);
Expand Down Expand Up @@ -602,6 +597,16 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
struct hci_dev *hdev = req->hdev;
u8 p;

/* Only send HCI_Delete_Stored_Link_Key if it is supported */
if (hdev->commands[6] & 0x80) {
struct hci_cp_delete_stored_link_key cp;

bacpy(&cp.bdaddr, BDADDR_ANY);
cp.delete_all = 0x01;
hci_req_add(req, HCI_OP_DELETE_STORED_LINK_KEY,
sizeof(cp), &cp);
}

if (hdev->commands[5] & 0x10)
hci_setup_link_policy(req);

Expand Down

0 comments on commit 2a93eca

Please sign in to comment.