Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291035
b: refs/heads/master
c: 7f9a903
h: refs/heads/master
i:
  291033: c88c39d
  291031: 629dbdd
v: v3
  • Loading branch information
Marcel Holtmann authored and Johan Hedberg committed Feb 23, 2012
1 parent 4c0c705 commit aa48230
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 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: 955638ecec9431788e291fc99f34c42124071abe
refs/heads/master: 7f9a903c57bb42b9f7ad8fb7867859d3252229ab
2 changes: 2 additions & 0 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,8 @@ int mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
u8 addr_type, u8 status);
int mgmt_auth_enable_complete(struct hci_dev *hdev, u8 status);
int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status);
int mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class,
u8 status);
int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status);
int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash,
u8 *randomizer, u8 status);
Expand Down
13 changes: 9 additions & 4 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,19 @@ static void hci_cc_write_class_of_dev(struct hci_dev *hdev, struct sk_buff *skb)

BT_DBG("%s status 0x%x", hdev->name, status);

if (status)
return;

sent = hci_sent_cmd_data(hdev, HCI_OP_WRITE_CLASS_OF_DEV);
if (!sent)
return;

memcpy(hdev->dev_class, sent, 3);
hci_dev_lock(hdev);

if (status == 0)
memcpy(hdev->dev_class, sent, 3);

if (test_bit(HCI_MGMT, &hdev->dev_flags))
mgmt_set_class_of_dev_complete(hdev, sent, status);

hci_dev_unlock(hdev);
}

static void hci_cc_read_voice_setting(struct hci_dev *hdev, struct sk_buff *skb)
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3546,6 +3546,16 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
return err;
}

int mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class,
u8 status)
{
int err;

err = mgmt_event(MGMT_EV_CLASS_OF_DEV_CHANGED, hdev, dev_class, 3, NULL);

return err;
}

int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status)
{
struct pending_cmd *cmd;
Expand Down

0 comments on commit aa48230

Please sign in to comment.