Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp711193pxv; Thu, 15 Jul 2021 14:08:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNyyloA76iVI1hTXyeXnO0jzII4BCaTVlo8DJCidUFK1Da3czl2JF2NLIIzB9uEhJB8lB7 X-Received: by 2002:a50:ee88:: with SMTP id f8mr9792012edr.331.1626383336250; Thu, 15 Jul 2021 14:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383336; cv=none; d=google.com; s=arc-20160816; b=kN9tFnWqRHfj6rijewHOfO5wLb+4cGgvlfBFx6xgZ2ktCTX25Hb7aOQ1FbAiRn0ksv xiVzb6zrRmndqSDXMInnjz9nCZifnmkiX82VqzUUyE3QRGRo3zt55rVSy5y45ImAigD3 pWFgeAwzj1YmxXtoujr/WvRFF0TuS6zG0bH0zXD0pJU3cbIVM6p5UyN1AWIqWbYOKyN5 LuuecWnR0kg8qf6RMAPm+rJJJyJ5s5Dj2Rfq0xdX4aTGuBTdlrBo9Ba1I+c1MebDtr1w 4W0HshPTRy4zS0bXaXY2lCUn1t9elSnuEzY4JS5qP88qekOdwuolGsrsfkeIlTpwwxCq /YRQ== 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=I5Pnc8x4TszaFKcmb0Fy0y7h9C5b55tBUssvhH/oo+U=; b=lVykEhOvq1WEEY2MDvDsRp8cX0u1fOdljgGnZ2Rz4J2bsfWdUylNHYT/eeRZ/C+7yC Aa+Db0yYFHzXGc4c3VWY0yB6lOelemQt620hFT9IBohC4iltqo0HRkpyuQZUCdoGRuSo l27PH4cQAeZxsGG77ehPcMuQFpaCw3OLIijkUicJmAU0ExlcQx5SCHrVlpbIT491PLnY VfIczb4oaVw4zUdv2EEJSkjWqvM2jjIlccWGM74WQU8CanKg29yJizllsmvcIAI3YRyB aueF/LSsM/4tL0hPLlWu00h8qieA7Y6lqic/w1g5PxwmY37LMwkR26RE6W3ZfFXVkHSo jO1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=StVTHCD+; 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 r26si7505713ejz.423.2021.07.15.14.08.32; Thu, 15 Jul 2021 14:08:56 -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=StVTHCD+; 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 S244581AbhGOTS3 (ORCPT + 99 others); Thu, 15 Jul 2021 15:18:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:39762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242670AbhGOTC5 (ORCPT ); Thu, 15 Jul 2021 15:02:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE35C613EE; Thu, 15 Jul 2021 18:59:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375553; bh=UT+lGD+m5Zb1skbLoHeZ+Ma9ki23VNUu/GHEJVn97Rw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StVTHCD+/r4K1xMzWhSbRsHlmOB4RC5Jw3ed2don1WLTACGcD0KvmwA8bAlGxVQk+ LJXH9IXIu1wokptbcFmYPS37rvh/JNdf7ZRa0Zp63dsuu2J8AXkCWFscQEUfbstOGX HXgVswX2gZEGfVQLjbVq9y64AOdyPqLw/Tf79EzY= 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.12 136/242] Bluetooth: Fix the HCI to MGMT status conversion table Date: Thu, 15 Jul 2021 20:38:18 +0200 Message-Id: <20210715182616.963271306@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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 71de147f5558..06e24b5e164d 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -250,12 +250,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