]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: Prevent unintended pause by checking if advertising is active
authorYang Li <yang.li@amlogic.com>
Thu, 19 Jun 2025 03:01:07 +0000 (11:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 14:03:07 +0000 (16:03 +0200)
commit529281206f1167d875a8dde4a9eb85298d40fcf4
treeeff3d03e55c61322c76ac80204c0362b2dc3ff8b
parente373354ecfbf0fbf779098fd551735771f94df62
Bluetooth: Prevent unintended pause by checking if advertising is active

[ Upstream commit 1f029b4e30a602db33dedee5ac676e9236ad193c ]

When PA Create Sync is enabled, advertising resumes unexpectedly.
Therefore, it's necessary to check whether advertising is currently
active before attempting to pause it.

  < HCI Command: LE Add Device To... (0x08|0x0011) plen 7  #1345 [hci0] 48.306205
   Address type: Random (0x01)
   Address: 4F:84:84:5F:88:17 (Resolvable)
   Identity type: Random (0x01)
   Identity: FC:5B:8C:F7:5D:FB (Static)
  < HCI Command: LE Set Address Re.. (0x08|0x002d) plen 1  #1347 [hci0] 48.308023
   Address resolution: Enabled (0x01)
  ...
  < HCI Command: LE Set Extended A.. (0x08|0x0039) plen 6  #1349 [hci0] 48.309650
   Extended advertising: Enabled (0x01)
   Number of sets: 1 (0x01)
   Entry 0
   Handle: 0x01
   Duration: 0 ms (0x00)
   Max ext adv events: 0
  ...
  < HCI Command: LE Periodic Adve.. (0x08|0x0044) plen 14  #1355 [hci0] 48.314575
   Options: 0x0000
   Use advertising SID, Advertiser Address Type and address
   Reporting initially enabled
   SID: 0x02
   Adv address type: Random (0x01)
   Adv address: 4F:84:84:5F:88:17 (Resolvable)
   Identity type: Random (0x01)
   Identity: FC:5B:8C:F7:5D:FB (Static)
   Skip: 0x0000
   Sync timeout: 20000 msec (0x07d0)
   Sync CTE type: 0x0000

Fixes: ad383c2c65a5 ("Bluetooth: hci_sync: Enable advertising when LL privacy is enabled")
Signed-off-by: Yang Li <yang.li@amlogic.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_sync.c