• Tedd Ho-Jeong An's avatar
    Bluetooth: btintel: Add combined setup and shutdown functions · ca5425e1
    Tedd Ho-Jeong An authored
    There are multiple setup and shutdown functions for Intel device and the
    setup function to be used is depends on the USB PID/VID, which makes
    difficult to maintain the code and increases the code size.
    
    This patch adds combined setup and shutdown functions to provide a
    single entry point for all Intel devices and choose the setup functions
    based on the information read with HCI_Intel_Read_Version command.
    
    Starting from TyP device, the command and response parameters for
    HCI_Intel_Read_Version command are changed even though OCF remains
    same. However, the legacy devices still can handle the command without
    error even if it has a extra parameter, so to simplify the flow,
    the new command format is used to read the version information for
    both legacy and new (tlv based) format.
    
    Also, it also adds a routine to setup the hdev callbacks in btintel.
    Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    ca5425e1
btintel.c 38.1 KB