Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2880586pxb; Mon, 19 Apr 2021 16:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+9DTeu52spXdYNxtMxEX1WYws4YQCqb2l3Gw5BVX1Uk9OoyIKqoS4VlWmUav5RTe/bHfQ X-Received: by 2002:a17:902:fe8d:b029:ea:fdd4:e667 with SMTP id x13-20020a170902fe8db02900eafdd4e667mr25764394plm.36.1618876583066; Mon, 19 Apr 2021 16:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618876583; cv=none; d=google.com; s=arc-20160816; b=c8HoBxLv5/9BWcyowRiXmcaXyzrPintoh2kanvljuI6zycHanrNmg9Ve69oeLyBx3o yNFBRBCY1Q4EFfGUaW8ExJe9kRo5TMfZqE/1txopnV4IRvemg4OmaQvkt9o9EX3hF+2y ZDv3Al4dL4jcymh9SKYMEc1ytv+OC6+Dx3v2jGmWpp6zQh/qcLe6EE6d9+BAK+bP62Qs f/3JtMch2pmOX+O55H34BDWwYtnyI5y65u7OTy8EIjaLUnd8PAOxhrX59OvCxlFIpMuy E4yr8mPA7ewn9BuagEnGftcu2raJAfhGpgiQDHomx819t1nKHeOYlkk2q3QYTTGpUu9A Rqxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=eI+2lB2i0zkJaQIbQM7tK6wekgIsPHxRzUo5leb4rj4=; b=vL8gRhT3OtseolnKLYp3amb8KdykdorXWyxqJ7zzUp75HM8J5DtmZ0eSNnr85oiWGv ZwG7CQUc3Mhc9/dSBbJbEQJOei2910VQ7VZ4eeXD/lSURi+UhkRKMRfTUESko+6KQYrr BHjeCTzmSDBBGQhgsvNFnezcVFydthC38L3WLQ3OSs8UTR58jxRmT4EDFe3kKpn6bG8D EcY02wxolxM2rfZjgGB82jeI+0R1sACD+Etrx5Y+/iXpT1O7nsncsSnjXmV4R2cJXA7m TB7A9TSmenvc5eGdl7O2nAtJkpK5PYOtoQFokiT0ClAk4mv/qHPAN1n1n2kaveHM3kAx XmlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=iGdhwBvL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t35si11136343pfg.222.2021.04.19.16.55.58; Mon, 19 Apr 2021 16:56:23 -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=@google.com header.s=20161025 header.b=iGdhwBvL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbhDSXyJ (ORCPT + 99 others); Mon, 19 Apr 2021 19:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbhDSXyI (ORCPT ); Mon, 19 Apr 2021 19:54:08 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D483C06138A for ; Mon, 19 Apr 2021 16:53:37 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id q64-20020a25d9430000b02904e7898da351so9531303ybg.19 for ; Mon, 19 Apr 2021 16:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=eI+2lB2i0zkJaQIbQM7tK6wekgIsPHxRzUo5leb4rj4=; b=iGdhwBvLpWOvkaGIBS8myhQnNZLBWSQrFRI8b3G9Ueq7noHNfiggS5avakde/q9iIj jEtEL0gzVGSLALYIL46/hyn6tqLyMAUH4PzBJCc+u7IY4/VqV/3Bmy+SQlPiN2orQxsp 8xSJT2yhKAJ9um/BXV1NfRSbxt8+D8gXPD22yt4vOIHBJRtAkZOtJY43+KKEr5KtdIUh nqNj71V+YzufEOflDJbH/Beasc8KnDQZfw0rM+2dyNsU7/zwn80fYBy9D+HjaNgy7hp3 6uUygoUEuu+Qa35cdbc+MgSkqJ1FkpjMXKQK9sEYzD837QmQFsJRcUee6/IsGayJw4rm Rvyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=eI+2lB2i0zkJaQIbQM7tK6wekgIsPHxRzUo5leb4rj4=; b=JpIp9ul/N/VlwGvJaPYhZNtAiTldNl2kLEPz5b4uAyXK6F4EoQf07QU9xnl0K0PDoL 29rQo2SEEH4koiu5tfKD219tFFnSDcycbQAoBO3NQDIS93skYIMmZ+Dj7rXew0BdSdbc GmijbLfs71NKNTv9JNyhP0t1pSfPfT4b76OhM3y6A+TxnT0iJ+4hO7X/FWwJVIwJ8LBO 0sr1HS/XIMtPt3+qN47PkEJ5RJEIfSQ1QUDMMJfG7/JrmeB3KiawIcVGTbEcxSdBtrKf SRI+aE8HL6NPJqLbgY6vRGnRmBpUHfuUlcFc9WExMf5nSl0uCnJ6vUGvG6iozR4bxOkl Zkow== X-Gm-Message-State: AOAM531EJlE4IIOTmuBHzEvQft8uIPyXwaQjYDSgMOsVJo9cm+Owh2iv eOtD2osxhJd09SzEM0cav+79PGJPK8mfMX1HlYK1FExfIEckXYD2BOqyFW7GiAOkf15S5IwoSo9 dc4UNTzHCsFbC/lYio0pQBA4JicKF2PqRqe5nntrulVTZcrb6wJaptSNG5sEXpejZcvE+PpQug8 9o X-Received: from yudiliu.mtv.corp.google.com ([2620:15c:202:201:ad3b:b707:fe95:d739]) (user=yudiliu job=sendgmr) by 2002:a5b:152:: with SMTP id c18mr20397176ybp.4.1618876416181; Mon, 19 Apr 2021 16:53:36 -0700 (PDT) Date: Mon, 19 Apr 2021 16:53:30 -0700 Message-Id: <20210419165323.v1.1.I9f9e8bcc849d91c1bb588a5181317c3e2ad48461@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.31.1.368.gbe11c130af-goog Subject: [PATCH v1] Bluetooth: Fix the HCI to MGMT status conversion table From: Yu Liu To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, chromeos-bluetooth-upstreaming@chromium.org Cc: Yu Liu , Miao-chen Chou , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 0x2B, 0x31 and 0x33 are reserved for future use but were not present in the HCI to MGMT conversion table, this caused the conversion to be incorrect for the HCI status code greater than 0x2A. Reviewed-by: Miao-chen Chou Signed-off-by: Yu Liu --- Changes in v1: - Initial change net/bluetooth/mgmt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 40f75b8e1416..b44e19c69c44 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -252,12 +252,15 @@ static const u8 mgmt_status_table[] = { MGMT_STATUS_TIMEOUT, /* Instant Passed */ MGMT_STATUS_NOT_SUPPORTED, /* Pairing Not Supported */ MGMT_STATUS_FAILED, /* Transaction Collision */ + MGMT_STATUS_FAILED, /* Reserved for future use */ MGMT_STATUS_INVALID_PARAMS, /* Unacceptable Parameter */ MGMT_STATUS_REJECTED, /* QoS Rejected */ MGMT_STATUS_NOT_SUPPORTED, /* Classification Not Supported */ MGMT_STATUS_REJECTED, /* Insufficient Security */ MGMT_STATUS_INVALID_PARAMS, /* Parameter Out Of Range */ + MGMT_STATUS_FAILED, /* Reserved for future use */ MGMT_STATUS_BUSY, /* Role Switch Pending */ + MGMT_STATUS_FAILED, /* Reserved for future use */ MGMT_STATUS_FAILED, /* Slot Violation */ MGMT_STATUS_FAILED, /* Role Switch Failed */ MGMT_STATUS_INVALID_PARAMS, /* EIR Too Large */ -- 2.31.1.368.gbe11c130af-goog