• J
    Bluetooth: Update Set Discoverable to support LE · 9a43e25f
    Johan Hedberg 提交于
    This patch updates the Set Discoverable management command to also be
    applicable for LE. In particular this affects the advertising flags
    where we can say "general discoverable" or "limited discoverable".
    
    Since the device flags may not be up-to-date when the advertising data
    is written this patch introduces a get_adv_discov_flags() helper
    function which also looks at any pending mgmt commands (a pending
    set_discoverable would be the exception when the flags are not yet
    correct).
    
    The patch also adds HCI_DISCOVERABLE flag clearing to the
    mgmt_discoverable_timeout function, since the code was previously
    relying on the mgmt_discoverable callback to handle this, which is only
    called for the BR/EDR-only HCI_Write_Scan_Enable command.
    Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    9a43e25f
mgmt.c 119.4 KB