Bluetooth: Use only 2 bits for controller type information
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/3 Bluetooth: Use only 2 bits for controller type information
The controller type is limited to BR/EDR/LE and AMP controllers. This can be easily encoded with just 2 bits and still leave enough room for future controller types.
Signed-off-by Marcel Holtmann <[email protected]>
--- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_core.c +1 -1
@@ -1610,7 +1610,7 @@ int hci_get_dev_info(void __user *arg)strcpy (di.name, hdev->name); di.bdaddr = hdev->bdaddr; - di.type = (hdev->bus &0x0f ) | (hdev->dev_type <<4 ); + di.type = (hdev->bus &0x0f ) | ((hdev->dev_type &0x03 ) <<4 ); di.flags = hdev->flags; di.pkt_type = hdev->pkt_type;if (lmp_bredr_capable (hdev)) {
Signature · 1 line
1.8.3.1
Hi Marcel,
Quoted 8 lines · Marcel Holtmann
The controller type is limited to BR/EDR/LE and AMP controllers. This can be easily encoded with just 2 bits and still leave enough room for future controller types.
Signed-off-by Marcel Holtmann <[email protected]>--- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by Johan Hedberg <[email protected]>
Johan
Hi Marcel,
Quoted 11 lines · Johan Hedberg
Quoted 8 lines · Marcel Holtmann
The controller type is limited to BR/EDR/LE and AMP controllers. This can be easily encoded with just 2 bits and still leave enough room for future controller types.
Signed-off-by Marcel Holtmann <[email protected]>--- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Acked-by Johan Hedberg <[email protected]>
All three patches in this set have been applied to bluetooth-next.
Johan