• Daniel Winkler's avatar
    Bluetooth: Use ext adv handle from requests in CCs · 25e70886
    Daniel Winkler authored
    Some extended advertising hci command complete events are still using
    hdev->cur_adv_instance to map the request to the correct advertisement
    handle. However, with extended advertising, "current instance" doesn't
    make sense as we can have multiple concurrent advertisements. This
    change switches these command complete handlers to use the advertising
    handle from the request/event, to ensure we will always use the correct
    advertising handle regardless of the state of hdev->cur_adv_instance.
    
    This change is tested on hatch and kefka chromebooks and run through
    single- and multi-advertising automated tests to confirm callbacks
    report tx power to the correct advertising handle, etc.
    Reviewed-by: default avatarMiao-chen Chou <mcchou@chromium.org>
    Signed-off-by: default avatarDaniel Winkler <danielwinkler@google.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    25e70886
hci_event.c 152 KB