Skip to content

Commit

Permalink
Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd
Browse files Browse the repository at this point in the history
[ Upstream commit a25fca4 ]

This patch fixes the MGMT add_advertising command repsones with the
wrong opcode when it is trying to return the not supported error.

Fixes: cbbdfa6 ("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>
  • Loading branch information
tedd-an authored and gregkh committed Sep 15, 2021
1 parent bca46d2 commit 61b1db2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/mgmt.c
Expand Up @@ -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)
Expand Down

0 comments on commit 61b1db2

Please sign in to comment.