Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224923
b: refs/heads/master
c: cc11b9c
h: refs/heads/master
i:
  224921: 260943f
  224919: 54ff892
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo F. Padovan committed Dec 1, 2010
1 parent 1e10782 commit f3da3f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: 940a9eea80946b64b96bd8af1fc71b30c602d057
refs/heads/master: cc11b9c14da4ca1c545b424dae2ae8fb1ab04063
18 changes: 12 additions & 6 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,12 +996,14 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk

hci_dev_lock(hdev);

if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr)))
ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
if (ie)
memcpy(ie->data.dev_class, ev->dev_class, 3);

conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
if (!conn) {
if (!(conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr))) {
conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr);
if (!conn) {
BT_ERR("No memory for new connection");
hci_dev_unlock(hdev);
return;
Expand Down Expand Up @@ -1608,7 +1610,8 @@ static inline void hci_clock_offset_evt(struct hci_dev *hdev, struct sk_buff *sk
if (conn && !ev->status) {
struct inquiry_entry *ie;

if ((ie = hci_inquiry_cache_lookup(hdev, &conn->dst))) {
ie = hci_inquiry_cache_lookup(hdev, &conn->dst);
if (ie) {
ie->data.clock_offset = ev->clock_offset;
ie->timestamp = jiffies;
}
Expand Down Expand Up @@ -1642,7 +1645,8 @@ static inline void hci_pscan_rep_mode_evt(struct hci_dev *hdev, struct sk_buff *

hci_dev_lock(hdev);

if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr))) {
ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
if (ie) {
ie->data.pscan_rep_mode = ev->pscan_rep_mode;
ie->timestamp = jiffies;
}
Expand Down Expand Up @@ -1713,7 +1717,8 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b
if (!ev->status && ev->page == 0x01) {
struct inquiry_entry *ie;

if ((ie = hci_inquiry_cache_lookup(hdev, &conn->dst)))
ie = hci_inquiry_cache_lookup(hdev, &conn->dst);
if (ie)
ie->data.ssp_mode = (ev->features[0] & 0x01);

conn->ssp_mode = (ev->features[0] & 0x01);
Expand Down Expand Up @@ -1886,7 +1891,8 @@ static inline void hci_remote_host_features_evt(struct hci_dev *hdev, struct sk_

hci_dev_lock(hdev);

if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr)))
ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
if (ie)
ie->data.ssp_mode = (ev->features[0] & 0x01);

hci_dev_unlock(hdev);
Expand Down

0 comments on commit f3da3f2

Please sign in to comment.