• Luiz Augusto von Dentz's avatar
    Bluetooth: hci_event: Fix setting of unicast qos interval · ac65eccc
    Luiz Augusto von Dentz authored
    qos->ucast interval reffers to the SDU interval, and should not
    be set to the interval value reported by the LE CIS Established
    event since the latter reffers to the ISO interval. These two
    interval are not the same thing:
    
    BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 6, Part G
    
    Isochronous interval:
    The time between two consecutive BIS or CIS events (designated
    ISO_Interval in the Link Layer)
    
    SDU interval:
    The nominal time between two consecutive SDUs that are sent or
    received by the upper layer.
    
    So this instead uses the following formula from the spec to calculate
    the resulting SDU interface:
    
    BLUETOOTH CORE SPECIFICATION Version 5.4 | Vol 6, Part G
    page 3075:
    
    Transport_Latency_C_To_P = CIG_Sync_Delay + (FT_C_To_P) ×
    ISO_Interval + SDU_Interval_C_To_P
    Transport_Latency_P_To_C = CIG_Sync_Delay + (FT_P_To_C) ×
    ISO_Interval + SDU_Interval_P_To_C
    
    Link: https://github.com/bluez/bluez/issues/823
    Fixes: 2be22f19 ("Bluetooth: hci_event: Fix parsing of CIS Established Event")
    Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
    ac65eccc
hci_event.c 191 KB