diff options
| author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2025-12-22 14:36:45 -0500 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-01-29 13:27:47 -0500 |
| commit | 0e2a6af81042e048bef1fddc70a022272d11ae84 (patch) | |
| tree | d1fb96e235ec789eaa3978eec5f991e38625b10b /include/net/bluetooth/bluetooth.h | |
| parent | e07094a51ad8faf98ea64320799ce550828e97cd (diff) | |
| download | lwn-0e2a6af81042e048bef1fddc70a022272d11ae84.tar.gz lwn-0e2a6af81042e048bef1fddc70a022272d11ae84.zip | |
Bluetooth: Fix using PHYs bitfields as PHY value
This renames the PHY fields in bt_iso_io_qos to PHYs (plural) since it
represents a bitfield where multiple PHYs can be set and make the same
change also to HCI_OP_LE_SET_CIG_PARAMS since both c_phy and p_phy
fields are bitfields.
This also fixes the assumption that hci_evt_le_cis_established PHYs
fields are compatible with bt_iso_io_qos, they are not, the fields in
hci_evt_le_cis_established represent just a single PHY value so they
need to be converted to bitfield when set in bt_iso_io_qos.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
| -rw-r--r-- | include/net/bluetooth/bluetooth.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 89a60919050b..69eed69f7f26 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -182,7 +182,7 @@ struct bt_iso_io_qos { __u32 interval; __u16 latency; __u16 sdu; - __u8 phy; + __u8 phys; __u8 rtn; }; @@ -221,9 +221,9 @@ struct bt_iso_qos { }; }; -#define BT_ISO_PHY_1M 0x01 -#define BT_ISO_PHY_2M 0x02 -#define BT_ISO_PHY_CODED 0x04 +#define BT_ISO_PHY_1M BIT(0) +#define BT_ISO_PHY_2M BIT(1) +#define BT_ISO_PHY_CODED BIT(2) #define BT_ISO_PHY_ANY (BT_ISO_PHY_1M | BT_ISO_PHY_2M | \ BT_ISO_PHY_CODED) |
