diff options
author | Igor Skalkin <Igor.Skalkin@opensynergy.com> | 2022-10-24 15:40:33 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-12-12 14:19:23 -0800 |
commit | 47c50853bb9c5c35bf5c3eb00b712310ec2969e2 (patch) | |
tree | 44d2d6446d6bf9e43a9a86a341570d772c9d043c /include/uapi | |
parent | 3b1c7c00b8c22b3cb79532252c59eb0b287bb86d (diff) | |
download | linux-stable-47c50853bb9c5c35bf5c3eb00b712310ec2969e2.tar.gz linux-stable-47c50853bb9c5c35bf5c3eb00b712310ec2969e2.tar.bz2 linux-stable-47c50853bb9c5c35bf5c3eb00b712310ec2969e2.zip |
virtio_bt: Fix alignment in configuration struct
The current version of the configuration structure has unaligned
16-bit fields, but according to the specification [1], access to
the configuration space must be aligned.
Add a second, aligned version of the configuration structure
and a new feature bit indicating that this version is being used.
[1] https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.pdf
Signed-off-by: Igor Skalkin <Igor.Skalkin@opensynergy.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/virtio_bt.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/virtio_bt.h b/include/uapi/linux/virtio_bt.h index a7bd48daa9a9..af798f4c9680 100644 --- a/include/uapi/linux/virtio_bt.h +++ b/include/uapi/linux/virtio_bt.h @@ -9,6 +9,7 @@ #define VIRTIO_BT_F_VND_HCI 0 /* Indicates vendor command support */ #define VIRTIO_BT_F_MSFT_EXT 1 /* Indicates MSFT vendor support */ #define VIRTIO_BT_F_AOSP_EXT 2 /* Indicates AOSP vendor support */ +#define VIRTIO_BT_F_CONFIG_V2 3 /* Use second version configuration */ enum virtio_bt_config_type { VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0, @@ -28,4 +29,11 @@ struct virtio_bt_config { __u16 msft_opcode; } __attribute__((packed)); +struct virtio_bt_config_v2 { + __u8 type; + __u8 alignment; + __u16 vendor; + __u16 msft_opcode; +}; + #endif /* _UAPI_LINUX_VIRTIO_BT_H */ |