aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:47 -0400
committerMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:47 -0400
commitc7bdd5026d28d178238bd794c61612602a54d55e (patch)
treec79bd21f11ceacdf31255c536861587edb8967b5 /net
parentf383f2750af19fe6f820edf40d8729f9741c5b37 (diff)
[Bluetooth] Update class of device value whenever possible
The class of device value can only be retrieved via inquiry or during an incoming connection request. Outgoing connections can't ask for the class of device. To compensate for this the value is stored and copied via the inquiry cache, but currently only updated via inquiry. This update should also happen during an incoming connection request. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index bf3fbf9817b4..e47676128bb5 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -796,10 +796,14 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
796 796
797 if (mask & HCI_LM_ACCEPT) { 797 if (mask & HCI_LM_ACCEPT) {
798 /* Connection accepted */ 798 /* Connection accepted */
799 struct inquiry_entry *ie;
799 struct hci_conn *conn; 800 struct hci_conn *conn;
800 801
801 hci_dev_lock(hdev); 802 hci_dev_lock(hdev);
802 803
804 if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr)))
805 memcpy(ie->data.dev_class, ev->dev_class, 3);
806
803 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); 807 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
804 if (!conn) { 808 if (!conn) {
805 if (!(conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr))) { 809 if (!(conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr))) {