* [PATCH] Bluetooth: Remove magic number from ACL TO
@ 2012-01-04 14:42 Emeltchenko Andrei
2012-01-04 15:46 ` Marcel Holtmann
2012-01-08 20:30 ` Johan Hedberg
0 siblings, 2 replies; 3+ messages in thread
From: Emeltchenko Andrei @ 2012-01-04 14:42 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Adds HCI_ACL_TX_TIMEOUT and clear conversion from msec to jiffies
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
include/net/bluetooth/hci.h | 1 +
net/bluetooth/hci_core.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5b2fed5..e6dbff2 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -130,6 +130,7 @@ enum {
#define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */
#define HCI_INIT_TIMEOUT (10000) /* 10 seconds */
#define HCI_CMD_TIMEOUT (1000) /* 1 seconds */
+#define HCI_ACL_TX_TIMEOUT (45000) /* 45 seconds */
/* HCI data types */
#define HCI_COMMAND_PKT 0x01
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 6d38d80..8f74a52 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2249,7 +2249,8 @@ static inline void hci_sched_acl(struct hci_dev *hdev)
if (!test_bit(HCI_RAW, &hdev->flags)) {
/* ACL tx timeout must be longer than maximum
* link supervision timeout (40.9 seconds) */
- if (!hdev->acl_cnt && time_after(jiffies, hdev->acl_last_tx + HZ * 45))
+ if (!hdev->acl_cnt && time_after(jiffies, hdev->acl_last_tx +
+ msecs_to_jiffies(HCI_ACL_TX_TIMEOUT)))
hci_link_tx_to(hdev, ACL_LINK);
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Bluetooth: Remove magic number from ACL TO
2012-01-04 14:42 [PATCH] Bluetooth: Remove magic number from ACL TO Emeltchenko Andrei
@ 2012-01-04 15:46 ` Marcel Holtmann
2012-01-08 20:30 ` Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2012-01-04 15:46 UTC (permalink / raw)
To: Emeltchenko Andrei; +Cc: linux-bluetooth
Hi Andrei,
> Adds HCI_ACL_TX_TIMEOUT and clear conversion from msec to jiffies
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> include/net/bluetooth/hci.h | 1 +
> net/bluetooth/hci_core.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletions(-)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Remove magic number from ACL TO
2012-01-04 14:42 [PATCH] Bluetooth: Remove magic number from ACL TO Emeltchenko Andrei
2012-01-04 15:46 ` Marcel Holtmann
@ 2012-01-08 20:30 ` Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2012-01-08 20:30 UTC (permalink / raw)
To: Emeltchenko Andrei; +Cc: linux-bluetooth
Hi Andrei,
On Wed, Jan 04, 2012, Emeltchenko Andrei wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Adds HCI_ACL_TX_TIMEOUT and clear conversion from msec to jiffies
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> include/net/bluetooth/hci.h | 1 +
> net/bluetooth/hci_core.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletions(-)
Applied to my bluetooth-next tree. Thanks.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-08 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04 14:42 [PATCH] Bluetooth: Remove magic number from ACL TO Emeltchenko Andrei
2012-01-04 15:46 ` Marcel Holtmann
2012-01-08 20:30 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).