Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1862291pxb; Mon, 13 Sep 2021 07:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQAnEDSTbrvqWchvtxbo4Wa4D+U5tlK2rNDdzJ2y51uRfocwyVbpXxiTF3HLBgzHMYMfRQ X-Received: by 2002:a17:906:f906:: with SMTP id lc6mr3698055ejb.487.1631542106235; Mon, 13 Sep 2021 07:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631542106; cv=none; d=google.com; s=arc-20160816; b=butP4uyHeunUnG4tRgXn3ehag/6EMPPznhM2xanY4RADc74PSEQ+A2+F9gIky64kTl 9byYShng+2YbIq8BtLggczdJkkeuW8Db70izmnv/1b1CrImYG9ULfSHd/NGy/Px3XZ+c mCRgoWxSLQiORCozDc2cvmWjiN4Kgu/uM5RKA+bDIR3cyc7GZeFvYjNyPNouhPXNwISv EOmeU4SylV4oVk4zjTN1m1sCgCkxuL/xYEJkbd17jJCR42BL16cfa7ApCD1fVlDWMtly iHPrWiVyVFs4ZLmOAH7EXgDcApWZxxBdvCD9DLloHLJwowNvLdMg+rHiJjzhl6RP4xcV lT2g== 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=pm5useBozoek6XOPbLQ425wW69JcZ7W022kLUoc0HMs=; b=PUwWV5gr1dVcUi1OZpJvOPwRp9mEp0IOuhmYul6Y7Ej8mavMv7+gkN7Q5wZe+XH5w1 o6XcIX5kCIT1DcIYOkHHIKohyTR+eEL1y+FT8G967F+Y3QUAzIVxqicCO+vb33XQ+IAN RIgYFiHBPAX1CeyApXUzsbZnEALzv1CEpwp0O9uZ+nYmLxu3y5bOsfiktjqKMTJ1ppec EuVPPLSIW4FNPygchrojPHePe8bu5BC0rSzG+OQk2SwjQ3VBaw7QvpYf55yS+cJN++G4 1IggsiQGezcb6r21N4qF62UMhz4qTPMcnsMGhzdjvMgkTAhyR8GNjpuXKVhYLFmbB6qB l/VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=opapfkHH; 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 i19si7371680ejw.660.2021.09.13.07.08.00; Mon, 13 Sep 2021 07:08:26 -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=opapfkHH; 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 S1344132AbhIMOEO (ORCPT + 99 others); Mon, 13 Sep 2021 10:04:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:48144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344012AbhIMOBp (ORCPT ); Mon, 13 Sep 2021 10:01:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3888661A35; Mon, 13 Sep 2021 13:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540293; bh=sR1T6JCAz9hNml6u+RPBRK6Um0nDs2HwExblbOlQzDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=opapfkHH4Z2XBePQzgo3HSH9YGHOA8c6lPbvCbSd3xyskAu1guSw9AmyWSf3ygTDH nhAdLFkY8u4Ub6hX9um0LDsg2Jy1599Ku+Pl9AiYo2cbnXjo4jn1DlCaeUGpNo9Uh+ dxXumGo3I/toA7XucuCyqo2G5x0D4qy5CKeOb7fA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tedd Ho-Jeong An , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 5.13 134/300] Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd Date: Mon, 13 Sep 2021 15:13:15 +0200 Message-Id: <20210913131113.923876906@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@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: Tedd Ho-Jeong An [ Upstream commit a25fca4d3c18766b6f7a3c95fa8faec23ef464c5 ] This patch fixes the MGMT add_advertising command repsones with the wrong opcode when it is trying to return the not supported error. Fixes: cbbdfa6f33198 ("Bluetooth: Enable controller RPA resolution using Experimental feature") Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 470eaabb021f..6a9826164fd7 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7725,7 +7725,7 @@ static int add_advertising(struct sock *sk, struct hci_dev *hdev, * advertising. */ if (hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) - return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_ADVERTISING, + return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING, MGMT_STATUS_NOT_SUPPORTED); if (cp->instance < 1 || cp->instance > hdev->le_num_of_adv_sets) -- 2.30.2