Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4167543pxb; Sun, 24 Oct 2021 21:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylSH2s1NaG1Jq/cMX07RNOqievsFIWN4soKzIRzP+yyq6t6gqj3G/Ynn/3vkWYHkONCZSH X-Received: by 2002:a17:906:4e11:: with SMTP id z17mr6344375eju.279.1635137525700; Sun, 24 Oct 2021 21:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635137525; cv=none; d=google.com; s=arc-20160816; b=ymjGXAh9K9xoSAdaDV2l5F8nhx+cxfRsho9OYXg5QABPp142p3HLcfssBBpSLRVmss OkIAfw5kZF1ZubBlXzO/7HjozHckA4hC3kFWD7ioXOEFpp3h+9fDd7yk2a7OtIwt65Cj DITenbZHusCnPNTUZKeQcErCRAps+WC1j+/RsvtPkTGd7dB5tUdioqwq2o/UYKtkaQCD pRVu4vk+8BacMb2xLr7PNdyeLv4Oec3I5NBljiBz7njQiRtlY4Kybs29vS9E0GcS4tuM v+oC+zD9zLf489fe7UhVkVXyqMDezUJWdVnbATAfdAkQpGfAdQ8CBStHh82piQLJ6WK8 J+Hg== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=uRci+wXRHEpx0vPCJHP4/3h6ULOKax09k+gEH+0a86A=; b=muMpaIMeZPpgErvcGF1s7HLkasVCBXTLmcJyQaOlGH4C84qGC1ut++tXVGmilbj4yr 5zoGE1xUF1PWBHSPf9dGTeXntzuFvNqEmS0Wua0pAM27zPs7qKpbciV5vY2ufByx0lbZ jhQJjSc5sY+qqVw/PT99yzBfazGw0dTcwwaXhXbYT6NohusXp8H53PSMuWjv6OmWkvQ5 UdF4IJjkkI2HSX9ctGQi7KFW1vYttOkPpXcl1yqsbECFNQUZBYi4CMErLCWaIgQinBKg vUUp0cgw0KBdQKZ4smHqcW2yb4T7LLhQaTnHCxPQnTJkzpMOTpC6gsjigD+OaKJ+UxIq IjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QOFOy0Ij; 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 w14si26235138edc.310.2021.10.24.21.51.42; Sun, 24 Oct 2021 21:52:05 -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=20210112 header.b=QOFOy0Ij; 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 S232090AbhJYEtx (ORCPT + 99 others); Mon, 25 Oct 2021 00:49:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232110AbhJYEtw (ORCPT ); Mon, 25 Oct 2021 00:49:52 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83197C061764 for ; Sun, 24 Oct 2021 21:47:30 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id m26so9560746pff.3 for ; Sun, 24 Oct 2021 21:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uRci+wXRHEpx0vPCJHP4/3h6ULOKax09k+gEH+0a86A=; b=QOFOy0IjA9Sq3eD8YgLGL3mXYluje0Tkpd6U/6sQHdkkiTKxwPbnLcP2ChzUQE/KKP RwyofBxlX5vNrbPJlRFcNuvWLzoql3DAMNfqxZoLKyg1sOfm+LGPpoT0hvMsPDGFCrc7 kwlxrqSX8megxFDlG+E2S8dkLFnvGCGUaWo/jvMC1D3ELC5NlZbcUY539JkHjWQBEhrn aVCKUstirXExyQxqgqXfJBpVWLRZ7Kc7UXuVRqP4vDXtG8Eq0+RM0KEwaOMgQx7M+2YR sw+i1OK8wl5rcdHcHNHjJU7JxhchSV4K3eJK1azouaWS7+ILzQaHrXFLBrjuQOCqJBpo tbbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uRci+wXRHEpx0vPCJHP4/3h6ULOKax09k+gEH+0a86A=; b=CdvhLgaXKwAvh74SlmGVdqRqESkHNcBPR9yYCBipYACgY8PdrTVhpJwQC+uop5k31O vA8xME3jumvLtNG4cUqm+t4+0pxi2vM0TBmjNWMDh1iNVBkVthY1aIGGyxS0FhgnFUDW T4ikKUsxWU7CanveWyROFZimhymX2mCAdr1mZ/+qtGyAKIwznEXa14S7N6rWluNJu5Vu AnRzxva9zP86L+si2SttvTHpa+cpj4En/ScHnIj9v0xMvBMROtWMCyYWZwW9c+h6QdQT 4LjYBTFblfuEpf8R69mseaJAyaZOvd47SWjym/WOBp/gLfDwY5ANHWPRHGA7d9DwvkyO s83g== X-Gm-Message-State: AOAM530z6YfPjc249DOH/ioz8eQDZdF6Eg3RR+5OVnPGOAtUWW6xmY5+ 9F4rDz7vMAZxUX+FnnWQes4YQSLI9TaHAA== X-Received: by 2002:aa7:99c3:0:b0:47b:e21d:7315 with SMTP id v3-20020aa799c3000000b0047be21d7315mr8567950pfi.35.1635137249817; Sun, 24 Oct 2021 21:47:29 -0700 (PDT) Received: from han1-NUC8i7BEH.hsd1.or.comcast.net ([2601:1c0:6a01:d830:d228:1bef:af2a:db8e]) by smtp.gmail.com with ESMTPSA id a17sm13926204pfv.64.2021.10.24.21.47.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 21:47:29 -0700 (PDT) From: Tedd Ho-Jeong An To: linux-bluetooth@vger.kernel.org Subject: [BlueZ PATCH 4/4] tools/mgmt-tester: Add support for experimental feature in setup Date: Sun, 24 Oct 2021 21:47:25 -0700 Message-Id: <20211025044725.482641-4-hj.tedd.an@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211025044725.482641-1-hj.tedd.an@gmail.com> References: <20211025044725.482641-1-hj.tedd.an@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Tedd Ho-Jeong An This patch adds support for experimental feature in setup_settings options. --- tools/mgmt-tester.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index f490dc261..1ccce0ad6 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -260,6 +260,7 @@ struct generic_data { const uint16_t *setup_settings; bool setup_nobredr; bool setup_limited_discov; + const void *setup_exp_feat_param; uint16_t setup_expect_hci_command; const void *setup_expect_hci_param; uint8_t setup_expect_hci_len; @@ -7222,6 +7223,7 @@ proceed: unsigned char privacy_param[] = { 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; + unsigned char set_exp_feat_param[17] = { 0x00 }; unsigned char *param = simple_param; size_t param_size = sizeof(simple_param); mgmt_request_func_t func = NULL; @@ -7250,14 +7252,30 @@ proceed: memcpy(param, test->setup_discovery_param, 1); } + if (*cmd == MGMT_OP_SET_EXP_FEATURE) { + if (test->setup_exp_feat_param) { + memcpy(set_exp_feat_param, + test->setup_exp_feat_param, 17); + param_size = sizeof(set_exp_feat_param); + param = set_exp_feat_param; + } + } + if (*cmd == MGMT_OP_SET_LE && test->setup_nobredr) { unsigned char off[] = { 0x00 }; + tester_print("Setup sending %s (0x%04x)", + mgmt_opstr(*cmd), *cmd); mgmt_send(data->mgmt, *cmd, data->mgmt_index, param_size, param, NULL, NULL, NULL); + tester_print("Setup sending %s (0x%04x)", + mgmt_opstr(MGMT_OP_SET_BREDR), + MGMT_OP_SET_BREDR); mgmt_send(data->mgmt, MGMT_OP_SET_BREDR, data->mgmt_index, sizeof(off), off, func, data, NULL); } else { + tester_print("Setup sending %s (0x%04x)", + mgmt_opstr(*cmd), *cmd); mgmt_send(data->mgmt, *cmd, data->mgmt_index, param_size, param, func, data, NULL); } -- 2.25.1