Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp662975ybg; Wed, 3 Jun 2020 10:16:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgrDq1j1T+1+Xu6GTxwd/S2trqprfUmupkpechmole5XvqQsI07VSq9BqujC+B7hCjOmtN X-Received: by 2002:a17:906:1cd3:: with SMTP id i19mr266224ejh.321.1591204570406; Wed, 03 Jun 2020 10:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591204570; cv=none; d=google.com; s=arc-20160816; b=y5jYfOHUUlVq5LNuHWukO72Wla7Cb/OoLXm9wN2x3NUItStMDC2/BmUCm6Z6B1OcU7 lb4yrMNUOBlcWiwRTGvBCwLCNaY6SeXccHPAJxCe+mbn7G6qmPE1p9kdfJnbvciV5dfT h7zZKYLBvh0I8ePYAEtW//hEZ9OTaSTSSf8itWn6yhufj79JtK2K9Wb40/Xa8vzOFyDb MfRgAkpamu7hx26M0w4juL8AQwiRmazxZsvQh1+1GZp/zkud7w08DXAzz3Yr2djGzM4f aAcpRjhUj1ipw6F8P4UPBx/IWZSebEbgCOpsv6ipti7GyRobSdu9dTTilbvcs3FRMFjo LPXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=C5aGJDCTVUf27Q5D9JDTfavbwDNrp4VfqXTMY6QGNOA=; b=NHDOVV4abyu4Q2IMXLgYM9xpjOKkIOEWwSeK2FwM7jZ+Q5p1yVSth6qGtjkp3GFo1d iWTIVlL/+bvuZnxDj75YH50kz1JCDRq3MJyW6qQkwQAUHJs97z73Wc+4IpBz9H8ZSOwp z7BTTWKbJIokkaqAC/M8avcVOLwA/dlf2f2GZNwFMU4GeElJYppu7lRabJtjdMZ79/Gb 4WCrupbDPGmKRB/z+YzWu2LmxSpLUAijnLabN+itYHset7upnHX4eCpChwfhs7dlQR0J p5Skbk8SxYxinmmWAn6S/b5QBghhRIWSAnz9YOoYYXGqQjKiZbB3cIZ1T/79mHVfrDqq QL+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fiFDCuvx; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si66435edp.371.2020.06.03.10.15.45; Wed, 03 Jun 2020 10:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fiFDCuvx; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726237AbgFCROe (ORCPT + 99 others); Wed, 3 Jun 2020 13:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbgFCROe (ORCPT ); Wed, 3 Jun 2020 13:14:34 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACFBC08C5C0 for ; Wed, 3 Jun 2020 10:14:34 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o6so2206058pgh.2 for ; Wed, 03 Jun 2020 10:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C5aGJDCTVUf27Q5D9JDTfavbwDNrp4VfqXTMY6QGNOA=; b=fiFDCuvxKqGHpKKO+MMyLyDL5EKslBQuoC5iZdAkp0GX3he7E5Xi6+6MlM6Uzikhvv DFaFPljD77rPgL29PUjFOj/rIk/hAnvCl1bVjWONpMzbNJpcmc+ZnonfnKLhTilZD/e0 TUnzS32K0CaclBAq8eurabFa7Yy6PpWSwGdITZfUcaN25bi0BCWbjHIK9df0/EscmBEp oSEtpl5qaGaGEDNllirEhLt90QzBaj1/fJP5NpOnG3ju+DUUplFx/ofUEnN8oU81MuS3 fRv2+s3WHPbD9st1rzKxJ054ngXLDGAzeEIGzzCxqx/yifaXDaxzQgQIAYHPw3NvKRMS 2ndQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C5aGJDCTVUf27Q5D9JDTfavbwDNrp4VfqXTMY6QGNOA=; b=i1A0JrS1n30eQyqxfoHD6CSFozTuSClqYhYxClVPUqFg1tW2flcRU4dlJ8atqFbl61 1zuePI6TcdmFJnZr3RzVSb1qI007F448WerpZpFxLV7gZ4T7ex5Bv/bXv97FujW0C0Rz belruLKxYfQliRDMVG+fZ5/l70pu+lB58/OA9/XYeSb9d6xtGA8cMi82W2G1v2Dcpw/C 4MIDYQoORc0Icw7na2LzI0KM/Z20r6jiTYUK0fgkdDTHxwB0K/LtxgM3hPRRqzt/V6Ww PXJUvq/axFmu2wqUq++OyebyHrRTKpDhKu2SDj6u6JuPBOs2bjJq4BU/+3S7wyVwkPYo hFYA== X-Gm-Message-State: AOAM532h7WPRSfgpttdX/m0tA3vEMHWGfIOsS+XA3mJJTFvV3ZyKKjrM tGpg/S/rHJmZlfqhe/6E+UurWQdGbyI= X-Received: by 2002:a17:90b:23c8:: with SMTP id md8mr1002099pjb.72.1591204473343; Wed, 03 Jun 2020 10:14:33 -0700 (PDT) Received: from nsathish-Latitude-7480.iind.intel.com ([192.55.55.45]) by smtp.gmail.com with ESMTPSA id x190sm2016770pgb.79.2020.06.03.10.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 10:14:32 -0700 (PDT) From: Sathish Narasimman X-Google-Original-From: Sathish Narasimman To: linux-bluetooth@vger.kernel.org Cc: Sathish Narasimman Subject: [PATCH 7/7] Bluetooth: Enable RPA Timeout Date: Wed, 3 Jun 2020 22:47:13 +0530 Message-Id: <20200603171713.9882-8-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200603171713.9882-1-sathish.narasimman@intel.com> References: <20200603171713.9882-1-sathish.narasimman@intel.com> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Signed-off-by: Sathish Narasimman --- include/net/bluetooth/hci.h | 2 ++ net/bluetooth/hci_core.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 1165dfea56a9..12005fbe6e09 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -1637,6 +1637,8 @@ struct hci_rp_le_read_resolv_list_size { #define HCI_OP_LE_SET_ADDR_RESOLV_ENABLE 0x202d +#define HCI_OP_LE_SET_RPA_TIMEOUT 0x202e + #define HCI_OP_LE_READ_MAX_DATA_LEN 0x202f struct hci_rp_le_read_max_data_len { __u8 status; diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f4ceda1f1454..67e1434c3f31 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -763,6 +763,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt) hci_req_add(req, HCI_OP_LE_CLEAR_RESOLV_LIST, 0, NULL); } + if (hdev->commands[35] & 0x40) { + __le16 rpa_timeout = cpu_to_le16(hdev->rpa_timeout); + + /* Set RPA timeout */ + hci_req_add(req, HCI_OP_LE_SET_RPA_TIMEOUT, 2, + &rpa_timeout); + } + if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT) { /* Read LE Maximum Data Length */ hci_req_add(req, HCI_OP_LE_READ_MAX_DATA_LEN, 0, NULL); -- 2.17.1