diff options
author | Dean Jenkins <Dean_Jenkins@mentor.com> | 2015-06-23 12:59:38 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-07-23 11:10:51 -0400 |
commit | cb02a25583b59ce48267472cd092485d754964f9 (patch) | |
tree | fd44e800c2d29874c263a42256ad2572dd9f0325 /net/bluetooth/l2cap_sock.c | |
parent | 451e4c6c6b3fd1a9f446a10eb9f6d4c2c476043c (diff) |
Bluetooth: __l2cap_wait_ack() use msecs_to_jiffies()
Use msecs_to_jiffies() instead of using HZ so that it
is easier to specify the time in milliseconds.
Also add a #define L2CAP_WAIT_ACK_POLL_PERIOD to specify the 200ms
polling period so that it is defined in a single place.
Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index d915e4a96313..f0b052a75e8a 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -1058,7 +1058,7 @@ static int __l2cap_wait_ack(struct sock *sk, struct l2cap_chan *chan) | |||
1058 | { | 1058 | { |
1059 | DECLARE_WAITQUEUE(wait, current); | 1059 | DECLARE_WAITQUEUE(wait, current); |
1060 | int err = 0; | 1060 | int err = 0; |
1061 | int timeo = HZ/5; | 1061 | int timeo = L2CAP_WAIT_ACK_POLL_PERIOD; |
1062 | 1062 | ||
1063 | add_wait_queue(sk_sleep(sk), &wait); | 1063 | add_wait_queue(sk_sleep(sk), &wait); |
1064 | set_current_state(TASK_INTERRUPTIBLE); | 1064 | set_current_state(TASK_INTERRUPTIBLE); |
@@ -1066,7 +1066,7 @@ static int __l2cap_wait_ack(struct sock *sk, struct l2cap_chan *chan) | |||
1066 | BT_DBG("Waiting for %d ACKs", chan->unacked_frames); | 1066 | BT_DBG("Waiting for %d ACKs", chan->unacked_frames); |
1067 | 1067 | ||
1068 | if (!timeo) | 1068 | if (!timeo) |
1069 | timeo = HZ/5; | 1069 | timeo = L2CAP_WAIT_ACK_POLL_PERIOD; |
1070 | 1070 | ||
1071 | if (signal_pending(current)) { | 1071 | if (signal_pending(current)) { |
1072 | err = sock_intr_errno(timeo); | 1072 | err = sock_intr_errno(timeo); |