Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1707742lqt; Wed, 20 Mar 2024 11:30:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUIZ3SlSu1+/C1+K2H9JxEhw5MMxhjCoyNOnF2bW7ny7x8gQmjvN9sFw3ME5iS7OTmEJLexyxpLCNrcUP9GrzUruqv2xM64XaC+aLgicw== X-Google-Smtp-Source: AGHT+IGuKMnfkkR+eugYZWaAeTxYYcZixM6dKUpu4uksS1cAwf9UJ/1gXsItTOxPXwR0ivUw0kY4 X-Received: by 2002:a05:6358:7f1a:b0:17c:1bb1:5758 with SMTP id p26-20020a0563587f1a00b0017c1bb15758mr2598713rwn.16.1710959449043; Wed, 20 Mar 2024 11:30:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710959449; cv=pass; d=google.com; s=arc-20160816; b=jvCfOVWqzlWlWF79MT7I2FsholyYtP6d0lvtx7ZWz5ypnEOzxqkzjzzx58njChEiX2 1rv4COslJ11l8VjHNLX8Eflxgx0p5mANflcWpYF0ASpNQ51a6PCNzHuF2Mlhij8HHVaD EX39EPTJIoViXk57V2nZMRTeDawPxlSC8yPhPc2VU9kKTb+vNYtdk6WHWjC2Pww3Wyc/ L0Pe1mhn+8RRqHCZvlNBDeC7+ZuWJwoNBJdxWHfKkesF1IxheQKGkFddIVW9vW+SkPAY kLbrX1HxmBAou1WAKdlZxA9T/+vBo9RP/YhY9kh4OqGcgeZdlFi5GMMb02x5CHQiApSR 5d1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=kwlrMkhjYHMWNIC6iIWezqATnpstXoiCQq3Z8kKPQEc=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=rYR3eX9x/ZuDz2pD9OJNOBjcTDlr1xDLgmejO8wghUE6k8CNSicVxE/Sh6eGFkoSsU 7DsvLIzIio19w6708Urua5FT1U5lt+lB4CNTdOfOIYxGBQFaN7/d14eu1iQfZwqhx/dv c7gviGGAhD+wNhPBhCC6WWQvjbDhDdrB0SLd69/6ZwUb69warch/6izQI7EPeCWr0m29 aipwFsI6Z8DMWkGICjMI+rhyKXJbZkE/xiU5QNdK4qcj2fpf470J1/fG8nOq70XliMvy Ye8QZWLviu0aUrKKDLGm0c6/rFYk4eeUKbZkzLtO1PMl820NKcNuXpE1tqFIuW7NpACq wYwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jAeGxE0O; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2676-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d20-20020a63d714000000b005c661524f67si12503326pgg.26.2024.03.20.11.30.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 11:30:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2676-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jAeGxE0O; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-2676-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B1844283C95 for ; Wed, 20 Mar 2024 18:30:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D2BA7604E; Wed, 20 Mar 2024 18:30:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jAeGxE0O" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E829974E38 for ; Wed, 20 Mar 2024 18:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710959444; cv=none; b=XfuQooVCoZ2lNWehGcy0RpgOqcHDCALTDl8Caxr8hZq/fI+gYyyLHzNP/2WfHwYsrTg5vWoofGT+2CdQDokjqEfZjC8h3jqnxPH4N85+FwqX7jqIdaSiEGjLpNvYlqmPSP82QA8aiWVwMjL11vC+MZ5IVcA4/BHugi3Z0gpy7cs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710959444; c=relaxed/simple; bh=55b4rrW5mmTIfz1WueoXRp1JDRgxNMSEDrMH7f9JmoA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=CCGc9OKoARURUP69iPiUmDRPfM7cGD+DAqbdYTqQRNfDr3d+iNVu4reF52rd6vNw3hwXR1cTzCSTjKfJD54N4L+I7oh3Kf4X71hpnJBPa/Ca4PpvlUzYNTK/Ol8eq7Zuuxi+MsbcNrsXAf2Puu0zMgqRFC7WBbCk3Mc1zWnhOes= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jAeGxE0O; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4146af3ebc8so966025e9.2 for ; Wed, 20 Mar 2024 11:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710959440; x=1711564240; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=kwlrMkhjYHMWNIC6iIWezqATnpstXoiCQq3Z8kKPQEc=; b=jAeGxE0Olo5D43QmBHNQuuXEz+zDRuU9FoBRr0QX/44lNHxYiwA72qn/dNB1LIFL3x BV63v9ai2J2YqYXpGPbThWgjPvNfadN1sGI14FGxCcOEef2lSQgSy1z+i69QENrVv2Fj Lt93KXVUXuhNX0GHTibMKG5UQgKcuXkKdaGLVXZHt9ZogGM6lxp+dR9rlp5Be+UXgTia aecSVQrH7ZP0DuqfVE8pPME0ivo3ftkbrePUu9HhEFakPDLZrCyCXn1e/xM6KnlJ++Io k1+rMszdH3XXtSuaAhNIHid9etmgH9yzajoV1VajRHQ2Zz/B/YuL5a345LsHOuqRGUPE TK6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710959440; x=1711564240; 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=kwlrMkhjYHMWNIC6iIWezqATnpstXoiCQq3Z8kKPQEc=; b=NHjll88FgYkN/AcK3YRm6tHzb62Ql3kpZ6BOBWXJbC0E68oET6erAM7cEUUCFvggVF +zCscjml2W+Cy8GWXJWuwIKrFSEmnJZr40tlzXb1W3F+qPaIA7xTvq46KBKh3Fr3+xkO in2v0Hc5H+wlJFodrqGjhJ+edAI8htbrzMWsRSaVS1Ut1+BZY3KeRYG1sM51x58iIuHP vd0ADOCWYEbUbqtXEW7852OCPGpem8RR9TQtHBVqULiY69cfV+K1pLIwebSgcEiPKE7P SlUw2QW/VZLDNk46hKkfhCAuQzMAD0TbUz1obQJY5+wlClhydsYrTuTdx1Q16uf0DS8F rihg== X-Gm-Message-State: AOJu0YyBr0SH7lUqg/g92HIv2fAOzG9nrNOErjVBssqwtIzAD9uCmfGc ebH2V+GzXsPCIvUVa8niETGBplzHVtc9DGlElY/0ofRCOdsIaDxq3/WswcuQOiMZjhH/ X-Received: by 2002:a05:600c:a02:b0:414:8d7:8292 with SMTP id z2-20020a05600c0a0200b0041408d78292mr10067972wmp.0.1710959440169; Wed, 20 Mar 2024 11:30:40 -0700 (PDT) Received: from lvondent-mobl3.. (ftip004290803.acc4.faraday.21cn-nte.bt.net. [109.144.76.63]) by smtp.gmail.com with ESMTPSA id j14-20020a05600c190e00b004146bcdde06sm2927313wmq.6.2024.03.20.11.30.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 11:30:39 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1] shared/btsnoop: Add proper identifiers for ISO packets Date: Wed, 20 Mar 2024 18:30:37 +0000 Message-ID: <20240320183038.411332-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz This adds ISO packets identifiers so they are properly stored on files. --- src/shared/btsnoop.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/shared/btsnoop.c b/src/shared/btsnoop.c index 8b93203b3..bc5f7fcbe 100644 --- a/src/shared/btsnoop.c +++ b/src/shared/btsnoop.c @@ -305,6 +305,9 @@ static uint32_t get_flags_from_opcode(uint16_t opcode) case BTSNOOP_OPCODE_SCO_TX_PKT: case BTSNOOP_OPCODE_SCO_RX_PKT: break; + case BTSNOOP_OPCODE_ISO_TX_PKT: + case BTSNOOP_OPCODE_ISO_RX_PKT: + break; case BTSNOOP_OPCODE_OPEN_INDEX: case BTSNOOP_OPCODE_CLOSE_INDEX: break; @@ -428,6 +431,14 @@ static bool pklg_read_hci(struct btsnoop *btsnoop, struct timeval *tv, *index = 0x0000; *opcode = BTSNOOP_OPCODE_SCO_RX_PKT; break; + case 0x12: + *index = 0x0000; + *opcode = BTSNOOP_OPCODE_ISO_TX_PKT; + break; + case 0x13: + *index = 0x0000; + *opcode = BTSNOOP_OPCODE_ISO_RX_PKT; + break; case 0x0b: *index = 0x0000; *opcode = BTSNOOP_OPCODE_VENDOR_DIAG; @@ -470,6 +481,11 @@ static uint16_t get_opcode_from_flags(uint8_t type, uint32_t flags) return BTSNOOP_OPCODE_SCO_TX_PKT; case 0x04: return BTSNOOP_OPCODE_EVENT_PKT; + case 0x05: + if (flags & 0x01) + return BTSNOOP_OPCODE_ISO_RX_PKT; + else + return BTSNOOP_OPCODE_ISO_TX_PKT; case 0xff: if (flags & 0x02) { if (flags & 0x01) -- 2.44.0