Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp288563pxb; Wed, 14 Apr 2021 15:41:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdvj79Y56p2NeMc/UmFY4+P8azeobIJ/WU/gr4/UXwB1enABNxI9TWozXTh7K0Cz9PYqGw X-Received: by 2002:aa7:d2c9:: with SMTP id k9mr567780edr.46.1618440078166; Wed, 14 Apr 2021 15:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618440078; cv=none; d=google.com; s=arc-20160816; b=lhPqT/tSWfj/dUqZE/kiSYtr3dqZW+f86Un/WzgZld6ICk+RnIqizZONsDAAKElxdd 8MycGcH+T1zHcF9TbVvbbmXSYbwBmTn13RLwajzcw39zN0OIeiU0UPyz2jRig4NQf4at 3n1wPwQ8y0EEnHC38sL4hj3axmJBDEp+laLag67pCOwnI1sk4xawhv+ysJ3J3k8FUO/6 3iAFlReaA5mKS6oIETGS4ADPLuPxU6FmybDSaKxSJ04C0f4Agny1BY653bJXNmg09MW+ avO6jg4UF7Pj98fK1g5+5S9LIDV9hkjLN1FkROttpRw1nQI4jC4aIg7hMBkbwvwhzYx4 gPhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=1g6x7uUgkFO2aAWDPpa2JJPrynir6tQkOoWCH9D9ftc=; b=nBCvuf0G1meX5c+u/JeMmWf44vsjvJNI8CVh6OQBnlKZiq+JTXcrgStycuKVIzpMux 9ePk/h/UnJL+B5N3aRg6UguE8rfIFAqMhEIR1OLOLTUYPRVhWPeY4hJZHa6M0krcgccz 0Em0QTftmRQTxkrhfKBeC/gBsdGdbBGuUI5TPR7KAVG1ucLp1+CKrOH+QXEIBa0y2duD U9OnKz77qkDiJWjF6yWF90LCt6JYaeYSFbRB8eDxJpBQb8BJKmcY9DVAYCSCa6rTxXUV LcT5RIDFOVwHizpvGlNdMUHlLmHZvTYxyZtYPjnrFwq3nVyNc12RK4751r27GfptP49Q 6stA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si801754edc.451.2021.04.14.15.40.53; Wed, 14 Apr 2021 15:41:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348965AbhDNKJZ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Apr 2021 06:09:25 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:35062 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348873AbhDNKJS (ORCPT ); Wed, 14 Apr 2021 06:09:18 -0400 Received: from mac-pro.holtmann.net (p4fefc77b.dip0.t-ipconnect.de [79.239.199.123]) by mail.holtmann.org (Postfix) with ESMTPSA id CC796CECDF; Wed, 14 Apr 2021 12:16:17 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [BlueZ] monitor: Fix the incorrect vendor name From: Marcel Holtmann In-Reply-To: <20210414043857.371176-1-hj.tedd.an@gmail.com> Date: Wed, 14 Apr 2021 12:08:32 +0200 Cc: linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <6D9FBA0A-3058-4C96-8CFD-6BE5B585DE8E@holtmann.org> References: <20210414043857.371176-1-hj.tedd.an@gmail.com> To: Tedd Ho-Jeong An X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Tedd, > This patch fixes the vendor name is alwasy shown as "Microsoft" even > though a different vendor. > > < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249 > Type: Data fragment (0x01) >> HCI Event: Command Complete (0x0e) plen 4 > Microsoft Secure Send (0x3f|0x0009) ncmd 31 > Status: Success (0x00) > --- > monitor/packet.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/monitor/packet.c b/monitor/packet.c > index d729a01cc..91d2294ff 100644 > --- a/monitor/packet.c > +++ b/monitor/packet.c > @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit) > > static const char *current_vendor_str(void) > { > - uint16_t manufacturer, msft_opcode; > + uint16_t manufacturer; > > - if (index_current < MAX_INDEX) { > + if (index_current < MAX_INDEX) > manufacturer = index_list[index_current].manufacturer; > - msft_opcode = index_list[index_current].msft_opcode; > - } else { > + else > manufacturer = fallback_manufacturer; > - msft_opcode = BT_HCI_CMD_NOP; > - } > - > - if (msft_opcode != BT_HCI_CMD_NOP) > - return "Microsoft"; seems we have a bug here, but the fix can not be correct either. If we are running on Intel firmware and the Microsoft extension is used, it should show Microsoft and not Intel for the vendor commands. Regards Marcel