Skip to content

Commit

Permalink
Bluetooth: Add missing msecs to jiffies conversion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrzej Kaczmarek authored and Marcel Holtmann committed May 16, 2014
1 parent eed5daf commit f4e2dd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f4e2dd5

Please sign in to comment.