* [PATCH 2/2] Bluetooth: Update management interface revision
2012-09-06 15:39 [PATCH 1/2 v3] Bluetooth: mgmt: Implement support for passkey notification Johan Hedberg
@ 2012-09-06 15:39 ` Johan Hedberg
2012-09-08 3:41 ` Gustavo Padovan
0 siblings, 1 reply; 6+ messages in thread
From: Johan Hedberg @ 2012-09-06 15:39 UTC (permalink / raw)
To: linux-bluetooth
From: Johan Hedberg <johan.hedberg@intel.com>
For each kernel release where commands or events are added to the
management interface, the revision field should be increment by one.
The increment should only happen once per kernel release and not
for every command/event that gets added. The revision value is for
informational purposes only, but this simple policy would make any
future debugging a lot simple.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 8e1ab59..8934343 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -35,7 +35,7 @@
bool enable_hs;
#define MGMT_VERSION 1
-#define MGMT_REVISION 1
+#define MGMT_REVISION 2
static const u16 mgmt_commands[] = {
MGMT_OP_READ_INDEX_LIST,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Update management interface revision
2012-09-06 15:39 ` [PATCH 2/2] Bluetooth: Update management interface revision Johan Hedberg
@ 2012-09-08 3:41 ` Gustavo Padovan
0 siblings, 0 replies; 6+ messages in thread
From: Gustavo Padovan @ 2012-09-08 3:41 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
Hi Johan,
* Johan Hedberg <johan.hedberg@gmail.com> [2012-09-06 18:39:27 +0300]:
> From: Johan Hedberg <johan.hedberg@intel.com>
>
> For each kernel release where commands or events are added to the
> management interface, the revision field should be increment by one.
>
> The increment should only happen once per kernel release and not
> for every command/event that gets added. The revision value is for
> informational purposes only, but this simple policy would make any
> future debugging a lot simple.
>
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Both patches have been applied to bluetooth.git. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2 v1] Bluetooth: Fix to update EIR for uuid16
@ 2012-12-27 13:36 Syam Sidhardhan
2012-12-27 13:36 ` [PATCH 2/2] Bluetooth: Update management interface revision Syam Sidhardhan
0 siblings, 1 reply; 6+ messages in thread
From: Syam Sidhardhan @ 2012-12-27 13:36 UTC (permalink / raw)
To: linux-bluetooth
If we register a uuid other than uuid16, especially custom 128 bit uuid
then EIR is not updating properly.
After registering a 16 bit uuid. ex: "sdptool add SP", we can see the
uuid16 in the EIR as shown below.
< 0000: 01 52 0c f1 00 08 09 52 65 64 77 6f 6f 64 15 03 .R.....Redwood..
0010: 01 11 32 11 2f 11 06 11 05 11 0a 11 0e 11 0c 11 ..2./...........
0020: 1f 11 12 11 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00f0: 00 00 00 00 00 .....
> 0000: 04 0e 04 01 52 0c 00 ....R..
But after register a user defined 128 bit uuid, EIR is not
updated.
< 0000: 01 52 0c f1 00 08 09 52 65 64 77 6f 6f 64 00 00 .R.....Redwood..
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00f0: 00 00 00 00 00 .....
> 0000: 04 0e 04 01 52 0c 00 ....R..
With this fix, we can see the EIR is updated properly.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
v1 -> Incorporated the comment mentioned by Johan.
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index f559b96..ab25edf 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -515,7 +515,7 @@ static void create_eir(struct hci_dev *hdev, u8 *data)
uuid16 = get_uuid16(uuid->uuid);
if (uuid16 == 0)
- return;
+ continue;
if (uuid16 < 0x1100)
continue;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] Bluetooth: Update management interface revision
2012-12-27 13:36 [PATCH 1/2 v1] Bluetooth: Fix to update EIR for uuid16 Syam Sidhardhan
@ 2012-12-27 13:36 ` Syam Sidhardhan
2012-12-27 17:45 ` Marcel Holtmann
0 siblings, 1 reply; 6+ messages in thread
From: Syam Sidhardhan @ 2012-12-27 13:36 UTC (permalink / raw)
To: linux-bluetooth
This enable us to introduce a check in user space to know
whether it's safe to pass non-16bit UUID's to kernel or not.
Currently the kernel support only 16bit UUID's in the EIR.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index ab25edf..ba7c38a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -35,7 +35,7 @@
bool enable_hs;
#define MGMT_VERSION 1
-#define MGMT_REVISION 2
+#define MGMT_REVISION 3
static const u16 mgmt_commands[] = {
MGMT_OP_READ_INDEX_LIST,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Update management interface revision
2012-12-27 13:36 ` [PATCH 2/2] Bluetooth: Update management interface revision Syam Sidhardhan
@ 2012-12-27 17:45 ` Marcel Holtmann
2013-01-07 20:47 ` Syam Sidhardhan
0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2012-12-27 17:45 UTC (permalink / raw)
To: Syam Sidhardhan; +Cc: linux-bluetooth
Hi Syam,
> This enable us to introduce a check in user space to know
> whether it's safe to pass non-16bit UUID's to kernel or not.
> Currently the kernel support only 16bit UUID's in the EIR.
>
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
NAK. As I said before, I want the kernel to support 32-bit and 128-bit
UUIDs. There is no point in doing a minimal fix. I want to see this
fixed properly.
Regards
Marcel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Update management interface revision
2012-12-27 17:45 ` Marcel Holtmann
@ 2013-01-07 20:47 ` Syam Sidhardhan
0 siblings, 0 replies; 6+ messages in thread
From: Syam Sidhardhan @ 2013-01-07 20:47 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: Syam Sidhardhan, linux-bluetooth
Hi Marcel,
On Thu, Dec 27, 2012 at 11:15 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Syam,
>
>> This enable us to introduce a check in user space to know
>> whether it's safe to pass non-16bit UUID's to kernel or not.
>> Currently the kernel support only 16bit UUID's in the EIR.
>>
>> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
>> ---
>> net/bluetooth/mgmt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> NAK. As I said before, I want the kernel to support 32-bit and 128-bit
> UUIDs. There is no point in doing a minimal fix. I want to see this
> fixed properly.
Ok, I'll send the 32-bit and 128-bit support patches soon.
Thanks,
Syam
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-07 20:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27 13:36 [PATCH 1/2 v1] Bluetooth: Fix to update EIR for uuid16 Syam Sidhardhan
2012-12-27 13:36 ` [PATCH 2/2] Bluetooth: Update management interface revision Syam Sidhardhan
2012-12-27 17:45 ` Marcel Holtmann
2013-01-07 20:47 ` Syam Sidhardhan
-- strict thread matches above, loose matches on Subject: below --
2012-09-06 15:39 [PATCH 1/2 v3] Bluetooth: mgmt: Implement support for passkey notification Johan Hedberg
2012-09-06 15:39 ` [PATCH 2/2] Bluetooth: Update management interface revision Johan Hedberg
2012-09-08 3:41 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox