Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Use only 2 bits for controller type information
@ 2013-09-29  4:09 Marcel Holtmann
  2013-09-29 12:59 ` Anderson Lizardo
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2013-09-29  4:09 UTC (permalink / raw)
  To: linux-bluetooth

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 <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 4549b5c..ebba5a6 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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 & 0x30) << 4);
 	di.flags    = hdev->flags;
 	di.pkt_type = hdev->pkt_type;
 	if (lmp_bredr_capable(hdev)) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-02 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29  4:09 [PATCH] Bluetooth: Use only 2 bits for controller type information Marcel Holtmann
2013-09-29 12:59 ` Anderson Lizardo
2013-09-30  4:01   ` Marcel Holtmann
2013-09-30 11:31     ` Anderson Lizardo
2013-10-02 12:41       ` Anderson Lizardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox