aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 92960532dea4..173bebd42825 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1711,19 +1711,19 @@ static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type, int
1711 return conn; 1711 return conn;
1712} 1712}
1713 1713
1714static inline void hci_acl_tx_to(struct hci_dev *hdev) 1714static inline void hci_link_tx_to(struct hci_dev *hdev, __u8 type)
1715{ 1715{
1716 struct hci_conn_hash *h = &hdev->conn_hash; 1716 struct hci_conn_hash *h = &hdev->conn_hash;
1717 struct list_head *p; 1717 struct list_head *p;
1718 struct hci_conn *c; 1718 struct hci_conn *c;
1719 1719
1720 BT_ERR("%s ACL tx timeout", hdev->name); 1720 BT_ERR("%s link tx timeout", hdev->name);
1721 1721
1722 /* Kill stalled connections */ 1722 /* Kill stalled connections */
1723 list_for_each(p, &h->list) { 1723 list_for_each(p, &h->list) {
1724 c = list_entry(p, struct hci_conn, list); 1724 c = list_entry(p, struct hci_conn, list);
1725 if (c->type == ACL_LINK && c->sent) { 1725 if (c->type == type && c->sent) {
1726 BT_ERR("%s killing stalled ACL connection %s", 1726 BT_ERR("%s killing stalled connection %s",
1727 hdev->name, batostr(&c->dst)); 1727 hdev->name, batostr(&c->dst));
1728 hci_acl_disconn(c, 0x13); 1728 hci_acl_disconn(c, 0x13);
1729 } 1729 }
@@ -1742,7 +1742,7 @@ static inline void hci_sched_acl(struct hci_dev *hdev)
1742 /* ACL tx timeout must be longer than maximum 1742 /* ACL tx timeout must be longer than maximum
1743 * link supervision timeout (40.9 seconds) */ 1743 * link supervision timeout (40.9 seconds) */
1744 if (!hdev->acl_cnt && time_after(jiffies, hdev->acl_last_tx + HZ * 45)) 1744 if (!hdev->acl_cnt && time_after(jiffies, hdev->acl_last_tx + HZ * 45))
1745 hci_acl_tx_to(hdev); 1745 hci_link_tx_to(hdev, ACL_LINK);
1746 } 1746 }
1747 1747
1748 while (hdev->acl_cnt && (conn = hci_low_sent(hdev, ACL_LINK, &quote))) { 1748 while (hdev->acl_cnt && (conn = hci_low_sent(hdev, ACL_LINK, &quote))) {
@@ -1812,9 +1812,9 @@ static inline void hci_sched_le(struct hci_dev *hdev)
1812 if (!test_bit(HCI_RAW, &hdev->flags)) { 1812 if (!test_bit(HCI_RAW, &hdev->flags)) {
1813 /* LE tx timeout must be longer than maximum 1813 /* LE tx timeout must be longer than maximum
1814 * link supervision timeout (40.9 seconds) */ 1814 * link supervision timeout (40.9 seconds) */
1815 if (!hdev->le_cnt && 1815 if (!hdev->le_cnt && hdev->le_pkts &&
1816 time_after(jiffies, hdev->le_last_tx + HZ * 45)) 1816 time_after(jiffies, hdev->le_last_tx + HZ * 45))
1817 hci_acl_tx_to(hdev); 1817 hci_link_tx_to(hdev, LE_LINK);
1818 } 1818 }
1819 1819
1820 cnt = hdev->le_pkts ? hdev->le_cnt : hdev->acl_cnt; 1820 cnt = hdev->le_pkts ? hdev->le_cnt : hdev->acl_cnt;