Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279289
b: refs/heads/master
c: f428091
h: refs/heads/master
i:
  279287: c69a7a0
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo F. Padovan committed Dec 18, 2011
1 parent b8d6b56 commit c3e8452
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 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: 350ee4cfc0ea620bd1126ad4daa295586d6aa3a9
refs/heads/master: f42809185896296d5662778e4ec63e084cfa5f2b
47 changes: 29 additions & 18 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2273,28 +2273,39 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s
count = get_unaligned_le16(ptr++);

conn = hci_conn_hash_lookup_handle(hdev, handle);
if (conn) {
conn->sent -= count;

if (conn->type == ACL_LINK) {
if (!conn)
continue;

conn->sent -= count;

switch (conn->type) {
case ACL_LINK:
hdev->acl_cnt += count;
if (hdev->acl_cnt > hdev->acl_pkts)
hdev->acl_cnt = hdev->acl_pkts;
break;

case LE_LINK:
if (hdev->le_pkts) {
hdev->le_cnt += count;
if (hdev->le_cnt > hdev->le_pkts)
hdev->le_cnt = hdev->le_pkts;
} else {
hdev->acl_cnt += count;
if (hdev->acl_cnt > hdev->acl_pkts)
hdev->acl_cnt = hdev->acl_pkts;
} else if (conn->type == LE_LINK) {
if (hdev->le_pkts) {
hdev->le_cnt += count;
if (hdev->le_cnt > hdev->le_pkts)
hdev->le_cnt = hdev->le_pkts;
} else {
hdev->acl_cnt += count;
if (hdev->acl_cnt > hdev->acl_pkts)
hdev->acl_cnt = hdev->acl_pkts;
}
} else {
hdev->sco_cnt += count;
if (hdev->sco_cnt > hdev->sco_pkts)
hdev->sco_cnt = hdev->sco_pkts;
}
break;

case SCO_LINK:
hdev->sco_cnt += count;
if (hdev->sco_cnt > hdev->sco_pkts)
hdev->sco_cnt = hdev->sco_pkts;
break;

default:
BT_ERR("Unknown type %d conn %p", conn->type, conn);
break;
}
}

Expand Down

0 comments on commit c3e8452

Please sign in to comment.