* Re: btusb_intr_complete returns -EPIPE
From: Oliver Neukum @ 2014-10-15 10:11 UTC (permalink / raw)
To: Alan Stern
Cc: Naveen Kumar Parna, linux-bluetooth@vger.kernel.org, linux-usb,
acho
In-Reply-To: <Pine.LNX.4.44L0.1410091030580.1372-100000@iolanthe.rowland.org>
On Thu, 2014-10-09 at 10:31 -0400, Alan Stern wrote:
> On Thu, 9 Oct 2014, Naveen Kumar Parna wrote:
>
> > Hi Oliver & Alan,
> >
> >
> >
> > Thanks for your inputs.
> >
> >
> >
> > I enabled the dynamic debugging for USB HC driver. Please correct me
> > if I am wrong.
>
> Debugging the kernel (or doing anything else to the kernel, for that
> matter) won't solve the problem if it is caused by a buggy hub.
Indeed. Could you just try a different hub?
Regards
Oliver
^ permalink raw reply
* Re: [PATCH] Adds Sony Move Navigation controller.
From: Alex Gal @ 2014-10-15 11:24 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <2485489.uEt5Y7pmtU@uw000953>
Hi Szymon,
On Fri, Oct 10, 2014 at 6:07 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Thanks for patch, some small comments from my side.
No problem, I will resend the patches later this week.
By the way, you were right about the Move Navigation clones since they
try to connect with a different mac address. I will try to see what
can be done about them.
Thank you,
Alex
^ permalink raw reply
* [PATCH] Bluetooth: Incorrect locking when sending data in softirq
From: Jukka Rissanen @ 2014-10-15 12:43 UTC (permalink / raw)
To: linux-bluetooth
Use spin_lock_irqsave() when sending data to hci channel. Otherwise
the lockdep gives inconsistent lock state warning when sending data
to 6lowpan channel.
[ INFO: inconsistent lock state ]
3.17.0-rc1-bt6lowpan #1 Not tainted
---------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
kworker/u3:0/321 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&(&list->lock)->rlock#6){+.?...}, at: [<f845fdac>] hci_send_acl+0xac/0x290 [bluetooth]
{IN-SOFTIRQ-W} state was registered at:
[<c10915a3>] __lock_acquire+0x6d3/0x1d20
[<c109325d>] lock_acquire+0x9d/0x140
[<c1889c25>] _raw_spin_lock+0x45/0x80
[<f845fdac>] hci_send_acl+0xac/0x290 [bluetooth]
[<f8480c60>] l2cap_do_send+0x60/0x100 [bluetooth]
[<f8484830>] l2cap_chan_send+0x7f0/0x10e0 [bluetooth]
[<f873191e>] send_pkt+0x4e/0xa0 [bluetooth_6lowpan]
[<f8731d20>] bt_xmit+0x3b0/0x770 [bluetooth_6lowpan]
[<c17742f4>] dev_hard_start_xmit+0x344/0x670
[<c17749ad>] __dev_queue_xmit+0x38d/0x680
[<c1774caf>] dev_queue_xmit+0xf/0x20
[<c177b8b0>] neigh_connected_output+0x130/0x1a0
[<c1812a63>] ip6_finish_output2+0x173/0x8c0
[<c18182db>] ip6_finish_output+0x7b/0x1b0
[<c18184a7>] ip6_output+0x97/0x2a0
[<c183a46b>] mld_sendpack+0x5eb/0x650
[<c183acc1>] mld_ifc_timer_expire+0x191/0x2f0
[<c10ac385>] call_timer_fn+0x85/0x1c0
[<c10acb72>] run_timer_softirq+0x192/0x280
[<c104fd84>] __do_softirq+0xd4/0x300
[<c10049fc>] do_softirq_own_stack+0x2c/0x40
[<c1050136>] irq_exit+0x86/0xb0
[<c188bd98>] smp_apic_timer_interrupt+0x38/0x50
[<c188b6ce>] apic_timer_interrupt+0x32/0x38
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
Hi,
this patch fixes the locking issue when sending larger amount of
data via 6lowpan link. After this patch the lockdep no longer warns
about softirq issues.
Cheers,
Jukka
net/bluetooth/hci_core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8aea4be..3e295ff 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -4642,6 +4642,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
struct hci_conn *conn = chan->conn;
struct hci_dev *hdev = conn->hdev;
struct sk_buff *list;
+ unsigned long irq_flags;
skb->len = skb_headlen(skb);
skb->data_len = 0;
@@ -4673,7 +4674,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
skb_shinfo(skb)->frag_list = NULL;
/* Queue all fragments atomically */
- spin_lock(&queue->lock);
+ spin_lock_irqsave(&queue->lock, irq_flags);
__skb_queue_tail(queue, skb);
@@ -4690,7 +4691,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
__skb_queue_tail(queue, skb);
} while (list);
- spin_unlock(&queue->lock);
+ spin_unlock_irqrestore(&queue->lock, irq_flags);
}
}
--
1.8.3.1
^ permalink raw reply related
* [PATCH] android/pts: Update MAP PTS tests
From: Sebastian Chlad @ 2014-10-15 13:04 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sebastian Chlad
Checked and tested against PTS 5.3
---
android/pics-map.txt | 2 +-
android/pixit-map.txt | 2 +-
android/pts-map.txt | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/android/pics-map.txt b/android/pics-map.txt
index 461c6ce..3f783a9 100644
--- a/android/pics-map.txt
+++ b/android/pics-map.txt
@@ -1,6 +1,6 @@
MAP PICS for the PTS tool.
-PTS version: 5.2
+PTS version: 5.3
* - different than PTS defaults
# - not yet implemented/supported
diff --git a/android/pixit-map.txt b/android/pixit-map.txt
index 45a374a..c8c130c 100644
--- a/android/pixit-map.txt
+++ b/android/pixit-map.txt
@@ -1,6 +1,6 @@
MAP PIXIT for the PTS tool.
-PTS version: 5.2
+PTS version: 5.3
* - different than PTS defaults
& - should be set to IUT Bluetooth address
diff --git a/android/pts-map.txt b/android/pts-map.txt
index 5f5a4f3..57cb317 100644
--- a/android/pts-map.txt
+++ b/android/pts-map.txt
@@ -1,7 +1,7 @@
PTS test results for MAP
-PTS version: 5.2
-Tested: 16-July-2014
+PTS version: 5.3
+Tested: 15-October-2014
Android version: 4.4.4
Results:
--
1.8.5.3
^ permalink raw reply related
* Re: btusb_intr_complete returns -EPIPE
From: Naveen Kumar Parna @ 2014-10-15 13:09 UTC (permalink / raw)
To: Oliver Neukum
Cc: Alan Stern, linux-bluetooth@vger.kernel.org, linux-usb, acho
In-Reply-To: <1413367888.7328.1.camel@linux-0dmf.site>
EHCI controller on PCI card and hub("rate-matching" hub) also internal.
Is it possible to change the internal hub?
Thanks,
Naveen
On Wed, Oct 15, 2014 at 3:41 PM, Oliver Neukum <oneukum@suse.de> wrote:
> On Thu, 2014-10-09 at 10:31 -0400, Alan Stern wrote:
>> On Thu, 9 Oct 2014, Naveen Kumar Parna wrote:
>>
>> > Hi Oliver & Alan,
>> >
>> >
>> >
>> > Thanks for your inputs.
>> >
>> >
>> >
>> > I enabled the dynamic debugging for USB HC driver. Please correct me
>> > if I am wrong.
>>
>> Debugging the kernel (or doing anything else to the kernel, for that
>> matter) won't solve the problem if it is caused by a buggy hub.
>
> Indeed. Could you just try a different hub?
>
> Regards
> Oliver
>
>
>
^ permalink raw reply
* Re: [PATCH] Bluetooth: Incorrect locking when sending data in softirq
From: Peter Hurley @ 2014-10-15 13:18 UTC (permalink / raw)
To: Jukka Rissanen, linux-bluetooth
In-Reply-To: <1413376985-25812-1-git-send-email-jukka.rissanen@linux.intel.com>
Hi Jukka,
On 10/15/2014 08:43 AM, Jukka Rissanen wrote:
> Use spin_lock_irqsave() when sending data to hci channel. Otherwise
> the lockdep gives inconsistent lock state warning when sending data
> to 6lowpan channel.
>
> [ INFO: inconsistent lock state ]
> 3.17.0-rc1-bt6lowpan #1 Not tainted
> ---------------------------------
> inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
> kworker/u3:0/321 [HC0[0]:SC0[0]:HE1:SE1] takes:
> (&(&list->lock)->rlock#6){+.?...}, at: [<f845fdac>] hci_send_acl+0xac/0x290 [bluetooth]
> {IN-SOFTIRQ-W} state was registered at:
> [<c10915a3>] __lock_acquire+0x6d3/0x1d20
> [<c109325d>] lock_acquire+0x9d/0x140
> [<c1889c25>] _raw_spin_lock+0x45/0x80
> [<f845fdac>] hci_send_acl+0xac/0x290 [bluetooth]
> [<f8480c60>] l2cap_do_send+0x60/0x100 [bluetooth]
> [<f8484830>] l2cap_chan_send+0x7f0/0x10e0 [bluetooth]
> [<f873191e>] send_pkt+0x4e/0xa0 [bluetooth_6lowpan]
> [<f8731d20>] bt_xmit+0x3b0/0x770 [bluetooth_6lowpan]
> [<c17742f4>] dev_hard_start_xmit+0x344/0x670
> [<c17749ad>] __dev_queue_xmit+0x38d/0x680
> [<c1774caf>] dev_queue_xmit+0xf/0x20
> [<c177b8b0>] neigh_connected_output+0x130/0x1a0
> [<c1812a63>] ip6_finish_output2+0x173/0x8c0
> [<c18182db>] ip6_finish_output+0x7b/0x1b0
> [<c18184a7>] ip6_output+0x97/0x2a0
> [<c183a46b>] mld_sendpack+0x5eb/0x650
> [<c183acc1>] mld_ifc_timer_expire+0x191/0x2f0
> [<c10ac385>] call_timer_fn+0x85/0x1c0
> [<c10acb72>] run_timer_softirq+0x192/0x280
> [<c104fd84>] __do_softirq+0xd4/0x300
> [<c10049fc>] do_softirq_own_stack+0x2c/0x40
> [<c1050136>] irq_exit+0x86/0xb0
> [<c188bd98>] smp_apic_timer_interrupt+0x38/0x50
> [<c188b6ce>] apic_timer_interrupt+0x32/0x38
>
> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
> ---
> Hi,
>
> this patch fixes the locking issue when sending larger amount of
> data via 6lowpan link. After this patch the lockdep no longer warns
> about softirq issues.
>
> Cheers,
> Jukka
>
>
> net/bluetooth/hci_core.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 8aea4be..3e295ff 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -4642,6 +4642,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
> struct hci_conn *conn = chan->conn;
> struct hci_dev *hdev = conn->hdev;
> struct sk_buff *list;
> + unsigned long irq_flags;
>
> skb->len = skb_headlen(skb);
> skb->data_len = 0;
> @@ -4673,7 +4674,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
> skb_shinfo(skb)->frag_list = NULL;
>
> /* Queue all fragments atomically */
> - spin_lock(&queue->lock);
> + spin_lock_irqsave(&queue->lock, irq_flags);
spin_lock_bh(&queue->lock) will suffice.
Also, please consider submitting a patch to netdev to document the lock
requirement with the struct sk_buff_head definition.
Regards,
Peter Hurley
>
> __skb_queue_tail(queue, skb);
>
> @@ -4690,7 +4691,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
> __skb_queue_tail(queue, skb);
> } while (list);
>
> - spin_unlock(&queue->lock);
> + spin_unlock_irqrestore(&queue->lock, irq_flags);
> }
> }
>
>
^ permalink raw reply
* Re: [PATCH] Bluetooth: Incorrect locking when sending data in softirq
From: Jukka Rissanen @ 2014-10-15 13:32 UTC (permalink / raw)
To: Peter Hurley; +Cc: linux-bluetooth
In-Reply-To: <543E7414.8090209@hurleysoftware.com>
Hi Peter,
On ke, 2014-10-15 at 09:18 -0400, Peter Hurley wrote:
> Hi Jukka,
>
> On 10/15/2014 08:43 AM, Jukka Rissanen wrote:
> > Use spin_lock_irqsave() when sending data to hci channel. Otherwise
> > the lockdep gives inconsistent lock state warning when sending data
> > to 6lowpan channel.
> >
> > [ INFO: inconsistent lock state ]
> > 3.17.0-rc1-bt6lowpan #1 Not tainted
> > ---------------------------------
> > inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
> > kworker/u3:0/321 [HC0[0]:SC0[0]:HE1:SE1] takes:
> > (&(&list->lock)->rlock#6){+.?...}, at: [<f845fdac>] hci_send_acl+0xac/0x290 [bluetooth]
> > {IN-SOFTIRQ-W} state was registered at:
> > [<c10915a3>] __lock_acquire+0x6d3/0x1d20
> > [<c109325d>] lock_acquire+0x9d/0x140
> > [<c1889c25>] _raw_spin_lock+0x45/0x80
> > [<f845fdac>] hci_send_acl+0xac/0x290 [bluetooth]
> > [<f8480c60>] l2cap_do_send+0x60/0x100 [bluetooth]
> > [<f8484830>] l2cap_chan_send+0x7f0/0x10e0 [bluetooth]
> > [<f873191e>] send_pkt+0x4e/0xa0 [bluetooth_6lowpan]
> > [<f8731d20>] bt_xmit+0x3b0/0x770 [bluetooth_6lowpan]
> > [<c17742f4>] dev_hard_start_xmit+0x344/0x670
> > [<c17749ad>] __dev_queue_xmit+0x38d/0x680
> > [<c1774caf>] dev_queue_xmit+0xf/0x20
> > [<c177b8b0>] neigh_connected_output+0x130/0x1a0
> > [<c1812a63>] ip6_finish_output2+0x173/0x8c0
> > [<c18182db>] ip6_finish_output+0x7b/0x1b0
> > [<c18184a7>] ip6_output+0x97/0x2a0
> > [<c183a46b>] mld_sendpack+0x5eb/0x650
> > [<c183acc1>] mld_ifc_timer_expire+0x191/0x2f0
> > [<c10ac385>] call_timer_fn+0x85/0x1c0
> > [<c10acb72>] run_timer_softirq+0x192/0x280
> > [<c104fd84>] __do_softirq+0xd4/0x300
> > [<c10049fc>] do_softirq_own_stack+0x2c/0x40
> > [<c1050136>] irq_exit+0x86/0xb0
> > [<c188bd98>] smp_apic_timer_interrupt+0x38/0x50
> > [<c188b6ce>] apic_timer_interrupt+0x32/0x38
> >
> > Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
> > ---
> > Hi,
> >
> > this patch fixes the locking issue when sending larger amount of
> > data via 6lowpan link. After this patch the lockdep no longer warns
> > about softirq issues.
> >
> > Cheers,
> > Jukka
> >
> >
> > net/bluetooth/hci_core.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> > index 8aea4be..3e295ff 100644
> > --- a/net/bluetooth/hci_core.c
> > +++ b/net/bluetooth/hci_core.c
> > @@ -4642,6 +4642,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
> > struct hci_conn *conn = chan->conn;
> > struct hci_dev *hdev = conn->hdev;
> > struct sk_buff *list;
> > + unsigned long irq_flags;
> >
> > skb->len = skb_headlen(skb);
> > skb->data_len = 0;
> > @@ -4673,7 +4674,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
> > skb_shinfo(skb)->frag_list = NULL;
> >
> > /* Queue all fragments atomically */
> > - spin_lock(&queue->lock);
> > + spin_lock_irqsave(&queue->lock, irq_flags);
>
> spin_lock_bh(&queue->lock) will suffice.
I thought so too but when using spin_lock_bh() I saw this warning
WARNING: CPU: 0 PID: 269 at .../linux/kernel/softirq.c:146
__local_bh_enable_ip+0x98/0xf0()
Modules linked in: bluetooth_6lowpan 6lowpan rfcomm ecb btusb bnep
bluetooth nfc rfkill ohci_pci snd_intel8x0 snd_ac97_codec ac97_bus
parport_pc parport
CPU: 0 PID: 269 Comm: systemd-journal Not tainted 3.17.0-rc1-bt6lowpan
#1
Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox
12/01/2006
00000000 00000000 f600bb4c c18821c1 00000000 f600bb80 c104c472 c1ac7860
00000000 0000010d c1ac7c68 00000092 c104fc58 00000092 c104fc58 00000201
f82d6e39 00000000 f600bb90 c104c532 00000009 00000000 f600bba0 c104fc58
Call Trace:
[<c18821c1>] dump_stack+0x4b/0x75
[<c104c472>] warn_slowpath_common+0x82/0xa0
[<c104fc58>] ? __local_bh_enable_ip+0x98/0xf0
[<c104fc58>] ? __local_bh_enable_ip+0x98/0xf0
[<f82d6e39>] ? hci_send_acl+0x199/0x290 [bluetooth]
[<c104c532>] warn_slowpath_null+0x22/0x30
[<c104fc58>] __local_bh_enable_ip+0x98/0xf0
[<c1889fff>] _raw_spin_unlock_bh+0x2f/0x40
[<f82d6e39>] hci_send_acl+0x199/0x290 [bluetooth]
[<c108c956>] ? trace_hardirqs_off_caller+0x66/0x160
[<f82f7bf0>] l2cap_do_send+0x60/0x100 [bluetooth]
[<c108ca5b>] ? trace_hardirqs_off+0xb/0x10
[<c188a051>] ? _raw_spin_unlock_irqrestore+0x41/0x70
[<c1763125>] ? skb_dequeue+0x45/0x60
[<f82fb7c0>] l2cap_chan_send+0x7f0/0x10e0 [bluetooth]
[<c108ca5b>] ? trace_hardirqs_off+0xb/0x10
[<c188a6d1>] ? _raw_write_unlock_irqrestore+0x41/0x70
[<c187f10c>] ? kmemleak_alloc+0x3c/0xb0
[<f84f591e>] send_pkt+0x4e/0xa0 [bluetooth_6lowpan]
[<f84f5d20>] bt_xmit+0x3b0/0x770 [bluetooth_6lowpan]
[<c176f2a0>] ? netif_napi_del+0x50/0x50
[<c17742f4>] dev_hard_start_xmit+0x344/0x670
[<c1889c4b>] ? _raw_spin_lock+0x6b/0x80
[<c17749ad>] __dev_queue_xmit+0x38d/0x680
[<c177465b>] ? __dev_queue_xmit+0x3b/0x680
[<c108f1d4>] ? trace_hardirqs_on_caller+0xf4/0x240
[<f84f5820>] ? lookup_peer+0xb0/0xb0 [bluetooth_6lowpan]
[<c1774caf>] dev_queue_xmit+0xf/0x20
[<c177b8b0>] neigh_connected_output+0x130/0x1a0
[<c1812a63>] ? ip6_finish_output2+0x173/0x8c0
[<c1812a63>] ip6_finish_output2+0x173/0x8c0
[<c181293c>] ? ip6_finish_output2+0x4c/0x8c0
[<c18182db>] ip6_finish_output+0x7b/0x1b0
[<c18184a7>] ip6_output+0x97/0x2a0
[<c1825cb0>] ? ip6_blackhole_route+0x250/0x250
[<c183a46b>] mld_sendpack+0x5eb/0x650
[<c183acc1>] ? mld_ifc_timer_expire+0x191/0x2f0
[<c183acc1>] mld_ifc_timer_expire+0x191/0x2f0
[<c10ac385>] call_timer_fn+0x85/0x1c0
[<c10ac300>] ? process_timeout+0x10/0x10
[<c108f1d4>] ? trace_hardirqs_on_caller+0xf4/0x240
[<c183ab30>] ? mld_send_initial_cr.part.31+0xa0/0xa0
[<c10acb72>] run_timer_softirq+0x192/0x280
[<c104fcb0>] ? __local_bh_enable_ip+0xf0/0xf0
[<c13d09ff>] ? __this_cpu_preempt_check+0xf/0x20
[<c183ab30>] ? mld_send_initial_cr.part.31+0xa0/0xa0
[<c104fd84>] __do_softirq+0xd4/0x300
[<c104fcb0>] ? __local_bh_enable_ip+0xf0/0xf0
[<c10049fc>] do_softirq_own_stack+0x2c/0x40
<IRQ> [<c1050136>] irq_exit+0x86/0xb0
[<c188bd98>] smp_apic_timer_interrupt+0x38/0x50
[<c188b6ce>] apic_timer_interrupt+0x32/0x38
[<c106e240>] ? __sched_fork.isra.74+0x140/0x140
[<c10c8dbb>] ? is_module_text_address+0x2b/0x50
[<c1065772>] __kernel_text_address+0x32/0x80
[<c1005c2f>] print_context_stack+0x3f/0xe0
[<c1004b65>] dump_trace+0xc5/0x1f0
[<c100fcf0>] save_stack_trace+0x30/0x50
[<c116aa8a>] create_object+0x10a/0x280
[<c187f10c>] kmemleak_alloc+0x3c/0xb0
[<c10718bb>] ? preempt_count_add+0x4b/0xa0
[<c115e693>] kmem_cache_alloc+0x1a3/0x290
[<c116fe47>] ? get_empty_filp+0x57/0x1d0
[<c116fe47>] get_empty_filp+0x57/0x1d0
[<c10761ef>] ? sched_clock_cpu+0x10f/0x160
[<c117bcd8>] path_openat+0x28/0x5c0
[<c13d09e2>] ? debug_smp_processor_id+0x12/0x20
[<c117d331>] do_filp_open+0x31/0x90
[<c118a2f8>] ? __alloc_fd+0x88/0x100
[<c1889fac>] ? _raw_spin_unlock+0x2c/0x50
[<c118a2f8>] ? __alloc_fd+0x88/0x100
[<c116d887>] do_sys_open+0x117/0x210
[<c188aeef>] ? restore_all+0xf/0xf
[<c13d09ff>] ? __this_cpu_preempt_check+0xf/0x20
[<c1080000>] ? dequeue_rt_stack+0x1a0/0x2e0
[<c116d9a2>] SyS_open+0x22/0x30
[<c188aeb6>] syscall_call+0x7/0x7
[<c1880000>] ? hpet_reserve_platform_timers+0x6e/0x111
---[ end trace 81f9756f84a67848 ]---
>
> Also, please consider submitting a patch to netdev to document the lock
> requirement with the struct sk_buff_head definition.
>
> Regards,
> Peter Hurley
>
> >
> > __skb_queue_tail(queue, skb);
> >
> > @@ -4690,7 +4691,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
> > __skb_queue_tail(queue, skb);
> > } while (list);
> >
> > - spin_unlock(&queue->lock);
> > + spin_unlock_irqrestore(&queue->lock, irq_flags);
> > }
> > }
> >
> >
>
Cheers,
Jukka
^ permalink raw reply
* Re: [PATCH] Bluetooth: Incorrect locking when sending data in softirq
From: Alexander Aring @ 2014-10-15 13:36 UTC (permalink / raw)
To: Jukka Rissanen; +Cc: linux-bluetooth
In-Reply-To: <1413376985-25812-1-git-send-email-jukka.rissanen@linux.intel.com>
Hi Jukka,
I am not sure but I think this issue occurs because the bt_xmit callback
is called in an atomic context.
The function hci_queue_acl seems to be some function which is used in
some others context which isn't an atomic context, means maybe in
some workqueue context or something else, where "might_sleep()" is
allowed. Simple this function isn't irqsafe.
With this patch you would make it allowed that this function can called
inside of an "atomic context", so you make it irqsafe.
By changing these locking mechanism to spin_lock_irqsave/spin_unlock_irqrestore
you need to be sure that all others which locks the queue->lock should
also call spin_lock_irqsave/spin_unlock_irqrestore and not
spin_lock/spin_unlock anymore.
This would be a huge design change in bluetooth, maybe the bluetooth
maintainers will ack this, I don't know. Maybe there exist also some
other calling path where "might_sleep()" is allowed and you have the
issue again.
Another "possible" solution would be a similar function but this is irqsafe.
Maybe "hci_queue_acl_irqsafe". I don't know how possible that is, simple
that not every context call the spin_foo_irqave functions. If the lock
is used somewhere else... this would be hard to solve to change
spin__foo/spin_foo_irqsave.
A second "possible" easy solution would maybe that bt_xmit setups a
workqueue, at the end of the xmit call you should schedule the workqueue
then. But this is a terrible solution, because you lost all context
information from bt_xmit calls (atomic context, lockings, etc...), also
that "might_sleep()" is allowed while transmit isn't nice.
We have the same issue in 802.15.4 because some driver calls spi_sync(),
then we start a workqueue for it and run the work callback afterwards
which calls spi_sync at least.
spi_sync is just a framework above spi_async with some fancy scheduler
function like wait_for_completion. We can't run spi_sync in the xmit
function because this call wait_for_completion ("might_sleep()") and
this isn't allowed in atomic context.
I don't can't say what you need to do here. I only want to let you know
my suggestions to this patch.
- Alex
^ permalink raw reply
* [PBAP 1/2] obexd/client/pbap: Add support for spd,fav in PBAP
From: Gowtham Anandha Babu @ 2014-10-15 13:39 UTC (permalink / raw)
To: linux-bluetooth
Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu
Add support for the speed-dial and favorite entries in PBAP.
---
doc/obex-api.txt | 2 ++
obexd/client/pbap.c | 10 +++++++---
obexd/plugins/phonebook.h | 4 ++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index f80ef39..4439a41 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
@@ -341,6 +341,8 @@ Methods void Select(string location, string phonebook)
"och": outgoing call history
"mch": missing call history
"cch": combination of ich och mch
+ "spd": speed dials entry ( only for "internal" )
+ "fav": favorites entry ( only for "internal" )
Possible errors: org.bluez.obex.Error.InvalidArguments
org.bluez.obex.Error.Failed
diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 2089860..614616c 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -183,11 +183,13 @@ static const GMarkupParser listing_parser = {
static char *build_phonebook_path(const char *location, const char *item)
{
char *path = NULL, *tmp, *tmp1;
+ int int_telecom = 0;
if (!g_ascii_strcasecmp(location, "int") ||
- !g_ascii_strcasecmp(location, "internal"))
+ !g_ascii_strcasecmp(location, "internal")) {
path = g_strdup("/telecom");
- else if (!g_ascii_strncasecmp(location, "sim", 3)) {
+ int_telecom = 1;
+ } else if (!g_ascii_strncasecmp(location, "sim", 3)) {
if (strlen(location) == 3)
tmp = g_strdup("sim1");
else
@@ -202,7 +204,9 @@ static char *build_phonebook_path(const char *location, const char *item)
!g_ascii_strcasecmp(item, "ich") ||
!g_ascii_strcasecmp(item, "och") ||
!g_ascii_strcasecmp(item, "mch") ||
- !g_ascii_strcasecmp(item, "cch")) {
+ !g_ascii_strcasecmp(item, "cch") ||
+ (int_telecom && !g_ascii_strcasecmp(item, "spd")) ||
+ (int_telecom && !g_ascii_strcasecmp(item, "fav"))) {
tmp = path;
tmp1 = g_ascii_strdown(item, -1);
path = g_build_filename(tmp, tmp1, NULL);
diff --git a/obexd/plugins/phonebook.h b/obexd/plugins/phonebook.h
index fff33c1..70a9cb7 100644
--- a/obexd/plugins/phonebook.h
+++ b/obexd/plugins/phonebook.h
@@ -37,6 +37,8 @@
#define PB_CALLS_INCOMING_FOLDER "/telecom/ich"
#define PB_CALLS_MISSED_FOLDER "/telecom/mch"
#define PB_CALLS_OUTGOING_FOLDER "/telecom/och"
+#define PB_CALLS_SPEEDDIAL_FOLDER "/telecom/spd"
+#define PB_CALLS_FAVORITE_FOLDER "/telecom/fav"
#define PB_LUID_FOLDER "/telecom/pb/luid"
#define PB_CONTACTS "/telecom/pb.vcf"
@@ -44,6 +46,8 @@
#define PB_CALLS_INCOMING "/telecom/ich.vcf"
#define PB_CALLS_MISSED "/telecom/mch.vcf"
#define PB_CALLS_OUTGOING "/telecom/och.vcf"
+#define PB_CALLS_SPEEDDIAL "/telecom/spd.vcf"
+#define PB_CALLS_FAVORITE "/telecom/fav.vcf"
#define PB_DEVINFO "/telecom/devinfo.txt"
#define PB_INFO_LOG "/telecom/pb/info.log"
#define PB_CC_LOG "/telecom/pb/luid/cc.log"
--
1.9.1
^ permalink raw reply related
* [PBAP 2/2] obexd/client/pbap: Adds few attributes to property mask
From: Gowtham Anandha Babu @ 2014-10-15 13:39 UTC (permalink / raw)
To: linux-bluetooth
Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu
In-Reply-To: <1413380382-3302-1-git-send-email-gowtham.ab@samsung.com>
Adds the below attributes for property mask:
1) Speed-dial
2) Uniform Caller Identifier
3) Unique Identifier
---
obexd/client/pbap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 614616c..fe0602e 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -103,6 +103,9 @@ static const char *filter_list[] = {
"CLASS",
"SORT-STRING",
"X-IRMC-CALL-DATETIME",
+ "X-BT-SPEEDDIALKEY",
+ "X-BT-UCI",
+ "X-BT-UID",
NULL
};
--
1.9.1
^ permalink raw reply related
* [PATCH] monitor: Fix indentation for AVRCP PASS THROUGH commands
From: Vikrampal Yadav @ 2014-10-15 13:41 UTC (permalink / raw)
To: linux-bluetooth; +Cc: luiz.dentz, d.kasatkin, vikram.pal, cpgs
Intendation for AVRCP PASS THROUGH commands' decoding fixed.
btmon snippets:
Channel: 66 len 14 [PSM 23 mode 0] {chan 3}
AVCTP Control: Command: type 0x00 label 0 PID 0x110e
AV/C: Status: address 0x48 opcode 0x7c
Subunit: Panel
Opcode: Passthrough
Operation: 0x44 (PLAY Pressed)
Lenght: 0x00
---
monitor/avctp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/monitor/avctp.c b/monitor/avctp.c
index a4e34c5..4abd18f 100644
--- a/monitor/avctp.c
+++ b/monitor/avctp.c
@@ -686,13 +686,13 @@ static bool avrcp_passthrough_packet(struct avctp_frame *avctp_frame,
if (!l2cap_frame_get_u8(frame, &op))
return false;
- print_field("%*cOperation: 0x%02x (%s %s)", (indent - 2), ' ', op,
+ print_field("%*cOperation: 0x%02x (%s %s)", (indent - 8), ' ', op,
op2str(op), op & 0x80 ? "Released" : "Pressed");
if (!l2cap_frame_get_u8(frame, &len))
return false;
- print_field("%*cLength: 0x%02x", (indent - 2), ' ', len);
+ print_field("%*cLength: 0x%02x", (indent - 8), ' ', len);
packet_hexdump(frame->data, frame->size);
return true;
--
1.9.1
^ permalink raw reply related
* Re: [PATCH v6] Bluetooth: Defer connection-parameter removal when unpairing
From: Johan Hedberg @ 2014-10-15 13:44 UTC (permalink / raw)
To: Alfonso Acosta; +Cc: linux-bluetooth
In-Reply-To: <1413063887-25870-1-git-send-email-fons@spotify.com>
Hi Alfonso,
On Sat, Oct 11, 2014, Alfonso Acosta wrote:
> Systematically removing the LE connection parameters and autoconnect
> action is inconvenient for rebonding without disconnecting from
> userland (i.e. unpairing followed by repairing without
> disconnecting). The parameters will be lost after unparing and
> userland needs to take care of book-keeping them and re-adding them.
>
> This patch allows userland to forget about parameter management when
> rebonding without disconnecting. It defers clearing the connection
> parameters when unparing without disconnecting, giving a chance of
> keeping the parameters if a repairing happens before the connection is
> closed.
>
> Signed-off-by: Alfonso Acosta <fons@spotify.com>
This patch has now been applied to the bluetooth-next tree. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] monitor: Fix indentation for AVRCP PASS THROUGH commands
From: Luiz Augusto von Dentz @ 2014-10-15 13:45 UTC (permalink / raw)
To: Vikrampal Yadav; +Cc: linux-bluetooth@vger.kernel.org, Dmitry Kasatkin, cpgs
In-Reply-To: <1413380509-596-1-git-send-email-vikram.pal@samsung.com>
Hi Vikram,
On Wed, Oct 15, 2014 at 4:41 PM, Vikrampal Yadav <vikram.pal@samsung.com> wrote:
> Intendation for AVRCP PASS THROUGH commands' decoding fixed.
>
> btmon snippets:
>
> Channel: 66 len 14 [PSM 23 mode 0] {chan 3}
> AVCTP Control: Command: type 0x00 label 0 PID 0x110e
> AV/C: Status: address 0x48 opcode 0x7c
> Subunit: Panel
> Opcode: Passthrough
> Operation: 0x44 (PLAY Pressed)
> Lenght: 0x00
> ---
> monitor/avctp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/monitor/avctp.c b/monitor/avctp.c
> index a4e34c5..4abd18f 100644
> --- a/monitor/avctp.c
> +++ b/monitor/avctp.c
> @@ -686,13 +686,13 @@ static bool avrcp_passthrough_packet(struct avctp_frame *avctp_frame,
> if (!l2cap_frame_get_u8(frame, &op))
> return false;
>
> - print_field("%*cOperation: 0x%02x (%s %s)", (indent - 2), ' ', op,
> + print_field("%*cOperation: 0x%02x (%s %s)", (indent - 8), ' ', op,
> op2str(op), op & 0x80 ? "Released" : "Pressed");
>
> if (!l2cap_frame_get_u8(frame, &len))
> return false;
>
> - print_field("%*cLength: 0x%02x", (indent - 2), ' ', len);
> + print_field("%*cLength: 0x%02x", (indent - 8), ' ', len);
>
> packet_hexdump(frame->data, frame->size);
> return true;
> --
> 1.9.1
>
Applied, please make sure the patch format is 50/72 according to the
HACKING document.
--
Luiz Augusto von Dentz
^ permalink raw reply
* Re: btusb_intr_complete returns -EPIPE
From: Naveen Kumar Parna @ 2014-10-15 13:46 UTC (permalink / raw)
To: Oliver Neukum
Cc: Alan Stern, linux-bluetooth@vger.kernel.org, linux-usb, acho
In-Reply-To: <CAG0bkvJ8QrvdhCQjwOm79KMZWbE7S=keOfdTy7hyUCV-RmLegQ@mail.gmail.com>
Hi Oliver,
I tried this test in two different set of hardware configurations.
i) I tried in multiple test systems which has
EHCI-USB host controller on PCI card and internal USB 2.0
hub("rate-matching" hub). All the test systems with this configuration
gives spurious stall packets.
[lowerlayers@banunxcas29 ~]$ lspci | grep -i usb
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset
USB2 Enhanced Host Controller (rev 05)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset
USB2 Enhanced Host Controller (rev 05)
lsusb:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ii) I found different test systems which has
OHCI-USB host controller on PCI card and internal USB 1.1 hub. All the
test systems with this configuration are not producing stall packets.
[lowerlayers@camunxcas11 ~]$ lspci | grep -i usb
00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
lsusb:
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0451:2077 Texas Instruments, Inc. TUSB2077 Hub
My device is a full-speed device. So , stall packets are due to buggy
USB 2.0 hub?
Is there a chance of getting stall packets “If the device runs at low
speed or full speed and is connected through a USB-2.0 hub”? If so it
looks like hub driver issue right?
If the hub is the problem… what will be the better solution? Is it
possible to change internal hub?
Thanks,
Naveen
On Wed, Oct 15, 2014 at 6:39 PM, Naveen Kumar Parna
<pnaveenkos@gmail.com> wrote:
> EHCI controller on PCI card and hub("rate-matching" hub) also internal.
>
> Is it possible to change the internal hub?
>
>
>
> Thanks,
> Naveen
>
> On Wed, Oct 15, 2014 at 3:41 PM, Oliver Neukum <oneukum@suse.de> wrote:
>> On Thu, 2014-10-09 at 10:31 -0400, Alan Stern wrote:
>>> On Thu, 9 Oct 2014, Naveen Kumar Parna wrote:
>>>
>>> > Hi Oliver & Alan,
>>> >
>>> >
>>> >
>>> > Thanks for your inputs.
>>> >
>>> >
>>> >
>>> > I enabled the dynamic debugging for USB HC driver. Please correct me
>>> > if I am wrong.
>>>
>>> Debugging the kernel (or doing anything else to the kernel, for that
>>> matter) won't solve the problem if it is caused by a buggy hub.
>>
>> Indeed. Could you just try a different hub?
>>
>> Regards
>> Oliver
>>
>>
>>
^ permalink raw reply
* Re: [PATCH v3 1/2] Bluetooth: Fix RFCOMM NSC response
From: Johan Hedberg @ 2014-10-15 13:56 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <1413193434-16779-1-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Mon, Oct 13, 2014, Szymon Janc wrote:
> rfcomm_send_nsc expects CR to be either 0 or 1 since it is later
> passed to __mcc_type macro and shitfed. Unfortunatelly CR extracted
> from received frame type was not sanitized and shifted value was passed
> resulting in bogus response.
>
> Note: shifted value was also passed to other functions but was used
> only in if satements so this bug appears only for NSC case.
>
> The CR bit in the value octet shall be set to the same value
> as the CR bit in the type field octet of the not supported command
> frame but the CR bit for NCS response should be set to 0 since it is
> always a response.
>
> This was affecting TC_RFC_BV_25_C PTS qualification test.
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
>
> V3: fixed invalid CR
> V2: moved sanitization to macro ifself
> added second patch that also fix __test_pf
>
> net/bluetooth/rfcomm/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Both of these patches have been applied to bluetooth-next. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] android/pts: Update MAP PTS tests
From: Szymon Janc @ 2014-10-15 13:57 UTC (permalink / raw)
To: Sebastian Chlad; +Cc: linux-bluetooth
In-Reply-To: <1413378293-18074-1-git-send-email-sebastian.chlad@tieto.com>
Hi Sebastian,
On Wednesday 15 of October 2014 15:04:53 Sebastian Chlad wrote:
> Checked and tested against PTS 5.3
> ---
> android/pics-map.txt | 2 +-
> android/pixit-map.txt | 2 +-
> android/pts-map.txt | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/android/pics-map.txt b/android/pics-map.txt
> index 461c6ce..3f783a9 100644
> --- a/android/pics-map.txt
> +++ b/android/pics-map.txt
> @@ -1,6 +1,6 @@
> MAP PICS for the PTS tool.
>
> -PTS version: 5.2
> +PTS version: 5.3
>
> * - different than PTS defaults
> # - not yet implemented/supported
> diff --git a/android/pixit-map.txt b/android/pixit-map.txt
> index 45a374a..c8c130c 100644
> --- a/android/pixit-map.txt
> +++ b/android/pixit-map.txt
> @@ -1,6 +1,6 @@
> MAP PIXIT for the PTS tool.
>
> -PTS version: 5.2
> +PTS version: 5.3
>
> * - different than PTS defaults
> & - should be set to IUT Bluetooth address
> diff --git a/android/pts-map.txt b/android/pts-map.txt
> index 5f5a4f3..57cb317 100644
> --- a/android/pts-map.txt
> +++ b/android/pts-map.txt
> @@ -1,7 +1,7 @@
> PTS test results for MAP
>
> -PTS version: 5.2
> -Tested: 16-July-2014
> +PTS version: 5.3
> +Tested: 15-October-2014
> Android version: 4.4.4
>
> Results:
Applied. Thanks.
--
BR
Szymon Janc
^ permalink raw reply
* [PATCH 1/4] tools/csr_usb : Fix Resource leak: file
From: Gowtham Anandha Babu @ 2014-10-15 14:08 UTC (permalink / raw)
To: linux-bluetooth
Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu
Handles resource leak.
---
tools/csr_usb.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/csr_usb.c b/tools/csr_usb.c
index 5fb6bdc..a1d7324 100644
--- a/tools/csr_usb.c
+++ b/tools/csr_usb.c
@@ -80,9 +80,12 @@ static int read_value(const char *name, const char *attr, const char *format)
return -1;
n = fscanf(file, format, &value);
- if (n != 1)
+ if (n != 1) {
+ fclose(file);
return -1;
+ }
+ fclose(file);
return value;
}
--
1.9.1
^ permalink raw reply related
* [PATCH 2/4] tools/hciattach : Fix syntax error
From: Gowtham Anandha Babu @ 2014-10-15 14:08 UTC (permalink / raw)
To: linux-bluetooth
Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu
In-Reply-To: <1413382102-4049-1-git-send-email-gowtham.ab@samsung.com>
This error may not be shown during normal compilation,
because of ifdef.
---
tools/hciattach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index d8ef7e7..2ace6f5 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -128,7 +128,7 @@ int uart_speed(int s)
return B3500000;
#endif
#ifdef B3710000
- case 3710000
+ case 3710000:
return B3710000;
#endif
#ifdef B4000000
--
1.9.1
^ permalink raw reply related
* [PATCH 3/4] obexd/src/main: Fix coding style and improves readability
From: Gowtham Anandha Babu @ 2014-10-15 14:08 UTC (permalink / raw)
To: linux-bluetooth
Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu
In-Reply-To: <1413382102-4049-1-git-send-email-gowtham.ab@samsung.com>
---
obexd/src/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/obexd/src/main.c b/obexd/src/main.c
index 80645f8..0040c1e 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
@@ -199,7 +199,8 @@ const char *obex_option_capability(void)
return option_capability;
}
-static gboolean is_dir(const char *dir) {
+static gboolean is_dir(const char *dir)
+{
struct stat st;
if (stat(dir, &st) < 0) {
@@ -290,8 +291,9 @@ int main(int argc, char *argv[])
}
if (option_root[0] != '/') {
- char *old_root = option_root, *home = getenv("HOME");
+ const char *home = getenv("HOME");
if (home) {
+ char *old_root = option_root;
option_root = g_strdup_printf("%s/%s", home, old_root);
g_free(old_root);
}
--
1.9.1
^ permalink raw reply related
* [PATCH 4/4] Fix enum coding-style
From: Gowtham Anandha Babu @ 2014-10-15 14:08 UTC (permalink / raw)
To: linux-bluetooth
Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu
In-Reply-To: <1413382102-4049-1-git-send-email-gowtham.ab@samsung.com>
Fix the enum coding-style as per the new coding style doc.
---
lib/uuid.h | 8 ++++----
profiles/cups/cups.h | 16 ++++++++--------
profiles/health/hdp_types.h | 4 ++--
profiles/proximity/reporter.h | 6 +++---
profiles/time/server.c | 20 ++++++++++----------
5 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/lib/uuid.h b/lib/uuid.h
index 8303772..f05888a 100644
--- a/lib/uuid.h
+++ b/lib/uuid.h
@@ -142,10 +142,10 @@ extern "C" {
typedef struct {
enum {
- BT_UUID_UNSPEC = 0,
- BT_UUID16 = 16,
- BT_UUID32 = 32,
- BT_UUID128 = 128,
+ BT_UUID_UNSPEC = 0,
+ BT_UUID16 = 16,
+ BT_UUID32 = 32,
+ BT_UUID128 = 128,
} type;
union {
uint16_t u16;
diff --git a/profiles/cups/cups.h b/profiles/cups/cups.h
index f4e0c01..dbea1bf 100644
--- a/profiles/cups/cups.h
+++ b/profiles/cups/cups.h
@@ -21,14 +21,14 @@
*
*/
-enum { /**** Backend exit codes ****/
- CUPS_BACKEND_OK = 0, /* Job completed successfully */
- CUPS_BACKEND_FAILED = 1, /* Job failed, use error-policy */
- CUPS_BACKEND_AUTH_REQUIRED = 2, /* Job failed, authentication required */
- CUPS_BACKEND_HOLD = 3, /* Job failed, hold job */
- CUPS_BACKEND_STOP = 4, /* Job failed, stop queue */
- CUPS_BACKEND_CANCEL = 5, /* Job failed, cancel job */
- CUPS_BACKEND_RETRY = 6, /* Failure requires us to retry (BlueZ specific) */
+enum { /**** Backend exit codes ****/
+ CUPS_BACKEND_OK = 0, /* Job completed successfully */
+ CUPS_BACKEND_FAILED = 1, /* Job failed, use error-policy */
+ CUPS_BACKEND_AUTH_REQUIRED = 2, /* Job failed, authentication required */
+ CUPS_BACKEND_HOLD = 3, /* Job failed, hold job */
+ CUPS_BACKEND_STOP = 4, /* Job failed, stop queue */
+ CUPS_BACKEND_CANCEL = 5, /* Job failed, cancel job */
+ CUPS_BACKEND_RETRY = 6, /* Failure requires us to retry (BlueZ specific) */
};
int sdp_search_spp(sdp_session_t *sdp, uint8_t *channel);
diff --git a/profiles/health/hdp_types.h b/profiles/health/hdp_types.h
index b34b5e0..92f461a 100644
--- a/profiles/health/hdp_types.h
+++ b/profiles/health/hdp_types.h
@@ -49,8 +49,8 @@
#define HDP_SOURCE_ROLE_AS_STRING "source"
typedef enum {
- HDP_SOURCE = 0x00,
- HDP_SINK = 0x01
+ HDP_SOURCE = 0x00,
+ HDP_SINK = 0x01
} HdpRole;
typedef enum {
diff --git a/profiles/proximity/reporter.h b/profiles/proximity/reporter.h
index a8e1aac..243db26 100644
--- a/profiles/proximity/reporter.h
+++ b/profiles/proximity/reporter.h
@@ -31,9 +31,9 @@
#define POWER_LEVEL_CHR_UUID 0x2A07
enum {
- NO_ALERT = 0x00,
- MILD_ALERT = 0x01,
- HIGH_ALERT = 0x02,
+ NO_ALERT = 0x00,
+ MILD_ALERT = 0x01,
+ HIGH_ALERT = 0x02,
};
void reporter_device_remove(struct btd_service *service);
diff --git a/profiles/time/server.c b/profiles/time/server.c
index 1716a5e..0b6f70b 100644
--- a/profiles/time/server.c
+++ b/profiles/time/server.c
@@ -55,22 +55,22 @@
#define CT_TIME_CHR_UUID 0x2A2B
enum {
- UPDATE_RESULT_SUCCESSFUL = 0,
- UPDATE_RESULT_CANCELED = 1,
- UPDATE_RESULT_NO_CONN = 2,
- UPDATE_RESULT_ERROR = 3,
- UPDATE_RESULT_TIMEOUT = 4,
- UPDATE_RESULT_NOT_ATTEMPTED = 5,
+ UPDATE_RESULT_SUCCESSFUL = 0,
+ UPDATE_RESULT_CANCELED = 1,
+ UPDATE_RESULT_NO_CONN = 2,
+ UPDATE_RESULT_ERROR = 3,
+ UPDATE_RESULT_TIMEOUT = 4,
+ UPDATE_RESULT_NOT_ATTEMPTED = 5,
};
enum {
- UPDATE_STATE_IDLE = 0,
- UPDATE_STATE_PENDING = 1,
+ UPDATE_STATE_IDLE = 0,
+ UPDATE_STATE_PENDING = 1,
};
enum {
- GET_REFERENCE_UPDATE = 1,
- CANCEL_REFERENCE_UPDATE = 2,
+ GET_REFERENCE_UPDATE = 1,
+ CANCEL_REFERENCE_UPDATE = 2,
};
static int encode_current_time(uint8_t value[10])
--
1.9.1
^ permalink raw reply related
* RE: [PATCH] monitor: Fix indentation for AVRCP PASS THROUGH commands
From: Vikrampal @ 2014-10-15 14:09 UTC (permalink / raw)
To: 'Luiz Augusto von Dentz'
Cc: linux-bluetooth, 'Dmitry Kasatkin', cpgs
In-Reply-To: <CABBYNZKo33dabCdRkp0EkDULu4-K4aGAzkm7cxRC4+-OBkEf7w@mail.gmail.com>
Sure Luiz, Thanks!
> -----Original Message-----
> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
> Sent: Wednesday, October 15, 2014 7:16 PM
> To: Vikrampal Yadav
> Cc: linux-bluetooth@vger.kernel.org; Dmitry Kasatkin; cpgs@samsung.com
> Subject: Re: [PATCH] monitor: Fix indentation for AVRCP PASS THROUGH
> commands
>
> Hi Vikram,
>
> On Wed, Oct 15, 2014 at 4:41 PM, Vikrampal Yadav
> <vikram.pal@samsung.com> wrote:
> > Intendation for AVRCP PASS THROUGH commands' decoding fixed.
> >
> > btmon snippets:
> >
> > Channel: 66 len 14 [PSM 23 mode 0] {chan 3}
> > AVCTP Control: Command: type 0x00 label 0 PID 0x110e
> > AV/C: Status: address 0x48 opcode 0x7c
> > Subunit: Panel
> > Opcode: Passthrough
> > Operation: 0x44 (PLAY Pressed)
> > Lenght: 0x00
> > ---
> > monitor/avctp.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/monitor/avctp.c b/monitor/avctp.c index a4e34c5..4abd18f
> > 100644
> > --- a/monitor/avctp.c
> > +++ b/monitor/avctp.c
> > @@ -686,13 +686,13 @@ static bool avrcp_passthrough_packet(struct
> avctp_frame *avctp_frame,
> > if (!l2cap_frame_get_u8(frame, &op))
> > return false;
> >
> > - print_field("%*cOperation: 0x%02x (%s %s)", (indent - 2), ' ', op,
> > + print_field("%*cOperation: 0x%02x (%s %s)", (indent - 8), ' ',
> > + op,
> > op2str(op), op & 0x80 ? "Released" :
> > "Pressed");
> >
> > if (!l2cap_frame_get_u8(frame, &len))
> > return false;
> >
> > - print_field("%*cLength: 0x%02x", (indent - 2), ' ', len);
> > + print_field("%*cLength: 0x%02x", (indent - 8), ' ', len);
> >
> > packet_hexdump(frame->data, frame->size);
> > return true;
> > --
> > 1.9.1
> >
>
> Applied, please make sure the patch format is 50/72 according to the
> HACKING document.
>
> --
> Luiz Augusto von Dentz
Regards,
Vikram
^ permalink raw reply
* Re: [PATCH v2 3/5] android/map-client: Add support for get remote MAS instances
From: Szymon Janc @ 2014-10-15 14:16 UTC (permalink / raw)
To: Grzegorz Kolodziejczyk; +Cc: linux-bluetooth
In-Reply-To: <1413285875-17814-4-git-send-email-grzegorz.kolodziejczyk@tieto.com>
Hi Grzegorz,
On Tuesday 14 of October 2014 13:24:33 Grzegorz Kolodziejczyk wrote:
> This allows to get remote mas instances. In case of wrong sdp record
> fail status will be returned in notification.
> ---
> android/map-client.c | 130
> ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129
> insertions(+), 1 deletion(-)
>
> diff --git a/android/map-client.c b/android/map-client.c
> index 142c680..2069fbe 100644
> --- a/android/map-client.c
> +++ b/android/map-client.c
> @@ -30,21 +30,149 @@
> #include <stdint.h>
> #include <glib.h>
>
> +#include "lib/sdp.h"
> +#include "lib/sdp_lib.h"
> +#include "src/sdp-client.h"
> +
> #include "ipc.h"
> #include "lib/bluetooth.h"
> #include "map-client.h"
> #include "src/log.h"
> #include "hal-msg.h"
> +#include "ipc-common.h"
> +#include "utils.h"
> +#include "src/shared/util.h"
>
> static struct ipc *hal_ipc = NULL;
> static bdaddr_t adapter_addr;
>
> +static int fill_mce_inst(void *buf, int32_t id, int32_t scn, int32_t
> msg_type, + const void *name, uint8_t name_len)
> +{
> + struct hal_map_client_mas_instance *inst = buf;
> +
> + inst->id = id;
> + inst->scn = scn;
> + inst->msg_types = msg_type;
> + inst->name_len = name_len;
> +
> + if (name_len)
> + memcpy(inst->name, name, name_len);
> +
> + return sizeof(*inst) + name_len;
> +}
> +
> +static void map_client_sdp_search_cb(sdp_list_t *recs, int err, gpointer
> data) +{
> + uint8_t buf[IPC_MTU];
> + struct hal_ev_map_client_remote_mas_instances *ev = (void *) buf;
> + bdaddr_t *dst = data;
> + sdp_list_t *list, *protos;
> + uint8_t status;
> + int32_t id, scn, msg_type, name_len, num_instances = 0;
> + char *name;
> + size_t size;
> +
> + size = sizeof(*ev);
> + bdaddr2android(dst, &ev->bdaddr);
> +
> + if (err < 0) {
> + error("mce: Unable to get SDP record: %s", strerror(-err));
> + status = HAL_STATUS_FAILED;
> + goto fail;
> + }
> +
> + for (list = recs; list != NULL; list = list->next) {
> + sdp_record_t *rec = list->data;
> + sdp_data_t *data;
> +
> + data = sdp_data_get(rec, SDP_ATTR_MAS_INSTANCE_ID);
> + if (!data) {
> + error("mce: cannot get mas instance id");
> + continue;
> + }
> +
> + id = data->val.uint8;
> +
> + data = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY);
> + if (!data) {
> + error("mce: cannot get mas instance name");
> + continue;
> + }
> +
> + name = data->val.str;
> + name_len = data->unitSize;
> +
> + data = sdp_data_get(rec, SDP_ATTR_SUPPORTED_MESSAGE_TYPES);
> + if (!data) {
> + error("mce: cannot get mas instance msg type");
> + continue;
> + }
> +
> + msg_type = data->val.uint8;
> +
> + if (sdp_get_access_protos(rec, &protos)) {
Please do check this check as '< 0'.
> + error("mce: cannot get mas instance sdp protocol list");
> + continue;
> + }
> +
> + scn = sdp_get_proto_port(protos, RFCOMM_UUID);
> + if (scn) {
Shouldn't this be if (!scn) ...?
> + error("mce: cannot get mas instance rfcomm channel");
> + continue;
This will leak protos. I'd just free those before checking scn.
> + }
> +
> + sdp_list_foreach(protos, (sdp_list_func_t) sdp_list_free, NULL);
> + sdp_list_free(protos, NULL);
> +
> + size += fill_mce_inst(buf + size, id, scn, msg_type, name,
> + name_len);
> + num_instances++;
> + }
> +
> + status = HAL_STATUS_SUCCESS;
> +
> +fail:
> + ev->num_instances = num_instances;
> + ev->status = status;
> +
> + ipc_send_notif(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT,
> + HAL_EV_MAP_CLIENT_REMOTE_MAS_INSTANCES, size, buf);
> +
> + free(dst);
> +}
> +
> static void handle_get_instances(const void *buf, uint16_t len)
> {
> + const struct hal_cmd_map_client_get_instances *cmd = buf;
> + uint8_t status;
> + bdaddr_t *dst;
> + uuid_t uuid;
> +
> DBG("");
>
> + dst = new0(bdaddr_t, 1);
> + if (!dst) {
> + error("mce: Fail to allocate cb data");
> + status = HAL_STATUS_FAILED;
> + goto failed;
> + }
> +
> + android2bdaddr(&cmd->bdaddr, dst);
> + sdp_uuid16_create(&uuid, MAP_MSE_SVCLASS_ID);
> +
> + if (bt_search_service(&adapter_addr, dst, &uuid,
> + map_client_sdp_search_cb, dst, free, 0)) {
> + error("mce: Failed to search SDP details");
> + status = HAL_STATUS_FAILED;
> + goto failed;
> + }
> +
> + status = HAL_STATUS_SUCCESS;
> +
> +failed:
> ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT,
> - HAL_OP_MAP_CLIENT_GET_INSTANCES, HAL_STATUS_FAILED);
> + HAL_OP_MAP_CLIENT_GET_INSTANCES, status);
> }
>
> static const struct ipc_handler cmd_handlers[] = {
--
BR
Szymon Janc
^ permalink raw reply
* Re: [PATCH v2 3/5] android/map-client: Add support for get remote MAS instances
From: Grzegorz Kolodziejczyk @ 2014-10-15 14:22 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <1805728.GvLyPSIC0s@leonov>
Hi Szymon,
On 15 October 2014 16:16, Szymon Janc <szymon.janc@tieto.com> wrote:
> Hi Grzegorz,
>
> On Tuesday 14 of October 2014 13:24:33 Grzegorz Kolodziejczyk wrote:
>> This allows to get remote mas instances. In case of wrong sdp record
>> fail status will be returned in notification.
>> ---
>> android/map-client.c | 130
>> ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129
>> insertions(+), 1 deletion(-)
>>
>> diff --git a/android/map-client.c b/android/map-client.c
>> index 142c680..2069fbe 100644
>> --- a/android/map-client.c
>> +++ b/android/map-client.c
>> @@ -30,21 +30,149 @@
>> #include <stdint.h>
>> #include <glib.h>
>>
>> +#include "lib/sdp.h"
>> +#include "lib/sdp_lib.h"
>> +#include "src/sdp-client.h"
>> +
>> #include "ipc.h"
>> #include "lib/bluetooth.h"
>> #include "map-client.h"
>> #include "src/log.h"
>> #include "hal-msg.h"
>> +#include "ipc-common.h"
>> +#include "utils.h"
>> +#include "src/shared/util.h"
>>
>> static struct ipc *hal_ipc = NULL;
>> static bdaddr_t adapter_addr;
>>
>> +static int fill_mce_inst(void *buf, int32_t id, int32_t scn, int32_t
>> msg_type, + const void *name, uint8_t name_len)
>> +{
>> + struct hal_map_client_mas_instance *inst = buf;
>> +
>> + inst->id = id;
>> + inst->scn = scn;
>> + inst->msg_types = msg_type;
>> + inst->name_len = name_len;
>> +
>> + if (name_len)
>> + memcpy(inst->name, name, name_len);
>> +
>> + return sizeof(*inst) + name_len;
>> +}
>> +
>> +static void map_client_sdp_search_cb(sdp_list_t *recs, int err, gpointer
>> data) +{
>> + uint8_t buf[IPC_MTU];
>> + struct hal_ev_map_client_remote_mas_instances *ev = (void *) buf;
>> + bdaddr_t *dst = data;
>> + sdp_list_t *list, *protos;
>> + uint8_t status;
>> + int32_t id, scn, msg_type, name_len, num_instances = 0;
>> + char *name;
>> + size_t size;
>> +
>> + size = sizeof(*ev);
>> + bdaddr2android(dst, &ev->bdaddr);
>> +
>> + if (err < 0) {
>> + error("mce: Unable to get SDP record: %s", strerror(-err));
>> + status = HAL_STATUS_FAILED;
>> + goto fail;
>> + }
>> +
>> + for (list = recs; list != NULL; list = list->next) {
>> + sdp_record_t *rec = list->data;
>> + sdp_data_t *data;
>> +
>> + data = sdp_data_get(rec, SDP_ATTR_MAS_INSTANCE_ID);
>> + if (!data) {
>> + error("mce: cannot get mas instance id");
>> + continue;
>> + }
>> +
>> + id = data->val.uint8;
>> +
>> + data = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY);
>> + if (!data) {
>> + error("mce: cannot get mas instance name");
>> + continue;
>> + }
>> +
>> + name = data->val.str;
>> + name_len = data->unitSize;
>> +
>> + data = sdp_data_get(rec, SDP_ATTR_SUPPORTED_MESSAGE_TYPES);
>> + if (!data) {
>> + error("mce: cannot get mas instance msg type");
>> + continue;
>> + }
>> +
>> + msg_type = data->val.uint8;
>> +
>> + if (sdp_get_access_protos(rec, &protos)) {
>
> Please do check this check as '< 0'.
>
>> + error("mce: cannot get mas instance sdp protocol list");
>> + continue;
>> + }
>> +
>> + scn = sdp_get_proto_port(protos, RFCOMM_UUID);
>> + if (scn) {
>
> Shouldn't this be if (!scn) ...?
>
>> + error("mce: cannot get mas instance rfcomm channel");
>> + continue;
>
> This will leak protos. I'd just free those before checking scn.
>
>> + }
>> +
>> + sdp_list_foreach(protos, (sdp_list_func_t) sdp_list_free, NULL);
>> + sdp_list_free(protos, NULL);
>> +
>> + size += fill_mce_inst(buf + size, id, scn, msg_type, name,
>> + name_len);
>> + num_instances++;
>> + }
>> +
>> + status = HAL_STATUS_SUCCESS;
>> +
>> +fail:
>> + ev->num_instances = num_instances;
>> + ev->status = status;
>> +
>> + ipc_send_notif(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT,
>> + HAL_EV_MAP_CLIENT_REMOTE_MAS_INSTANCES, size, buf);
>> +
>> + free(dst);
>> +}
>> +
>> static void handle_get_instances(const void *buf, uint16_t len)
>> {
>> + const struct hal_cmd_map_client_get_instances *cmd = buf;
>> + uint8_t status;
>> + bdaddr_t *dst;
>> + uuid_t uuid;
>> +
>> DBG("");
>>
>> + dst = new0(bdaddr_t, 1);
>> + if (!dst) {
>> + error("mce: Fail to allocate cb data");
>> + status = HAL_STATUS_FAILED;
>> + goto failed;
>> + }
>> +
>> + android2bdaddr(&cmd->bdaddr, dst);
>> + sdp_uuid16_create(&uuid, MAP_MSE_SVCLASS_ID);
>> +
>> + if (bt_search_service(&adapter_addr, dst, &uuid,
>> + map_client_sdp_search_cb, dst, free, 0)) {
>> + error("mce: Failed to search SDP details");
>> + status = HAL_STATUS_FAILED;
>> + goto failed;
>> + }
>> +
>> + status = HAL_STATUS_SUCCESS;
>> +
>> +failed:
>> ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT,
>> - HAL_OP_MAP_CLIENT_GET_INSTANCES, HAL_STATUS_FAILED);
>> + HAL_OP_MAP_CLIENT_GET_INSTANCES, status);
>> }
>>
>> static const struct ipc_handler cmd_handlers[] = {
>
> --
> BR
> Szymon Janc
Ok, I'll correct it.
BR,
Grzegorz
^ permalink raw reply
* [PATCH v3 0/5] android/map-client: Add MAP client daemon implementation
From: Grzegorz Kolodziejczyk @ 2014-10-15 14:27 UTC (permalink / raw)
To: linux-bluetooth
v1.
*Add MAP client daemon implementation (skeleton, body)
*Add haltest MAP client support
v2.
*Fix style issue in cmd handler
*Change if-else to if statements for map client instance create
*Check if allocation of cb data has failed
*Set free as destroy callback function for search service
*Fix status overwrite (add fail label)
v3.
*Fix protos handling, rfcomm channel check
Grzegorz Kolodziejczyk (5):
android/map-client: Add initial files
android/map-client: Add stubs for MAP client commands handlers
android/map-client: Add support for get remote MAS instances
android/ipc-tester: Add case for MAP client service opcode boundries
android/ipc-tester: Add cases for MAP client msg size
android/Android.mk | 1 +
android/Makefile.am | 1 +
android/ipc-tester.c | 18 +++++
android/main.c | 12 +++
android/map-client.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++
android/map-client.h | 26 +++++++
6 files changed, 263 insertions(+)
create mode 100644 android/map-client.c
create mode 100644 android/map-client.h
--
1.9.3
^ permalink raw reply
* [PATCH v3 1/5] android/map-client: Add initial files
From: Grzegorz Kolodziejczyk @ 2014-10-15 14:27 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1413383281-17292-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>
This adds initial daemon code for MAP client profile.
---
android/Android.mk | 1 +
android/Makefile.am | 1 +
android/main.c | 12 ++++++++++++
android/map-client.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
android/map-client.h | 26 ++++++++++++++++++++++++++
5 files changed, 84 insertions(+)
create mode 100644 android/map-client.c
create mode 100644 android/map-client.h
diff --git a/android/Android.mk b/android/Android.mk
index 2b59fb8..aefe41c 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -57,6 +57,7 @@ LOCAL_SRC_FILES := \
bluez/android/gatt.c \
bluez/android/health.c \
bluez/profiles/health/mcap.c \
+ bluez/android/map-client.c \
bluez/src/log.c \
bluez/src/shared/mgmt.c \
bluez/src/shared/util.c \
diff --git a/android/Makefile.am b/android/Makefile.am
index b013095..b3eb1c5 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -46,6 +46,7 @@ android_bluetoothd_SOURCES = android/main.c \
android/gatt.h android/gatt.c \
android/health.h android/health.c \
profiles/health/mcap.h profiles/health/mcap.c \
+ android/map-client.h android/map-client.c \
attrib/att.c attrib/att.h \
attrib/gatt.c attrib/gatt.h \
attrib/gattrib.c attrib/gattrib.h \
diff --git a/android/main.c b/android/main.c
index 703b3b6..b5f6937 100644
--- a/android/main.c
+++ b/android/main.c
@@ -62,6 +62,7 @@
#include "gatt.h"
#include "health.h"
#include "handsfree-client.h"
+#include "map-client.h"
#include "utils.h"
#define DEFAULT_VENDOR "BlueZ"
@@ -235,6 +236,14 @@ static void service_register(const void *buf, uint16_t len)
}
break;
+ case HAL_SERVICE_ID_MAP_CLIENT:
+ if (!bt_map_client_register(hal_ipc, &adapter_bdaddr,
+ m->mode)) {
+ status = HAL_STATUS_FAILED;
+ goto failed;
+ }
+
+ break;
default:
DBG("service %u not supported", m->service_id);
status = HAL_STATUS_FAILED;
@@ -288,6 +297,9 @@ static bool unregister_service(uint8_t id)
case HAL_SERVICE_ID_HANDSFREE_CLIENT:
bt_hf_client_unregister();
break;
+ case HAL_SERVICE_ID_MAP_CLIENT:
+ bt_map_client_unregister();
+ break;
default:
DBG("service %u not supported", id);
return false;
diff --git a/android/map-client.c b/android/map-client.c
new file mode 100644
index 0000000..4556461
--- /dev/null
+++ b/android/map-client.c
@@ -0,0 +1,44 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "ipc.h"
+#include "lib/bluetooth.h"
+#include "map-client.h"
+
+bool bt_map_client_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode)
+{
+ return false;
+}
+
+void bt_map_client_unregister(void)
+{
+
+}
diff --git a/android/map-client.h b/android/map-client.h
new file mode 100644
index 0000000..0e63072
--- /dev/null
+++ b/android/map-client.h
@@ -0,0 +1,26 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+bool bt_map_client_register(struct ipc *ipc, const bdaddr_t *addr,
+ uint8_t mode);
+void bt_map_client_unregister(void);
--
1.9.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox