Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1642586rwb; Fri, 7 Oct 2022 16:11:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6KxfvU8B3882cH2proHVqCP5UuBhFTvhtWMrA91Mnq1biHxjTBJIuKQ60sZr9k7S2Ni7i7 X-Received: by 2002:a05:6a00:2289:b0:561:fb25:8077 with SMTP id f9-20020a056a00228900b00561fb258077mr7536816pfe.79.1665184294346; Fri, 07 Oct 2022 16:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665184294; cv=none; d=google.com; s=arc-20160816; b=fzW8DS8lfaF+tPq8gqMBr2FIxnD2fAYSFo20wNAf5TaZ2VI7meZYR4tApHR+Xw2vSX befZVfJU0ni0iRLemjVzP8gbKLcLc29HsEyaZeDKvWY+lY8NNPT6Bcnys33sFzHddKl6 57Ei2C+KYu2Md5PCiavgeLfGqtuPEq+4L+0alkCkdgQuAQFpWn8h8A5iqJ58KDYdY1ns eGeBq0Fz6KG+SI0BPpfZsUkRXoXDEVO6rA00IMEizHPdfaCW90x4eje15UxQKOnBICaa VrV4N5T0QgQ8+CbHLijC8KrfXNQzyGabzCZ+zhnR3SFnanHBZA8ZjXeXac3kWwurt/IQ 23MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=IbF95eHZ2RUxmwb6nGp4/t/NK7QcVM0zQJIL6M3g4f0=; b=i+1CBr6oOLxFWRgf9h3ts/+H+VJPAVqHCodweovEZep0eOWnD1RvtjzlIn30KlLE1G cgUiEYXuvE4avHMeNZYwc+fB2XkL4GnzrY6a8OBfz6GVKcpT5Y9Y8itjZTjqctVE4ATo 5jJQqLsTwFNsHglqvV3Cq7R8XnNzfbc0fFmPVqQe0uuwswhxSXvluIrMNw8oAKMPOp1R 6eXlEPCNJnQDyTh4NTKfCZ/E5mb8/gF3K2EJhWaoFBk8O1udzWoztwAo0VsF7VvmRcAF OBGDnD2njasoNp1A3ez2pEgL3AUZItyt5hvWXur2vdpJ71U3ihJKPBjtAjtcNZUl35x2 BEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MEnZskuZ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a056a00088400b00558991a667esi4047062pfj.359.2022.10.07.16.11.03; Fri, 07 Oct 2022 16:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MEnZskuZ; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229507AbiJGWzb (ORCPT + 99 others); Fri, 7 Oct 2022 18:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbiJGWza (ORCPT ); Fri, 7 Oct 2022 18:55:30 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F7F840562 for ; Fri, 7 Oct 2022 15:55:30 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id fw14so5527097pjb.3 for ; Fri, 07 Oct 2022 15:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=IbF95eHZ2RUxmwb6nGp4/t/NK7QcVM0zQJIL6M3g4f0=; b=MEnZskuZTteLakr0pQ5AlayTj9/5xBOU0YuneBrbN5FgByctgUSSlnx1OBZJZOKslL e1wSS9OlmIME7KFl6MJ8xnjd4GQe8d54zl/LdQExdXX2Mx8fAlFF6HjTC9kOVr/Tr/sc E90d7wPRZfxGLSZDlT1HM/epD6zKUxDvFpybRPl3cGb8gIfrtfAhIRLLRd/+sE7WYzfm F4Qv/PkVSsF8qIa7LUd0Idk5yV2NSqUgezJz2ayOh6tCUAQ0tqofS0A5lugH3QJxAoEr SDnL20VwI8/gDtPHyvPy+o39ThM3nWRHIVYVUdusCbi1TbIL9L3WWiV8F0eP5zX32ZyL ik/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IbF95eHZ2RUxmwb6nGp4/t/NK7QcVM0zQJIL6M3g4f0=; b=SS8RCXSHq5sSm1FELiEhyRsz0m0/v/9autMpJwu8E3E5nHmUHk6zC7X9UvTyO21sRV E8tdBRd0XlLOShXbH8K0srTCzbI/sLP6rFt08WFaeaoubLfgt6h63bRpTYAj8NLD+rdg i/5GQ2pt7+zaxayfBDoFJXxN5NVMO72NBt7IHDSkRx2tHby/GW2WJTaVp3AbSuUpKov+ Ve4t3yY7jiQGFp66uKFHBYOOOl50TtTmf76TCQ/XKw859dGawDOPOt53IDwE8phsRzYM irbEewAzHUseVcJXBcw7h8DtdONWkhoDBXyVaA+rJ7QTiiyIslCQHj/31gQz50npbhXe e5sw== X-Gm-Message-State: ACrzQf107ZKnFAjxhGcBpVYegh0rC1ZiRC8iYeTsD93t0yBMjsYGDY1C /7EDLM4YNI2Qn3ngf1RkfMxkN9Tyvw0= X-Received: by 2002:a17:902:be03:b0:17b:80c1:78c2 with SMTP id r3-20020a170902be0300b0017b80c178c2mr7056109pls.34.1665183329007; Fri, 07 Oct 2022 15:55:29 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id d1-20020aa797a1000000b00562362dbbc1sm2157963pfq.157.2022.10.07.15.55.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 15:55:28 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] vhci: Add function to interact with force_static_address Date: Fri, 7 Oct 2022 15:55:27 -0700 Message-Id: <20221007225527.1838767-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This adds functions that can be used to set debugfs force_static_address. --- emulator/vhci.c | 10 ++++++++++ emulator/vhci.h | 1 + 2 files changed, 11 insertions(+) diff --git a/emulator/vhci.c b/emulator/vhci.c index 4295e30ef980..a12b11e0f305 100644 --- a/emulator/vhci.c +++ b/emulator/vhci.c @@ -257,3 +257,13 @@ int vhci_set_emu_opcode(struct vhci *vhci, uint16_t opcode) { return btdev_set_emu_opcode(vhci->btdev, opcode); } + +int vhci_set_force_static_address(struct vhci *vhci, bool enable) +{ + char val; + + val = (enable) ? 'Y' : 'N'; + + return vhci_debugfs_write(vhci, "force_static_address", &val, + sizeof(val)); +} diff --git a/emulator/vhci.h b/emulator/vhci.h index c42e8bde1cd5..6da56cb589fe 100644 --- a/emulator/vhci.h +++ b/emulator/vhci.h @@ -28,3 +28,4 @@ int vhci_set_force_wakeup(struct vhci *vhci, bool enable); int vhci_set_msft_opcode(struct vhci *vhci, uint16_t opcode); int vhci_set_aosp_capable(struct vhci *vhci, bool enable); int vhci_set_emu_opcode(struct vhci *vhci, uint16_t opcode); +int vhci_set_force_static_address(struct vhci *vhci, bool enable); -- 2.37.3