Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7380937rwl; Thu, 23 Mar 2023 03:39:16 -0700 (PDT) X-Google-Smtp-Source: AK7set+wPQ22o+2I3hELuHW3pNS3Vw+bS3qMiTA03mNT3iGtcMDDzVurnIAoU7r8y23e5fVlwz6F X-Received: by 2002:a17:906:4a97:b0:882:ed4a:f23 with SMTP id x23-20020a1709064a9700b00882ed4a0f23mr9191216eju.49.1679567955269; Thu, 23 Mar 2023 03:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679567955; cv=none; d=google.com; s=arc-20160816; b=jUSPocsO2CMBvgFQzBL3yk4vwC7bHOtockyEFG3Yxg+d0gZguT4Y9ow6Yp9PDeypXu LEQOGetgmvDzIW3tDoTl1+l5D8Ore7PbxaP6N7VYLpD3G4h0a3JtlcURDCdPcJ7InXVK tdtgA45mc80S0aEKjaQY3JYwrMvTBVwSDcmBMrkTiX+gyQVckjvcMHocm+F9uEcNnTUs UwusRXLgHA/BBlYhmuAe7CegmlMrEgtsQQ6YYoqGLsG50C4p84DRiyd7IQA9YGdnmAQj lFGO1uKytMNRPFO7gmP+CqzsVrhgDSqCVAnwiSzvy321z46qjA1pcf+4AeT79bXT2g6P dCpw== 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:cc:to:from :dkim-signature; bh=E2M8ZS5DPkk4FU2yyrryJViRll0PsOCpoJq9idZw+8k=; b=hKyvfXthM/kbVMbyi18Js6L4a3IR4V1w0ZeJyWv2YeVybixU+gPUmUdxAyu3MjbpkP azj5aSl6XCLEs6zNIAgbx+pTDs8qOElO6BqXwdZf34+17EBOxOe6iOUO4hokYkelLwX4 pak49jR/Ir69i0beEACz5UpMgNnE5S6JIw+jOeVQCYVZfHdKd9k6oIUGxpa4I5399DXe fliPWh61eT44LfXBzY5j8iGRANlfm+9GUQJzPny5pCkdFjaVcClpjv94JmaO2NiRWrCw 4k684ph0fXA67FQ2SNDLgispcdsd/40CnxDW35hXa0+uAUwHfNKIITzvNBym0ZKHxDAt JNIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@streamunlimited.com header.s=google header.b=imxOblQR; 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=NONE dis=NONE) header.from=streamunlimited.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a17090649cf00b009236600c6b6si15053792ejv.627.2023.03.23.03.38.51; Thu, 23 Mar 2023 03:39:15 -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=@streamunlimited.com header.s=google header.b=imxOblQR; 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=NONE dis=NONE) header.from=streamunlimited.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbjCWKbg (ORCPT + 99 others); Thu, 23 Mar 2023 06:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230375AbjCWKaf (ORCPT ); Thu, 23 Mar 2023 06:30:35 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C699322785 for ; Thu, 23 Mar 2023 03:27:36 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id o12so84251745edb.9 for ; Thu, 23 Mar 2023 03:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamunlimited.com; s=google; t=1679567255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E2M8ZS5DPkk4FU2yyrryJViRll0PsOCpoJq9idZw+8k=; b=imxOblQRax6ZLDwSqD8m0eEsfv1gdywb1j5TUTYQLZIgNWMjONsDEUMzSK6lbXBnRJ AAhiUJxypCdpMdmYprgBvvuUY+jDnW1GaQWsibvtaqPoXrVuli/3Eq2O8WYH46P7nUfl uft5CrdsZC6Y5ZeeF+XlTV0hpBJBGaQDelQPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679567255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E2M8ZS5DPkk4FU2yyrryJViRll0PsOCpoJq9idZw+8k=; b=hBqvgkp5PnkYYaADrZov628N2xAw8RU6AesdxQ3ZkYIyrpIGa+rPbu2sIw1hvH3iYy Vu9Rqss6eFTyFic/T/Zj9DHVov6iISiTms+zaY6fFPiFMTN+ZVqoxHXpG1OnGjD/qs16 zWMbj4qsMW8T+31PkCqWvvIQbAVizTHVtxxWdLO2U2mSQ5yjytlzUHxUk6jVHZhwDKu2 5aAQjX2cqqD30GfHujBPbouu+xWKdZ5cmLq/VI03rsT2BtSNGg2RfrMeIoZe05XTG0am gozy5391e+b3jAlLEeMYRVQveOB/vrogQf9PqhCgwNCZKfLC/uTKWzFbMMKxR690uwHd VHxg== X-Gm-Message-State: AO0yUKVddZrvfurupVmMUDL9fcoMvdClrvu4ifA3mkZLWhBca56a2yVI TKeX9GzK+D/fPyN/G5UsGa8WBNloym2rZs3/iM8= X-Received: by 2002:a17:906:3999:b0:933:3705:a9f0 with SMTP id h25-20020a170906399900b009333705a9f0mr10810374eje.19.1679567255178; Thu, 23 Mar 2023 03:27:35 -0700 (PDT) Received: from smi-ubuntu.sueba ([2a01:390:0:101:4f8c:7da4:48b2:8bd2]) by smtp.gmail.com with ESMTPSA id u25-20020a50c2d9000000b004faf34064c8sm8880564edf.62.2023.03.23.03.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 03:27:34 -0700 (PDT) From: Simon Mikuda To: linux-bluetooth@vger.kernel.org Cc: Simon Mikuda Subject: [PATCH BlueZ 1/2] l2test: Enable hex input for PSM Date: Thu, 23 Mar 2023 11:27:31 +0100 Message-Id: <20230323102732.566440-2-simon.mikuda@streamunlimited.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230323102732.566440-1-simon.mikuda@streamunlimited.com> References: <20230323102732.566440-1-simon.mikuda@streamunlimited.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 --- tools/l2test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/l2test.c b/tools/l2test.c index 5aae4b687..595f1dab2 100644 --- a/tools/l2test.c +++ b/tools/l2test.c @@ -1416,7 +1416,10 @@ int main(int argc, char *argv[]) break; case 'P': - psm = atoi(optarg); + if (!strncasecmp(optarg, "0x", 2)) + psm = strtoul(&optarg[2], NULL, 16); + else + psm = atoi(optarg); break; case 'I': -- 2.34.1