• Daniel Winkler's avatar
    Bluetooth: Break add adv into two mgmt commands · 12410572
    Daniel Winkler authored
    This patch adds support for the new advertising add interface, with the
    first command setting advertising parameters and the second to set
    advertising data. The set parameters command allows the caller to leave
    some fields "unset", with a params bitfield defining which params were
    purposefully set. Unset parameters will be given defaults when calling
    hci_add_adv_instance. The data passed to the param mgmt command is
    allowed to be flexible, so in the future if bluetoothd passes a larger
    structure with new params, the mgmt command will ignore the unknown
    members at the end.
    
    This change has been validated on both hatch (extended advertising) and
    kukui (no extended advertising) chromebooks running bluetoothd that
    support this new interface. I ran the following manual tests:
    - Set several (3) advertisements using modified test_advertisement.py
    - For each, validate correct data and parameters in btmon trace
    - Verified both for software rotation and extended adv
    
    Automatic test suite also run, testing many (25) scenarios of single and
    multi-advertising for data/parameter correctness.
    Reviewed-by: default avatarSonny Sasaka <sonnysasaka@chromium.org>
    Signed-off-by: default avatarDaniel Winkler <danielwinkler@google.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    12410572
hci_core.h 49.3 KB