summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>2014-05-16 16:48:57 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-05-16 08:23:01 -0700
commitf4e2dd53d5d876aaf33ec9c4d3dd0286a5bf89c5 (patch)
tree18b038f5e2468c766d9e0002a0cbb9a9567e3061 /net/bluetooth
parenteed5daf318cf579f06c3e1eb47d014c35c84e3a3 (diff)
downloadlinux-f4e2dd53d5d876aaf33ec9c4d3dd0286a5bf89c5.tar.bz2
Bluetooth: Add missing msecs to jiffies conversion
conn_info_age value is calculated in ms, so need to be converted to jiffies. Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 17ebaa3b01bb..370cd42f488b 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -4708,7 +4708,8 @@ static int get_conn_info(struct sock *sk, struct hci_dev *hdev, void *data,
/* Query controller to refresh cached values if they are too old or were
* never read.
*/
- if (time_after(jiffies, conn->conn_info_timestamp + conn_info_age) ||
+ if (time_after(jiffies, conn->conn_info_timestamp +
+ msecs_to_jiffies(conn_info_age)) ||
!conn->conn_info_timestamp) {
struct hci_request req;
struct hci_cp_read_tx_power req_txp_cp;