Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1842496pxb; Mon, 13 Sep 2021 06:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiYVOZ0j3bxRgzCrvpsFq9LpTKqLlSYbwUU35R6Fdr9PaA4IjEjOMyoBTekist/zmGbbcV X-Received: by 2002:a05:6e02:dce:: with SMTP id l14mr2376809ilj.272.1631540723333; Mon, 13 Sep 2021 06:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631540723; cv=none; d=google.com; s=arc-20160816; b=iBctxTq5D46ZqECpwL3nA8zsb2LR/U66m/GGMj/QyYgo9yc32FL/q2zD+64rW1/f/F nuclDnX55UPI1Bxxt6LOL+qyTethXiuunmj06aBsRgDwg8W1fbQGgVDBKETO6zwT+2gF iv9yiHsAnES624joUioapOdHXeIcVgOO6VKjeShqvc1CJXkAypP7dTqp8eKlXLo+xtMG m5qU60F/kPMR0qW3ZZlF2xwJkecDCc2D+KrU9DLbG2UH52XJfgPtZKFU4+oOZ+/c/hMD F0aZyL77RwLQCYoTMLNXjmWMpJkQI3xchg76Zw3udifBSSE2IMuD1NPZMrlr+yxcWErP I5KQ== 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=HgRSOKSGx+rM41R0ogvr4pa5erHrJfheWZ3JWs6SuYY=; b=TNMtNFmPJBpqcZyeh2jooyQayNbUn94DbvKPUjFUgx55ekpjnDkt+ZVSHRSP0Nu7Ih UJUxK4KWTI7My3Z7SZBI9kbSvw4EdWnIAjapCoSAdYE+FlJRR8qibyEWAMpIIwfw8yeX Cv4NBfV6Wgyo9QnJ4MJHMTo63MKhszfH/jurqbAqfC7QUiAsPrPBNHuvsHB6hSLpOD5Y +Kpmzl8IpIPMOpRJgX/RCWS+mOqj87ar+utgspSXtZax70eMXAdyLrN+aajacAhanyjT 7/I9jHbahmquhwFRxp/BGSSNBq2To011HcbOMzH93hq7BpHQuYfes9e0RF4YGoq0lVnf e/kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YI83SMca; 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 q7si8218317ilu.111.2021.09.13.06.44.48; Mon, 13 Sep 2021 06:45:23 -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=YI83SMca; 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 S243418AbhIMNm2 (ORCPT + 99 others); Mon, 13 Sep 2021 09:42:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:33822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242391AbhIMNgi (ORCPT ); Mon, 13 Sep 2021 09:36:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B518613AB; Mon, 13 Sep 2021 13:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539671; bh=DncR3jmiGhFTrbVDB5+N3uR1rgjhud+qBu1f4jxdqaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YI83SMcaE9m4wZC93+r2Sge3hXSgCjfsX+lVFSu6jI09eliM23uRLDLTQjTXQGfkk jHHVo/OXvyoCii9gqW11gVH5kVIyTM+iBo2w+AqpAbHj5Sh7fUxHS62oyPZH9C88MZ 44KuCsR1FdeXEFUKHJi0Z1LM25F7GaecfAymmHdA= 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.10 115/236] Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd Date: Mon, 13 Sep 2021 15:13:40 +0200 Message-Id: <20210913131104.263649144@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 31a585fe0c7c..08f67f91d427 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7464,7 +7464,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