* [PATCH 1/3] Bluetooth: Use only 2 bits for controller type information
@ 2013-09-30 4:10 Marcel Holtmann
2013-09-30 18:16 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2013-09-30 4:10 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..dd2528c5 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 & 0x03) << 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] 3+ messages in thread* Re: [PATCH 1/3] Bluetooth: Use only 2 bits for controller type information
2013-09-30 4:10 [PATCH 1/3] Bluetooth: Use only 2 bits for controller type information Marcel Holtmann
@ 2013-09-30 18:16 ` Johan Hedberg
2013-10-02 6:39 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2013-09-30 18:16 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Sun, Sep 29, 2013, Marcel Holtmann wrote:
> 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(-)
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] Bluetooth: Use only 2 bits for controller type information
2013-09-30 18:16 ` Johan Hedberg
@ 2013-10-02 6:39 ` Johan Hedberg
0 siblings, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-10-02 6:39 UTC (permalink / raw)
To: Marcel Holtmann, linux-bluetooth
Hi Marcel,
On Mon, Sep 30, 2013, Johan Hedberg wrote:
> On Sun, Sep 29, 2013, Marcel Holtmann wrote:
> > 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(-)
>
> Acked-by: Johan Hedberg <johan.hedberg@intel.com>
All three patches in this set have been applied to bluetooth-next.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-02 6:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-30 4:10 [PATCH 1/3] Bluetooth: Use only 2 bits for controller type information Marcel Holtmann
2013-09-30 18:16 ` Johan Hedberg
2013-10-02 6:39 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox