diff mbox series

[v1] Bluetooth: Fix wrong opcode when LL privacy enabled

Message ID 20210927195737.v1.1.Id56e280fc8cac32561e3ea49df34308d26d559c9@changeid (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [v1] Bluetooth: Fix wrong opcode when LL privacy enabled | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/header_inline success Link

Commit Message

Howard Chung Sept. 27, 2021, 11:58 a.m. UTC
From: Yun-Hao Chung <howardchung@chromium.org>

The returned opcode of command status of remove_adv is
wrong when LL privacy is enabled.

Signed-off-by: Yun-Hao Chung <howardchung@chromium.org>
---
Test with following steps:
1. btmgmt --index 0
2. [btmgmt] power off; [btmgmt] exp-privacy on; [btmgmt] power on
3. [btmgmt] rm-adv 1
4. Check if the 'Not supported' message is present in terminal

 net/bluetooth/mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marcel Holtmann Sept. 27, 2021, 1:24 p.m. UTC | #1
Hi Howard,

> The returned opcode of command status of remove_adv is
> wrong when LL privacy is enabled.
> 
> Signed-off-by: Yun-Hao Chung <howardchung@chromium.org>
> ---
> Test with following steps:
> 1. btmgmt --index 0
> 2. [btmgmt] power off; [btmgmt] exp-privacy on; [btmgmt] power on
> 3. [btmgmt] rm-adv 1
> 4. Check if the 'Not supported' message is present in terminal
> 
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index cea01e275f1ea..87acf0d783a07 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -8222,7 +8222,7 @@  static int remove_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_REMOVE_ADVERTISING,
 				       MGMT_STATUS_NOT_SUPPORTED);
 
 	hci_dev_lock(hdev);