Bluetooth: Send management event for class of device changes
Currently there are no events to other management sockets if the class of device got changed. So make sure they are sent. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
committed by
Johan Hedberg
parent
955638ecec
commit
7f9a903c57
@ -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)
|
||||
|
Reference in New Issue
Block a user