• Luiz Augusto von Dentz's avatar
    Bluetooth: hci_sync: Enable advertising when LL privacy is enabled · ad383c2c
    Luiz Augusto von Dentz authored
    This enables advertising when LL privacy is enabled and changes the
    command sequence when resolving list is updated to also account for when
    advertising is enabled using the following sequence:
    
    If there are devices to scan:
    
    Disable Scanning -> Update Accept List ->
    use_ll_privacy((Disable Advertising) -> Disable Resolving List ->
    Update Resolving List -> Enable Resolving List -> (Enable Advertising)) ->
    Enable Scanning
    
    Otherwise:
    
    Disable Scanning
    
    Errors during the Update Accept List stage are handled gracefully by
    restoring any previous state (e.g. advertising) and disabling the use of
    accept list as either accept list or resolving list could not be
    updated.
    
    Tested with:
    
    mgmt-tester -s "LL Privacy"
    
    Test Summary
    ------------
    LL Privacy - Add Device 1 (Add to WL)                Passed
    LL Privacy - Add Device 2 (Add to RL)                Passed
    LL Privacy - Add Device 3 (Enable RL)                Passed
    LL Privacy - Add Device 4 (2 Devices to WL)          Passed
    LL Privacy - Add Device 5 (2 Devices to RL)          Passed
    LL Privacy - Add Device 6 (RL is full)               Passed
    LL Privacy - Add Device 7 (WL is full)               Passed
    LL Privacy - Add Device 8 (Disable Adv)              Passed
    LL Privacy - Add Device 9 (Multi Adv)                Passed
    LL Privacy - Add Device 10 (Multi Dev and Multi Adv) Passed
    LL Privacy - Remove Device 1 (Remove from WL)        Passed
    LL Privacy - Remove Device 2 (Remove from RL)        Passed
    LL Privacy - Remove Device 3 (Disable RL)            Passed
    LL Privacy - Remove Device 4 (Disable Adv)           Passed
    LL Privacy - Remove Device 5 (Multi Adv)             Passed
    LL Privacy - Start Discovery 1 (Disable RL)          Passed
    LL Privacy - Start Discovery 2 (Disable RL)          Passed
    Total: 18, Passed: 18 (100.0%), Failed: 0, Not Run: 0
    Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    ad383c2c
hci_core.h 51.5 KB