* [PATCH] Use enum from vcard.h for phone types
From: Radoslaw Jablonski @ 2010-08-12 7:49 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Radoslaw Jablonski
Removed redundant declarations for phone types. Now using values from
phonebook_number_type declared in vcard.h.
---
plugins/phonebook-tracker.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 9cd82e7..8300fc7 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -44,8 +44,6 @@
#define TRACKER_DEFAULT_CONTACT_ME "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#default-contact-me"
#define CONTACTS_ID_COL 19
-#define PHONE_ID_HOME 0
-#define PHONE_ID_WORK 3
#define CONTACTS_QUERY_ALL \
"SELECT nco:phoneNumber(?h) nco:fullname(?c) " \
@@ -697,8 +695,8 @@ add_entry:
add_numbers:
/* Adding phone numbers to contact struct */
- add_phone_number(contact, reply[0], PHONE_ID_HOME);
- add_phone_number(contact, reply[8], PHONE_ID_WORK);
+ add_phone_number(contact, reply[0], TEL_TYPE_HOME);
+ add_phone_number(contact, reply[8], TEL_TYPE_WORK);
DBG("contact %p", contact);
--
1.7.0.4
^ permalink raw reply related
* resending patch to retry reset in case it failed
From: Oliver Neukum @ 2010-08-12 7:44 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, linux-usb
Hi Marcel,
may I ask what happened to this patch?
Do you take it, want modifications or reject it?
Regards
Oliver
=46rom af61f0663f095599003290b13ad6fadee1d4fb25 Mon Sep 17 00:00:00 2001
=46rom: Oliver Neukum <oliver@neukum.org>
Date: Tue, 6 Jul 2010 08:08:42 +0200
Subject: [PATCH] bluetooth: retry reset for devices that fail
Some devices fail to reset properly at the first attempt to reset
them under unknown circumstances. Failures can be identified by
an invalid btaddr. Retry in those cases.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
=2D--
net/bluetooth/hci_core.c | 48 ++++++++++++++++++++++++++----------------=
=2D--
1 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 2f768de..c47f73d 100644
=2D-- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -180,11 +180,17 @@ static void hci_reset_req(struct hci_dev *hdev, unsig=
ned long opt)
hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
}
=20
+static int verify_valid_bdaddr(struct hci_dev *hdev)
+{
+ return !bacmp(&hdev->bdaddr, BDADDR_ANY);
+}
+
static void hci_init_req(struct hci_dev *hdev, unsigned long opt)
{
struct sk_buff *skb;
__le16 param;
__u8 flt_type;
+ int retries =3D 4;
=20
BT_DBG("%s %ld", hdev->name, opt);
=20
@@ -202,33 +208,35 @@ static void hci_init_req(struct hci_dev *hdev, unsign=
ed long opt)
=20
/* Mandatory initialization */
=20
=2D /* Reset */
=2D if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks))
=2D hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
+ do {
+ /* Reset */
+ if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks))
+ hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL);
=20
=2D /* Read Local Supported Features */
=2D hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL);
+ /* Read Local Supported Features */
+ hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL);
=20
=2D /* Read Local Version */
=2D hci_send_cmd(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL);
+ /* Read Local Version */
+ hci_send_cmd(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL);
=20
=2D /* Read Buffer Size (ACL mtu, max pkt, etc.) */
=2D hci_send_cmd(hdev, HCI_OP_READ_BUFFER_SIZE, 0, NULL);
+ /* Read Buffer Size (ACL mtu, max pkt, etc.) */
+ hci_send_cmd(hdev, HCI_OP_READ_BUFFER_SIZE, 0, NULL);
=20
#if 0
=2D /* Host buffer size */
=2D {
=2D struct hci_cp_host_buffer_size cp;
=2D cp.acl_mtu =3D cpu_to_le16(HCI_MAX_ACL_SIZE);
=2D cp.sco_mtu =3D HCI_MAX_SCO_SIZE;
=2D cp.acl_max_pkt =3D cpu_to_le16(0xffff);
=2D cp.sco_max_pkt =3D cpu_to_le16(0xffff);
=2D hci_send_cmd(hdev, HCI_OP_HOST_BUFFER_SIZE, sizeof(cp), &cp);
=2D }
+ /* Host buffer size */
+ {
+ struct hci_cp_host_buffer_size cp;
+ cp.acl_mtu =3D cpu_to_le16(HCI_MAX_ACL_SIZE);
+ cp.sco_mtu =3D HCI_MAX_SCO_SIZE;
+ cp.acl_max_pkt =3D cpu_to_le16(0xffff);
+ cp.sco_max_pkt =3D cpu_to_le16(0xffff);
+ hci_send_cmd(hdev, HCI_OP_HOST_BUFFER_SIZE, sizeof(cp), &cp);
+ }
#endif
=20
=2D /* Read BD Address */
=2D hci_send_cmd(hdev, HCI_OP_READ_BD_ADDR, 0, NULL);
+ /* Read BD Address */
+ hci_send_cmd(hdev, HCI_OP_READ_BD_ADDR, 0, NULL);
+ } while(!verify_valid_bdaddr(hdev) && retries--);
=20
/* Read Class of Device */
hci_send_cmd(hdev, HCI_OP_READ_CLASS_OF_DEV, 0, NULL);
=2D-=20
1.7.1
^ permalink raw reply
* Re: why is hciops a plugin ?
From: Johan Hedberg @ 2010-08-12 3:07 UTC (permalink / raw)
To: Pavan Savoy; +Cc: linux-bluetooth@vger.kernel.org, marcel
In-Reply-To: <AANLkTimku3Obrb=4KFjD5mapWpYQ0__4UZmzbfadu3WM@mail.gmail.com>
Hi,
On Wed, Aug 11, 2010, Pavan Savoy wrote:
> When you say raw HCI access do you mean doing the
> socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI) and bind/ioctl, writev+poll/read
> lacks few things ?
> but all of these are in lib/hci isn't it ?
Yes, that's the type of socket that I meant. Direct access to the HCI
messages would largely go away from the userspace side. Those
libbluetooth functions you're referring to are just convenience wrappers
for sending HCI commands through raw HCI sockets.
> So even if it was netlink only something like hci_open_dev() would
> have changed to socket(PF_NETLINK, SOCK_RAW, BT_NETLINK ); or
> something right ?
I'm not really familiar enough with netlink to comment on this. Marcel
(whose idea it originally was) would have to comment.
> any pointers out there ? references for such things ?
> I am just curious, don;t want anything specific ...
Right now, not really. The only stack internal messages there are at the
moment are things like HCI_DEV_REG, HCI_DEV_UNREG, HCI_DEV_UP and
HCI_DEV_DOWN and they only go one way (kernel->userspace). This category
of messages will grow in the future and it'll be possible to send them
both ways.
Some HCI messages for which it's already clear now that there will be a
benefit from a higher level abstraction on the userspace side are things
like name resolving and pairing related requests. Also, if I understood
correctly from Marcel, removing userspace processing of HCI events will
result in a considreable reduction of context switches since there wont
anymore be a promiscuous userspace-side socket that needs to
handle/filter all HCI data (Marcel, please correct me if this is
inaccurate or wrong).
Johan
^ permalink raw reply
* Re: QuiC AMP development
From: sober song @ 2010-08-12 2:17 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: Mat Martineau, Ron Shaffer, linux-bluetooth
In-Reply-To: <20100811031551.GA8985@vigoh>
Hi Shaffer/Peter
static inline int send_a2mp_cmd(struct amp_mgr *mgr, u8 ident, u8
code, u16 len, void *data) {
struct a2mp_cmd_hdr *hdr;
int plen;
u8 *buf;
BT_DBG("ident %d code %d", ident, code);
plen = sizeof(*hdr) + len;
buf = kzalloc(plen, GFP_ATOMIC);
if (!buf)
return -ENOMEM;
hdr = (struct a2mp_cmd_hdr *) buf;
hdr->code = code;
hdr->ident = ident;
hdr->len = cpu_to_le16(len);
buf += sizeof(*hdr);
memcpy(buf, data, len);
return send_a2mp(mgr->a2mp_sock, (u8 *) hdr, plen);
}
I see that here have a malloc, but i don't see free, doesn't it cause memleak?
Regards
sober
On 8/11/10, Gustavo F. Padovan <gustavo@padovan.org> wrote:
> Hi Mat,
>
> * Mat Martineau <mathewm@codeaurora.org> [2010-08-10 19:55:34 -0700]:
>
>>
>> Gustavo -
>>
>> On Tue, 10 Aug 2010, Gustavo F. Padovan wrote:
>>
>> >Hi all,
>> >
>> >* Ron Shaffer <rshaffer@codeaurora.org> [2010-08-08 21:43:36 -0500]:
>> >
>> >>As requested in today's summit discussions, here's a link that can be
>> >>used to inspect the code we've done to add AMP support on the latest
>> >>next tree.
>> >>
>> >>https://www.codeaurora.org/gitweb/quic/bluetooth/?p=bluetooth-next-2.6.git;a=summary
>> >>branch pk-upstream
>> >
>> >
>> >I'll put here some comments I have about some L2CAP patches:
>>
>> Thanks for taking the time to look over all these changes!
>>
>> >
>> >
>> >+static int l2cap_seq_list_init(struct l2cap_seq_list *seq_list, u16
>> > size)
>> >+{
>> >+ u16 allocSize;
>> >
>> >No capital letter here. Do alloc_size. Check the rest of your code for
>> > similar
>> >stuff.
>>
>> Yes, someone caught that in our internal code review too. I think
>> this was the only one.
>>
>> >
>> >
>> > u8 event;
>> > struct sk_buff *skb;
>> >};
>> >+
>> >#endif /* __AMP_H */
>> >diff --git a/net/bluetooth/amp.c b/net/bluetooth/amp.c
>> >index f43d7d8..16e74f6 100644
>> >--- a/net/bluetooth/amp.c
>> >+++ b/net/bluetooth/amp.c
>> >@@ -40,6 +40,7 @@ static struct workqueue_struct *amp_workqueue;
>> >LIST_HEAD(amp_mgr_list);
>> >DEFINE_RWLOCK(amp_mgr_list_lock);
>> >
>> >+
>> >static void remove_amp_mgr(struct amp_mgr *rem)
>> >{
>> > struct amp_mgr *mgr = NULL;
>> >
>> >Do not add new lines random places into your patch. Check you code for
>> > others
>> >things like that. Also check for lines overstepping the column 80.
>>
>> We definitely know we have work to do to clean up these patches and
>> add proper commit messages. Please be assured that we'll have these
>> more tidied up before posting patches to linux-bluetooth.
>
> ;)
>
>>
>> >
>> >
>> >+struct l2cap_enhanced_hdr {
>> >+ __le16 len;
>> >+ __le16 cid;
>> >+ __le16 control;
>> >+} __attribute__ ((packed));
>> >+#define L2CAP_ENHANCED_HDR_SIZE 6
>> >
>> >Get ride off this struct, that actually doesn't help. We tried that
>> > before and
>> >Marcel and I agreed that it does not help.
>>
>> If you guys don't like it, I'll take it out.
>>
>> >
>> >- if (memcpy_fromiovec(skb_put(*frag, count), msg->msg_iov,
>> > count))
>> >+
>> >+ if (memcpy_fromiovec(skb_put(*frag, count),
>> >+ msg->msg_iov, count))
>> > return -EFAULT;
>> >
>> >Avoid changes like that in your patches, you are just breaking a line
>> > here. If
>> >you want to do that do in a separeted patch.
>> >
>> >
>> >
>> >+/* L2CAP ERTM / Streaming extra field lengths */
>> >+#define L2CAP_FCS_SIZE 2
>> >
>> >Separated patch for that, so then you replace 2 for L2CAP_FCS_SIZE in one
>> >patch, instead of doing that in many patches like you are doing now. The
>> > same
>> >goes for L2CAP_SDULEN_SIZE.
>>
>> Yes, I already split that commit up to send the "RFC" patch set
>> earlier today. Unfortunately I missed that commit when generating
>> my patches :(
>>
>>
>> >-/* L2CAP Supervisory Function */
>> >+/* L2CAP Supervisory Frame Types */
>> >+#define L2CAP_SFRAME_RR 0x00
>> >+#define L2CAP_SFRAME_REJ 0x01
>> >+#define L2CAP_SFRAME_RNR 0x02
>> >+#define L2CAP_SFRAME_SREJ 0x03
>> >#define L2CAP_SUPER_RCV_READY 0x0000
>> >#define L2CAP_SUPER_REJECT 0x0004
>> >#define L2CAP_SUPER_RCV_NOT_READY 0x0008
>> >#define L2CAP_SUPER_SELECT_REJECT 0x000C
>> >
>> >/* L2CAP Segmentation and Reassembly */
>> >+#define L2CAP_SAR_UNSEGMENTED 0x00
>> >+#define L2CAP_SAR_START 0x01
>> >+#define L2CAP_SAR_END 0x02
>> >+#define L2CAP_SAR_CONTINUE 0x03
>> >#define L2CAP_SDU_UNSEGMENTED 0x0000
>> >#define L2CAP_SDU_START 0x4000
>> >#define L2CAP_SDU_END 0x8000
>> >
>> >What is that? we already have such defines.
>>
>> I was trying to not break existing code, while also creating
>> constants that were useful for modified code that will work with
>> either extended or enhanced headers. The new values are important,
>> but I agree that this is not the way to introduce the changes. See
>> below for more detail.
>>
>> >commit 162e6de6d5c11b8ffea91a9fa2d597340afdeb6e
>> >Author: Mat Martineau <mathewm@codeaurora.org>
>> >Date: Thu Aug 5 16:59:46 2010 -0700
>> >
>> > Bluetooth: Remove unused L2CAP code.
>> >
>> >net/bluetooth/l2cap.c | 1104
>> > +------------------------------------------------
>> >1 files changed, 15 insertions(+), 1089 deletions(-)
>> >
>> >That's not acceptable, we have to modify the existent base code and make
>> > it
>> >work with the new features, instead writing a new one and then switch to
>> > it.
>>
>> When setting up the commits for this git branch, I had to pick
>> between two approaches:
>>
>> * Build up a modified state machine in parallel, so the switchover
>> could happen in one patch. The code would compile and run after
>> every patch.
>>
>> * Or, start modifying the state machine piece by piece. Until all
>> of the modifications were done, ERTM would not work.
>>
>> I don't think my approach worked out well (mostly because it doesn't
>> preserve history adequately, and doesn't make it clear where code
>> has been modified instead of newly written). However, it's what we
>> had to share coming in to the Bluetooth summit, and we felt it was
>> very important to share it. I want to refine the approach to these
>> patches to put them in some acceptable form, so lets talk about the
>> best way to do that.
>
> I see. But now that they are public we can talk about and put them in
> shape for the merge into the mainline.
> I think it's possible to add AMP stuff without break ERTM (and we have
> to take care about that, because now ERTM pass all PTS tests). We can
> arrange your commits to not break ERTM any time.
>
>>
>>
>> >commit 09850f68219572288fe62a59235fda3d2629c7b2
>> >Author: Peter Krystad <pkrystad@codeaurora.org>
>> >Date: Wed Aug 4 16:55:11 2010 -0700
>> >
>> > Rename l2cap.c to el2cap.c.
>> >
>> > Necessary before additional files can be added to l2cap module.
>> > A module cannot contain a file with the same name as the module.
>> >
>> >We don't neeed that. We might split l2cap.c into smaller chunks before
>> > merge
>> >all the AMP stuff into it, so we won't have the module name problem
>> > anymore.
>>
>> There is a technical reason for this. We changed the Makefile to
>> create l2cap.ko from two source files - one for L2CAP and one for
>> AMP. However, the build system fails if you try to link l2cap.c and
>> amp.c in to l2cap.ko. We had to come up with some other name for
>> l2cap.c in order to keep the module name the same. There's probably
>> a better choice than el2cap.c - any suggestions are welcome.
>
> Yeah, I know, that's why the l2cap.c split will help this. Marcel
> told that on the meeting Sunday.
>
> --
> Gustavo F. Padovan
> http://padovan.org
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: why is hciops a plugin ?
From: Pavan Savoy @ 2010-08-11 19:41 UTC (permalink / raw)
To: Pavan Savoy, linux-bluetooth@vger.kernel.org
In-Reply-To: <20100811021610.GA8306@jh-x301>
On Tue, Aug 10, 2010 at 9:16 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi,
>
> On Tue, Aug 10, 2010, Pavan Savoy wrote:
>> Any reason behind making hciops a plugin and bluetoothd making use of
>> that plugin, wasn't everything straight up in hcid before ?
>
> We're planning on redoing the kernel-userspace interface and in the long
> run the traditional raw HCI access wont exist anymore in userspace. In
> order to accommodate both old and new kernels in a clean way the
> interface towards the kernel needs to be easily interchangable, which is
> what hciops is trying to do (it's just a first step in that direction
> though). One of the drivers for this change is the need to have the
> security logic in one place instead of it being split between kernel and
> userspace (this has caused all sorts of trouble with SSP for us).
When you say raw HCI access do you mean doing the
socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI) and bind/ioctl, writev+poll/read
lacks few things ?
but all of these are in lib/hci isn't it ?
> Originally the plan for the new kernel interface was netlink but now the
So even if it was netlink only something like hci_open_dev() would
have changed to
socket(PF_NETLINK, SOCK_RAW, BT_NETLINK ); or something right ?
> idea is to simply extend the stack internal messages of raw HCI sockets
> with a more complete two-way protocol between the kernel and userspace.
> You should (hopefully) be seeing more patches for this still during this
> year.
any pointers out there ? references for such things ?
I am just curious, don;t want anything specific ...
> Johan
>
^ permalink raw reply
* Re: [PATCH] Add hfp-api.txt to EXTRA_DIST
From: Marcel Holtmann @ 2010-08-11 18:55 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-bluetooth
In-Reply-To: <1281552414-2986-1-git-send-email-u.kleine-koenig@pengutronix.de>
Hi Uwe,
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Makefile.am | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
patch has been applied, but in the future stop using signed-off-by
lines. We are not using them. That is more for kernel patches.
Regards
Marcel
^ permalink raw reply
* [PATCH] Add hfp-api.txt to EXTRA_DIST
From: Uwe Kleine-König @ 2010-08-11 18:46 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1281548304.12579.243.camel@localhost.localdomain>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Makefile.am | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index aa95ed7..83a90c9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -332,7 +332,8 @@ EXTRA_DIST += doc/manager-api.txt \
doc/adapter-api.txt doc/device-api.txt \
doc/service-api.txt doc/agent-api.txt doc/attribute-api.txt \
doc/serial-api.txt doc/network-api.txt \
- doc/input-api.txt doc/audio-api.txt doc/control-api.txt
+ doc/input-api.txt doc/audio-api.txt doc/control-api.txt \
+ doc/hfp-api.txt
AM_YFLAGS = -d
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] add mailing list as bug report address to configure.ac
From: Marcel Holtmann @ 2010-08-11 17:39 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-bluetooth
In-Reply-To: <1281104400-9019-1-git-send-email-u.kleine-koenig@pengutronix.de>
Hi Uwe,
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> configure.ac | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index b004f6e..2804d29 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,5 @@
> AC_PREREQ(2.60)
> -AC_INIT(bluez, 4.69)
> +AC_INIT(bluez, 4.69, [linux-bluetooth@vger.kernel.org])
>
> AM_INIT_AUTOMAKE([foreign subdir-objects])
> AM_CONFIG_HEADER(config.h)
I prefer not doing this. Can we not just use the README file for this.
Hold on, we are already doing this ;)
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 2/2] add three missing api documents to EXTRA_DIST
From: Marcel Holtmann @ 2010-08-11 17:38 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-bluetooth
In-Reply-To: <1281104283-8792-2-git-send-email-u.kleine-koenig@pengutronix.de>
Hi Uwe,
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> there are still a few files in bluez.git/doc that are not listed in EXTRA_DIST:
>
> - bluez-docs.xml
> - gtk-doc.make
> - version.xml.in
they are not suppose to be there. They are leftovers and might be should
removed since we don't really do gtk-doc generation anymore.
> I didn't know if I should add these, too, so I just point that out.
>
> Best regards
> Uwe
>
> Makefile.am | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 4bb82fe..7007026 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -316,9 +316,12 @@ EXTRA_DIST += \
> doc/audio-api.txt \
> doc/control-api.txt \
> doc/device-api.txt \
> + doc/health-api.txt \
> + doc/hfp-api.txt \
> doc/input-api.txt \
> doc/manager-api.txt \
> doc/network-api.txt \
> + doc/node-api.txt \
> doc/serial-api.txt \
> doc/service-api.txt \
please send a patch that just adds hfp-api.txt to EXTRA_DIST.
The node-api.txt has never been implemented and might become obsolete
soon. So that should not be in the distribution.
The health-api.txt will come soon, but until we merged the code for it,
I prefer not adding it into the distribution.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 1/2] list api docs alphabetically and one per line in EXTRA_DIST
From: Marcel Holtmann @ 2010-08-11 17:35 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-bluetooth
In-Reply-To: <1281104283-8792-1-git-send-email-u.kleine-koenig@pengutronix.de>
Hi Uwe,
> This makes further changes to the list easier to review
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Makefile.am | 17 ++++++++++++-----
> 1 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 65d4312..4bb82fe 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -309,11 +309,18 @@ udevdir = $(libexecdir)/udev
> dist_udev_SCRIPTS = scripts/bluetooth_serial
> endif
>
> -EXTRA_DIST += doc/manager-api.txt \
> - doc/adapter-api.txt doc/device-api.txt \
> - doc/service-api.txt doc/agent-api.txt doc/attribute-api.txt \
> - doc/serial-api.txt doc/network-api.txt \
> - doc/input-api.txt doc/audio-api.txt doc/control-api.txt
> +EXTRA_DIST += \
> + doc/adapter-api.txt \
> + doc/agent-api.txt \
> + doc/attribute-api.txt \
> + doc/audio-api.txt \
> + doc/control-api.txt \
> + doc/device-api.txt \
> + doc/input-api.txt \
> + doc/manager-api.txt \
> + doc/network-api.txt \
> + doc/serial-api.txt \
> + doc/service-api.txt \
I prefer actually to not to do this and keep them in a bit more logical
order. The manager is the initial one, followed by adapter etc.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 1/1] Bluetooth: RPN negotiation fix
From: Marcel Holtmann @ 2010-08-11 17:31 UTC (permalink / raw)
To: Yuri Kululin; +Cc: linux-bluetooth
In-Reply-To: <6a577b5627b8388489a21fd49f5c9d2b85a2bbef.1279866739.git.ext-yuri.kululin@nokia.com>
Hi Yuri,
> According to the ETSI 3GPP TS 07.10 the default bit rate value for RFCOMM
> is 9600 bit/s. Return this bit rate in case of RPN request and accept other
> sane bit rates proposed by the sender in RPM command.
>
> Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
> ---
> net/bluetooth/rfcomm/core.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
patch has been applied. Thanks.
Regards
Marcel
^ permalink raw reply
* Re: Support for HCI commands and events related to AMP functionality
From: ingas @ 2010-08-11 16:26 UTC (permalink / raw)
To: linux-bluetooth; +Cc: rshaffer, johan.hedberg, marcel
In-Reply-To: <1281485576-32715-1-git-send-email-ingas@codeaurora.org>
Just a clarification
> Added new HCI commands and events constructs for AMP related development.
> Will be used in updated testing tools for AMP.
>
>
> --
> Inga Stotland
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
These changes are needed first in hcidump tool (patches will come next) to
enable parsing of AMP commands. Even though these constructs are not going
to be used elsewhere in bluez git tree (at least initially), I felt that
for the sake of consistency they should live in hci.h
The subsequent updates to hcidump will depend on this patch set in bluez.
Inga
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply
* Re: [PATCH] Fix not unmarking temporary flag when a new key is created
From: Johan Hedberg @ 2010-08-11 13:58 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <1281534567-26666-1-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Wed, Aug 11, 2010, Luiz Augusto von Dentz wrote:
> Device may have been marked as temporary so when a new key is generated
> that meets the requirements to be stored it should unmark temporary flag
> so the device is not removed when disconnected.
> ---
> src/dbus-hci.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/dbus-hci.c b/src/dbus-hci.c
> index 22f378d..8c1e10c 100644
> --- a/src/dbus-hci.c
> +++ b/src/dbus-hci.c
> @@ -746,8 +746,7 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
> else if (!bonding && old_key_type == 0xff)
> hcid_dbus_bonding_process_complete(local, peer, 0);
>
> - if (temporary)
> - device_set_temporary(device, TRUE);
> + device_set_temporary(device, temporary);
>
> return 0;
> }
Thanks. The patch is now upstream.
Johan
^ permalink raw reply
* [PATCH] Fix not unmarking temporary flag when a new key is created
From: Luiz Augusto von Dentz @ 2010-08-11 13:49 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Device may have been marked as temporary so when a new key is generated
that meets the requirements to be stored it should unmark temporary flag
so the device is not removed when disconnected.
---
src/dbus-hci.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 22f378d..8c1e10c 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -746,8 +746,7 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
else if (!bonding && old_key_type == 0xff)
hcid_dbus_bonding_process_complete(local, peer, 0);
- if (temporary)
- device_set_temporary(device, TRUE);
+ device_set_temporary(device, temporary);
return 0;
}
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH 2/2] Fix not unmarking temporary flag when a new key is created
From: Luiz Augusto von Dentz @ 2010-08-11 13:43 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth
In-Reply-To: <20100811132757.GC13302@jh-x301>
Hi,
On Wed, Aug 11, 2010 at 4:27 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Luiz,
>
> On Wed, Aug 11, 2010, Luiz Augusto von Dentz wrote:
>> --- a/src/dbus-hci.c
>> +++ b/src/dbus-hci.c
>> @@ -746,8 +746,8 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
>> else if (!bonding && old_key_type == 0xff)
>> hcid_dbus_bonding_process_complete(local, peer, 0);
>>
>> - if (temporary)
>> - device_set_temporary(device, TRUE);
>> + if (device_is_temporary(device) != temporary)
>> + device_set_temporary(device, temporary);
>>
>> return 0;
>
> I'd prefer if you just call device_set_temporary(device, temporary)
> directly. That'd save you the if-check and a call to device_is_temporary.
Fair enough, I will change it and send a new patch in a few minutes.
--
Luiz Augusto von Dentz
Computer Engineer
^ permalink raw reply
* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
From: Marcel Holtmann @ 2010-08-11 13:40 UTC (permalink / raw)
To: José Antonio Santos Cadenas; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <201008111517.07434.santoscadenas@gmail.com>
Hi Jose,
> I have also experienced more warnings, but I don't know what's the best way to
> solve it because they are related to gstreamer and I'm not familiar with it. I
> attach them in case anyone can solve them or help me showing the best way to
> solve do it.
>
> CC audio/audio_libgstbluetooth_la-gstsbcenc.lo
> audio/gstsbcenc.c:138:1: warning: no previous declaration for
> 'gst_sbc_enc_get_type'
> CC audio/audio_libgstbluetooth_la-gstsbcdec.lo
> audio/gstsbcdec.c:37:1: warning: no previous declaration for
> 'gst_sbc_dec_get_type'
> CC audio/audio_libgstbluetooth_la-gstsbcparse.lo
> audio/gstsbcparse.c:37:1: warning: no previous declaration for
> 'gst_sbc_parse_get_type'
> CC audio/audio_libgstbluetooth_la-gstavdtpsink.lo
> audio/gstavdtpsink.c:82:1: warning: no previous declaration for
> 'gst_avdtp_sink_get_type'
> CC audio/audio_libgstbluetooth_la-gsta2dpsink.lo
> audio/gsta2dpsink.c:50:1: warning: no previous declaration for
> 'gst_a2dp_sink_get_type'
> CC audio/audio_libgstbluetooth_la-gstsbcutil.lo
> CC audio/audio_libgstbluetooth_la-gstrtpsbcpay.lo
> audio/gstrtpsbcpay.c:70:1: warning: no previous declaration for
> 'gst_rtp_sbc_pay_get_type'
> CC audio/audio_libgstbluetooth_la-ipc.lo
>
>
> Looking to the code, the problem seems to be in this macro:
> GST_BOILERPLATE
>
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-
> GstUtils.html#GST-BOILERPLATE:CAPS
>
> As I said I don't have previous experience with gstreamer and I don't know if
> it is a good idea to declare the "get_type" function previously.
this is GStreamer type generation being utterly stupid. Either way
around it will produce a warning. It added #pragma magic to keep the
warning, but not failing the build. However we might need to turn around
and change that the warning only shows up with old compilers.
Regards
Marcel
^ permalink raw reply
* Re: [PATCH 2/2] Fix not unmarking temporary flag when a new key is created
From: Johan Hedberg @ 2010-08-11 13:27 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <1281530667-25379-2-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Wed, Aug 11, 2010, Luiz Augusto von Dentz wrote:
> --- a/src/dbus-hci.c
> +++ b/src/dbus-hci.c
> @@ -746,8 +746,8 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
> else if (!bonding && old_key_type == 0xff)
> hcid_dbus_bonding_process_complete(local, peer, 0);
>
> - if (temporary)
> - device_set_temporary(device, TRUE);
> + if (device_is_temporary(device) != temporary)
> + device_set_temporary(device, temporary);
>
> return 0;
I'd prefer if you just call device_set_temporary(device, temporary)
directly. That'd save you the if-check and a call to device_is_temporary.
Johan
^ permalink raw reply
* Re: [PATCH 1/2] Fix not deleting stored keys when a new one is created
From: Johan Hedberg @ 2010-08-11 13:26 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <1281530667-25379-1-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Wed, Aug 11, 2010, Luiz Augusto von Dentz wrote:
> When a new link key is created but it doesn't match any criteria to be
> stored any previouly one should be removed from filesystem.
> ---
> src/dbus-hci.c | 12 +++++++-----
> src/device.c | 2 +-
> src/device.h | 2 +-
> 3 files changed, 9 insertions(+), 7 deletions(-)
The patch is now upstream. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
From: Johan Hedberg @ 2010-08-11 13:17 UTC (permalink / raw)
To: Jose Antonio Santos Cadenas; +Cc: linux-bluetooth
In-Reply-To: <1281531992-10976-1-git-send-email-santoscadenas@gmail.com>
Hi,
On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> ---
> audio/control.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/audio/control.c b/audio/control.c
> index c8aba53..24db448 100644
> --- a/audio/control.c
> +++ b/audio/control.c
> @@ -437,7 +437,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
> {
> GSList *l;
> struct audio_device *dev = control->dev;
> - avdtp_session_state_t old_state = control->state;
> + avctp_state_t old_state = control->state;
> gboolean value;
>
> switch (new_state) {
Thanks. The patch is now upstream.
Johan
^ permalink raw reply
* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
From: José Antonio Santos Cadenas @ 2010-08-11 13:17 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
In-Reply-To: <20100811124942.GA12156@jh-x301>
El Wednesday 11 August 2010 14:49:42 Johan Hedberg escribió:
> Hi,
>
> On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> > ---
> >
> > audio/control.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/audio/control.c b/audio/control.c
> > index c8aba53..daa01ef 100644
> > --- a/audio/control.c
> > +++ b/audio/control.c
> > @@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control,
> > avctp_state_t new_state)
> >
> > avctp_disconnected(control->dev);
> >
> > - if (old_state != AVCTP_STATE_CONNECTED)
> > + if (old_state != AVDTP_SESSION_STATE_CONNECTED)
> >
> > break;
> >
> > value = FALSE;
>
> That's the wrong fix to suppress the warning. The real problem is in the
> beginning of the function:
>
> avdtp_session_state_t old_state = control->state;
>
> Obviously that should be avctp_state_t and not avdtp. Do you
> want to send another patch to fix it?
>
> Johan
I have also experienced more warnings, but I don't know what's the best way to
solve it because they are related to gstreamer and I'm not familiar with it. I
attach them in case anyone can solve them or help me showing the best way to
solve do it.
CC audio/audio_libgstbluetooth_la-gstsbcenc.lo
audio/gstsbcenc.c:138:1: warning: no previous declaration for
'gst_sbc_enc_get_type'
CC audio/audio_libgstbluetooth_la-gstsbcdec.lo
audio/gstsbcdec.c:37:1: warning: no previous declaration for
'gst_sbc_dec_get_type'
CC audio/audio_libgstbluetooth_la-gstsbcparse.lo
audio/gstsbcparse.c:37:1: warning: no previous declaration for
'gst_sbc_parse_get_type'
CC audio/audio_libgstbluetooth_la-gstavdtpsink.lo
audio/gstavdtpsink.c:82:1: warning: no previous declaration for
'gst_avdtp_sink_get_type'
CC audio/audio_libgstbluetooth_la-gsta2dpsink.lo
audio/gsta2dpsink.c:50:1: warning: no previous declaration for
'gst_a2dp_sink_get_type'
CC audio/audio_libgstbluetooth_la-gstsbcutil.lo
CC audio/audio_libgstbluetooth_la-gstrtpsbcpay.lo
audio/gstrtpsbcpay.c:70:1: warning: no previous declaration for
'gst_rtp_sbc_pay_get_type'
CC audio/audio_libgstbluetooth_la-ipc.lo
Looking to the code, the problem seems to be in this macro:
GST_BOILERPLATE
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-
GstUtils.html#GST-BOILERPLATE:CAPS
As I said I don't have previous experience with gstreamer and I don't know if
it is a good idea to declare the "get_type" function previously.
Regards.
^ permalink raw reply
* [PATCH] Solve compilation warning usin gcc 4.5.0
From: Jose Antonio Santos Cadenas @ 2010-08-11 13:06 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jose Antonio Santos Cadenas
In-Reply-To: <201008111455.41381.santoscadenas@gmail.com>
---
audio/control.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/audio/control.c b/audio/control.c
index c8aba53..24db448 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -437,7 +437,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
{
GSList *l;
struct audio_device *dev = control->dev;
- avdtp_session_state_t old_state = control->state;
+ avctp_state_t old_state = control->state;
gboolean value;
switch (new_state) {
--
1.7.2
^ permalink raw reply related
* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
From: José Antonio Santos Cadenas @ 2010-08-11 12:55 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
In-Reply-To: <20100811124942.GA12156@jh-x301>
El Wednesday 11 August 2010 14:49:42 Johan Hedberg escribió:
> Hi,
>
> On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> > ---
> >
> > audio/control.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/audio/control.c b/audio/control.c
> > index c8aba53..daa01ef 100644
> > --- a/audio/control.c
> > +++ b/audio/control.c
> > @@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control,
> > avctp_state_t new_state)
> >
> > avctp_disconnected(control->dev);
> >
> > - if (old_state != AVCTP_STATE_CONNECTED)
> > + if (old_state != AVDTP_SESSION_STATE_CONNECTED)
> >
> > break;
> >
> > value = FALSE;
>
> That's the wrong fix to suppress the warning. The real problem is in the
> beginning of the function:
>
> avdtp_session_state_t old_state = control->state;
>
> Obviously that should be avctp_state_t and not avdtp. Do you
> want to send another patch to fix it?
Sure.
>
> Johan
^ permalink raw reply
* Re: [PATCH] Solve compilation warning usin gcc 4.5.0
From: Johan Hedberg @ 2010-08-11 12:49 UTC (permalink / raw)
To: Jose Antonio Santos Cadenas; +Cc: linux-bluetooth
In-Reply-To: <1281517766-5612-1-git-send-email-santoscadenas@gmail.com>
Hi,
On Wed, Aug 11, 2010, Jose Antonio Santos Cadenas wrote:
> ---
> audio/control.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/audio/control.c b/audio/control.c
> index c8aba53..daa01ef 100644
> --- a/audio/control.c
> +++ b/audio/control.c
> @@ -446,7 +446,7 @@ static void avctp_set_state(struct control *control, avctp_state_t new_state)
>
> avctp_disconnected(control->dev);
>
> - if (old_state != AVCTP_STATE_CONNECTED)
> + if (old_state != AVDTP_SESSION_STATE_CONNECTED)
> break;
>
> value = FALSE;
That's the wrong fix to suppress the warning. The real problem is in the
beginning of the function:
avdtp_session_state_t old_state = control->state;
Obviously that should be avctp_state_t and not avdtp. Do you
want to send another patch to fix it?
Johan
^ permalink raw reply
* [PATCH 2/2] Fix not unmarking temporary flag when a new key is created
From: Luiz Augusto von Dentz @ 2010-08-11 12:44 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1281530667-25379-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Device may have been marked as temporary so when a new key is generated
and it meets the requirements to be stored the device should be no longer
temporary anymore.
---
src/dbus-hci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 22f378d..5505d00 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -746,8 +746,8 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
else if (!bonding && old_key_type == 0xff)
hcid_dbus_bonding_process_complete(local, peer, 0);
- if (temporary)
- device_set_temporary(device, TRUE);
+ if (device_is_temporary(device) != temporary)
+ device_set_temporary(device, temporary);
return 0;
}
--
1.7.0.4
^ permalink raw reply related
* [PATCH 1/2] Fix not deleting stored keys when a new one is created
From: Luiz Augusto von Dentz @ 2010-08-11 12:44 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
When a new link key is created but it doesn't match any criteria to be
stored any previouly one should be removed from filesystem.
---
src/dbus-hci.c | 12 +++++++-----
src/device.c | 2 +-
src/device.h | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 6d27caa..22f378d 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -700,6 +700,13 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
/* Clear any previous debug key */
device_set_debug_key(device, NULL);
+ /* If this is not the first link key set a flag so a subsequent auth
+ * complete event doesn't trigger SDP and remove any stored key */
+ if (old_key_type != 0xff) {
+ device_set_renewed_key(device, TRUE);
+ device_remove_bonding(device);
+ }
+
/* Store the link key only in runtime memory if it's a debug
* key, else store the link key persistently if one of the
* following is true:
@@ -734,11 +741,6 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
} else
temporary = TRUE;
- /* If this is not the first link key set a flag so a subsequent auth
- * complete event doesn't trigger SDP */
- if (old_key_type != 0xff)
- device_set_renewed_key(device, TRUE);
-
if (!device_is_connected(device))
device_set_secmode3_conn(device, TRUE);
else if (!bonding && old_key_type == 0xff)
diff --git a/src/device.c b/src/device.c
index 10ba779..e72f289 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1056,7 +1056,7 @@ void device_get_name(struct btd_device *device, char *name, size_t len)
strncpy(name, device->name, len);
}
-static void device_remove_bonding(struct btd_device *device)
+void device_remove_bonding(struct btd_device *device)
{
char filename[PATH_MAX + 1];
char srcaddr[18], dstaddr[18];
diff --git a/src/device.h b/src/device.h
index 5f75e61..21f67d0 100644
--- a/src/device.h
+++ b/src/device.h
@@ -66,7 +66,7 @@ void device_set_secmode3_conn(struct btd_device *device, gboolean enable);
DBusMessage *device_create_bonding(struct btd_device *device,
DBusConnection *conn, DBusMessage *msg,
const char *agent_path, uint8_t capability);
-void device_remove_bondind(struct btd_device *device, DBusConnection *connection);
+void device_remove_bonding(struct btd_device *device);
void device_bonding_complete(struct btd_device *device, uint8_t status);
void device_simple_pairing_complete(struct btd_device *device, uint8_t status);
gboolean device_is_creating(struct btd_device *device, const char *sender);
--
1.7.0.4
^ 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