Bluetooth: ISO: Rework sync_interval to be sync_factor
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 8 Jun 2023 18:12:18 +0000 (11:12 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Jun 2023 17:52:18 +0000 (10:52 -0700)
commit14f0dceca60b2fc4f2388505b25f9e6f71785e05
treeade2c669392f7afef5f157b34c6a21e7af33bdba
parent73f55453ea5236a586a7f1b3d5e2ee051d655351
Bluetooth: ISO: Rework sync_interval to be sync_factor

This rework sync_interval to be sync_factor as having sync_interval in
the order of seconds is sometimes not disarable.

Wit sync_factor the application can tell how many SDU intervals it wants
to send an announcement with PA, the EA interval is set to 2 times that
so a factor of 24 of BIG SDU interval of 10ms would look like the
following:

< HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25
        Handle: 0x01
        Properties: 0x0000
        Min advertising interval: 480.000 msec (0x0300)
        Max advertising interval: 480.000 msec (0x0300)
        Channel map: 37, 38, 39 (0x07)
        Own address type: Random (0x01)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)
        TX power: Host has no preference (0x7f)
        Primary PHY: LE 1M (0x01)
        Secondary max skip: 0x00
        Secondary PHY: LE 2M (0x02)
        SID: 0x00
        Scan request notifications: Disabled (0x00)
< HCI Command: LE Set Periodic Advertising Parameters (0x08|0x003e) plen 7
        Handle: 1
        Min interval: 240.00 msec (0x00c0)
        Max interval: 240.00 msec (0x00c0)
        Properties: 0x0000

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/bluetooth/bluetooth.h
net/bluetooth/hci_conn.c
net/bluetooth/iso.c