Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp631129pxv; Thu, 15 Jul 2021 12:00:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwzkmjGVVL9PbZGiVl8q3x3htf3CPx9BUiZMLA7gPylRfxa7ch8fv5drwL8C/VwN7xsAPB X-Received: by 2002:a02:ccad:: with SMTP id t13mr5260304jap.29.1626375631958; Thu, 15 Jul 2021 12:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375631; cv=none; d=google.com; s=arc-20160816; b=STmhoSXfUutt7dxmBMd3O8jo2zFNBO2O1Ixu2IQElKAeA/ahrc9DuO/G2IVZaegGqR Rf9tkMkH6d8Ud+jT4UQy/GdpmqPRKmqR73kYSgqS3J8u0r72x7nQh3zP/QYXKPmK76fS P8pIWVo8OrL2LvZ1D7z5keSgFTO8JkVE2v2lknGBhbLhrHeGV1aVRePorgBc4hjEbTUf /c2tJkIvnaUplMZb+uplfoAzXqnzOhf6TYLb5xgVk6+cUXEXKbj0c9DwWNG7Ld8fgbZX 18Q1rxSZ3lM+mGUZESty+8fyNxjw7HC2RphXcn3FbAsVcUFFRCweH4J6d/SY2xZ4pAtC wv4w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kgJLHS151ub4y+lwGLUu2L/TcU4fQt4EqO3WtW4S8DI=; b=yRn8+4zwa+XOHzTNnTYsE+0sIrZlZqyPSGteAbZybEdH85Y4WpVMwOk5bPc3mjbZDO wc7CkWgEFq6diseTPa9ffK40/roQ3fHqC+MMmWLxAYam4pN1Uh/lIK5/rIKqGheWBeaL Lhc6pnPoM3OiaMS7Jnbj58+t4qiSZmD86ngfp9NVygx/eIJ289u62bgvQd4GsJrcRo5y vyWybmg+EU1pWPlStcCDCkXVbM4JQkEwhPwimVxaS5ASpQQ5t3zyhKFhdxD8bwlVykkO nJBJ52I2fJYyWcYtFkJwjeK7yzZYnooBXpUthONGoetWoVZiU3eS3R9i9/iInQxegu4o JBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SpfsH3So; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si7514835ioy.95.2021.07.15.12.00.19; Thu, 15 Jul 2021 12:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=SpfsH3So; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242570AbhGOS7q (ORCPT + 99 others); Thu, 15 Jul 2021 14:59:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:53064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240428AbhGOSwx (ORCPT ); Thu, 15 Jul 2021 14:52:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0168613DF; Thu, 15 Jul 2021 18:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626374999; bh=9JKt97iK4lECn7y3m5V2RLA8bI1vpaMigflUT8hvO7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SpfsH3Sog93MLDzhmlQnVfYcYCgdCae2E/FoqOAV9QeRKdiklA05ZtFWI2X2i+C59 N9NQ8aKGVeKLxAF+44qKkUR7pNx21t2ifdDCftkCxc0FDimFJC+1KliVFAft+eF4Ax RHqDb5nSeuvAg8GS7RyRvaEzN3sxCJ9CjVmtivaw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miao-chen Chou , Yu Liu , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.10 117/215] Bluetooth: Fix the HCI to MGMT status conversion table Date: Thu, 15 Jul 2021 20:38:09 +0200 Message-Id: <20210715182620.205576554@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Liu [ Upstream commit 4ef36a52b0e47c80bbfd69c0cce61c7ae9f541ed ] 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 Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- net/bluetooth/mgmt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 13520c7b4f2f..7dfb96946220 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -247,12 +247,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.30.2