summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTedd Ho-Jeong An <tedd.an@intel.com>2021-07-26 13:22:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-15 09:50:35 +0200
commit61b1db2358686101db62f6bd200cb0eaf86f9ff6 (patch)
treef3251bf8cfdc0605b5cb3163008e653fe670d5d1 /net
parentbca46d228393682d47f91923da46675346ec2110 (diff)
downloadlinux-stable-61b1db2358686101db62f6bd200cb0eaf86f9ff6.tar.gz
linux-stable-61b1db2358686101db62f6bd200cb0eaf86f9ff6.tar.bz2
linux-stable-61b1db2358686101db62f6bd200cb0eaf86f9ff6.zip
Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd
[ 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 <tedd.an@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
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)