* [PATCH v2 2/4] Bluetooth: Allow for NULL data in mgmt_pending_add
From: Szymon Janc @ 2011-03-01 17:23 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc
In-Reply-To: <1299000216-6570-1-git-send-email-szymon.janc@tieto.com>
Since index is in mgmt_hdr it is possible to have mgmt command with
no parameters that still needs to add itself to pending list.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/mgmt.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index bde42a5..97d7240 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -235,7 +235,8 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
return NULL;
}
- memcpy(cmd->cmd_params, data, len);
+ if (data)
+ memcpy(cmd->cmd_params, data, len);
cmd->sk = sk;
sock_hold(sk);
--
1.7.0.4
^ permalink raw reply related
* [PATCH v2 1/4] Bluetooth: Rename cmd to cmd_params in pending_cmd
From: Szymon Janc @ 2011-03-01 17:23 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc
In-Reply-To: <1299000216-6570-1-git-send-email-szymon.janc@tieto.com>
This field holds not whole command but only command specific
parameters.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/mgmt.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e6efaae..bde42a5 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -36,7 +36,7 @@ struct pending_cmd {
struct list_head list;
__u16 opcode;
int index;
- void *cmd;
+ void *cmd_params;
struct sock *sk;
void *user_data;
};
@@ -213,7 +213,7 @@ static int read_controller_info(struct sock *sk, u16 index)
static void mgmt_pending_free(struct pending_cmd *cmd)
{
sock_put(cmd->sk);
- kfree(cmd->cmd);
+ kfree(cmd->cmd_params);
kfree(cmd);
}
@@ -229,13 +229,13 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
cmd->opcode = opcode;
cmd->index = index;
- cmd->cmd = kmalloc(len, GFP_ATOMIC);
- if (!cmd->cmd) {
+ cmd->cmd_params = kmalloc(len, GFP_ATOMIC);
+ if (!cmd->cmd_params) {
kfree(cmd);
return NULL;
}
- memcpy(cmd->cmd, data, len);
+ memcpy(cmd->cmd_params, data, len);
cmd->sk = sk;
sock_hold(sk);
@@ -1386,7 +1386,7 @@ struct cmd_lookup {
static void mode_rsp(struct pending_cmd *cmd, void *data)
{
- struct mgmt_mode *cp = cmd->cmd;
+ struct mgmt_mode *cp = cmd->cmd_params;
struct cmd_lookup *match = data;
if (cp->val != match->val)
@@ -1486,7 +1486,7 @@ int mgmt_connected(u16 index, bdaddr_t *bdaddr)
static void disconnect_rsp(struct pending_cmd *cmd, void *data)
{
- struct mgmt_cp_disconnect *cp = cmd->cmd;
+ struct mgmt_cp_disconnect *cp = cmd->cmd_params;
struct sock **sk = data;
struct mgmt_rp_disconnect rp;
--
1.7.0.4
^ permalink raw reply related
* [PATCH v2 0/4] Support for OOB in mgmt interface
From: Szymon Janc @ 2011-03-01 17:23 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc
Patches rebased to match changes after moving index to mgmt_hdr.
Dropped patches already applied.
BR,
Szymon Janc
on behalf of ST-Ericsson
Szymon Janc (4):
Bluetooth: Rename cmd to cmd_params in pending_cmd
Bluetooth: Allow for NULL data in mgmt_pending_add
Bluetooth: Add read_local_oob_data management command
Bluetooth: Add add/remove_remote_oob_data management commands
include/net/bluetooth/hci.h | 26 ++++++
include/net/bluetooth/hci_core.h | 18 ++++
include/net/bluetooth/mgmt.h | 18 ++++
net/bluetooth/hci_core.c | 76 ++++++++++++++++
net/bluetooth/hci_event.c | 56 ++++++++++++-
net/bluetooth/mgmt.c | 175 ++++++++++++++++++++++++++++++++++++--
6 files changed, 361 insertions(+), 8 deletions(-)
^ permalink raw reply
* Re: [PATCH] compat-wireless: rt2800pci (and rt2x00pci) don't unload on 'make unload'
From: Luis R. Rodriguez @ 2011-03-01 17:04 UTC (permalink / raw)
To: Greg Whiteley; +Cc: Luis R. Rodriguez, linux-wireless, linux-bluetooth
In-Reply-To: <1298970756-32328-1-git-send-email-greg.whiteley@gmail.com>
On Tue, Mar 1, 2011 at 1:12 AM, Greg Whiteley <greg.whiteley@gmail.com> wrote:
> Add missing module names to scripts/unload.sh
>
> Signed-off-by: Greg Whiteley
Thanks! SOB must have the e-mail address too next time.
Luis
^ permalink raw reply
* [PATCH] Bluetooth: Fix some small code style issues in mgmt.c
From: Szymon Janc @ 2011-03-01 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/mgmt.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index f69dbcb..0054c74 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -716,8 +716,7 @@ static int set_service_cache(struct sock *sk, u16 index, unsigned char *data,
cp = (void *) data;
if (len != sizeof(*cp))
- return cmd_status(sk, index, MGMT_OP_SET_SERVICE_CACHE,
- EINVAL);
+ return cmd_status(sk, index, MGMT_OP_SET_SERVICE_CACHE, EINVAL);
hdev = hci_dev_get(index);
if (!hdev)
@@ -1058,8 +1057,7 @@ static int set_io_capability(struct sock *sk, u16 index, unsigned char *data,
cp = (void *) data;
if (len != sizeof(*cp))
- return cmd_status(sk, index, MGMT_OP_SET_IO_CAPABILITY,
- EINVAL);
+ return cmd_status(sk, index, MGMT_OP_SET_IO_CAPABILITY, EINVAL);
hdev = hci_dev_get(index);
if (!hdev)
@@ -1070,7 +1068,7 @@ static int set_io_capability(struct sock *sk, u16 index, unsigned char *data,
hdev->io_capability = cp->io_capability;
BT_DBG("%s IO capability set to 0x%02x", hdev->name,
- hdev->io_capability);
+ hdev->io_capability);
hci_dev_unlock_bh(hdev);
hci_dev_put(hdev);
@@ -1424,8 +1422,7 @@ int mgmt_discoverable(u16 index, u8 discoverable)
struct cmd_lookup match = { discoverable, NULL };
int ret;
- mgmt_pending_foreach(MGMT_OP_SET_DISCOVERABLE, index,
- mode_rsp, &match);
+ mgmt_pending_foreach(MGMT_OP_SET_DISCOVERABLE, index, mode_rsp, &match);
ev.val = discoverable;
@@ -1631,8 +1628,7 @@ int mgmt_user_confirm_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status)
MGMT_OP_USER_CONFIRM_REPLY);
}
-int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr,
- u8 status)
+int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status)
{
return confirm_reply_complete(index, bdaddr, status,
MGMT_OP_USER_CONFIRM_NEG_REPLY);
--
1.7.0.4
on behalf of ST-Ericsson
^ permalink raw reply related
* [PATCH] Bluetooth: Use variable name instead of type to compute size with sizeof()
From: Szymon Janc @ 2011-03-01 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/mgmt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 6dd0152..f69dbcb 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1035,7 +1035,7 @@ static int pin_code_neg_reply(struct sock *sk, u16 index, unsigned char *data,
goto failed;
}
- err = hci_send_cmd(hdev, HCI_OP_PIN_CODE_NEG_REPLY, sizeof(bdaddr_t),
+ err = hci_send_cmd(hdev, HCI_OP_PIN_CODE_NEG_REPLY, sizeof(cp->bdaddr),
&cp->bdaddr);
if (err < 0)
mgmt_pending_remove(cmd);
--
1.7.0.4
on behalf of ST-Ericsson
^ permalink raw reply related
* [PATCH] Bluetooth: Remove unused parameters and variables from get_connections
From: Szymon Janc @ 2011-03-01 15:55 UTC (permalink / raw)
To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl, henrik.possung, Szymon Janc
Command pointer was a leftover after moving controller index to
mgmt_hdr.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/mgmt.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e6efaae..6dd0152 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -900,10 +900,8 @@ failed:
return err;
}
-static int get_connections(struct sock *sk, u16 index, unsigned char *data,
- u16 len)
+static int get_connections(struct sock *sk, u16 index)
{
- struct mgmt_cp_get_connections *cp;
struct mgmt_rp_get_connections *rp;
struct hci_dev *hdev;
struct list_head *p;
@@ -913,8 +911,6 @@ static int get_connections(struct sock *sk, u16 index, unsigned char *data,
BT_DBG("");
- cp = (void *) data;
-
hdev = hci_dev_get(index);
if (!hdev)
return cmd_status(sk, index, MGMT_OP_GET_CONNECTIONS, ENODEV);
@@ -1333,7 +1329,7 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
err = disconnect(sk, index, buf + sizeof(*hdr), len);
break;
case MGMT_OP_GET_CONNECTIONS:
- err = get_connections(sk, index, buf + sizeof(*hdr), len);
+ err = get_connections(sk, index);
break;
case MGMT_OP_PIN_CODE_REPLY:
err = pin_code_reply(sk, index, buf + sizeof(*hdr), len);
--
1.7.0.4
on behalf of ST-Ericsson
^ permalink raw reply related
* Re: [stable] [2.6.38-rc6, patch] fix hci_dev_list locking...
From: Daniel J Blueman @ 2011-03-01 15:53 UTC (permalink / raw)
To: Greg KH; +Cc: linux-bluetooth, stable
In-Reply-To: <20110301154919.GB27312@kroah.com>
On 1 March 2011 23:49, Greg KH <greg@kroah.com> wrote:
> On Tue, Mar 01, 2011 at 11:41:38PM +0800, Daniel J Blueman wrote:
>> Release acquired lock on error path, fixing potential hang up.
>>
>> Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
>>
>> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
>> index f827fd9..ace8726 100644
>
> Please go read Documentation/stable_kernel_rules.txt for how to properly
> submit patches to the stable kernel tree (hint, this way was not
> correct...)
Good tip; I'll follow it up.
Thanks,
Daniel
--
Daniel J Blueman
^ permalink raw reply
* Re: [stable] [2.6.38-rc6, patch] fix hci_dev_list locking...
From: Greg KH @ 2011-03-01 15:49 UTC (permalink / raw)
To: Daniel J Blueman; +Cc: linux-bluetooth, stable
In-Reply-To: <AANLkTi=_gAQiAqKsYa2=Haq0ceJwK3n7OafDk6Lb7MZE@mail.gmail.com>
On Tue, Mar 01, 2011 at 11:41:38PM +0800, Daniel J Blueman wrote:
> Release acquired lock on error path, fixing potential hang up.
>
> Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index f827fd9..ace8726 100644
Please go read Documentation/stable_kernel_rules.txt for how to properly
submit patches to the stable kernel tree (hint, this way was not
correct...)
thanks,
greg k-h
^ permalink raw reply
* [2.6.38-rc6, patch] fix hci_dev_list locking...
From: Daniel J Blueman @ 2011-03-01 15:41 UTC (permalink / raw)
To: linux-bluetooth; +Cc: stable
Release acquired lock on error path, fixing potential hang up.
Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index f827fd9..ace8726 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -111,8 +111,10 @@ static int read_index_list(struct sock *sk)
body_len = sizeof(*ev) + sizeof(*rp) + (2 * count);
skb = alloc_skb(sizeof(*hdr) + body_len, GFP_ATOMIC);
- if (!skb)
+ if (!skb) {
+ read_unlock(&hci_dev_list_lock);
return -ENOMEM;
+ }
hdr = (void *) skb_put(skb, sizeof(*hdr));
hdr->opcode = cpu_to_le16(MGMT_EV_CMD_COMPLETE);
--
Daniel J Blueman
^ permalink raw reply related
* Re: [PATCH] Fix response on adapter RequestSession method
From: Anderson Lizardo @ 2011-03-01 15:39 UTC (permalink / raw)
To: Dmitriy Paliy; +Cc: linux-bluetooth, luiz.dentz
In-Reply-To: <1298989535-403-2-git-send-email-dmitriy.paliy@nokia.com>
Hi Dmitriy,
On Tue, Mar 1, 2011 at 10:25 AM, Dmitriy Paliy <dmitriy.paliy@nokia.com> wrote:
> @@ -795,17 +816,31 @@ static void confirm_mode_cb(struct agent *agent, DBusError *derr, void *data)
> return;
> }
>
> - err = set_mode(req->adapter, req->mode, NULL);
> - if (err < 0)
> + err = set_mode(req->adapter, req->mode, req->msg);
> + if (err < 0) {
> reply = btd_error_failed(req->msg, strerror(-err));
> - else
> + goto proceed;
> + }
> +
> + if (!req->adapter->pending_mode) {
> reply = dbus_message_new_method_return(req->msg);
> + goto proceed;
> + }
> +
> + goto done;
>
> +proceed:
> + /*
> + * Send reply immidiately only if there was an error changing
> + * mode, or change is not needed. Otherwise, reply is sent in
> + * set_mode_complete.
> + */
> g_dbus_send_message(req->conn, reply);
>
> dbus_message_unref(req->msg);
> req->msg = NULL;
>
> +done:
> if (!find_session(req->adapter->mode_sessions, req->owner))
> session_unref(req);
> }
I think you can avoid all those gotos and make this code simpler. I'll
descride the steps that could be done without changing the behavior of
your original patch:
1) move if (!req->adapter->pending_mode) {...} block into the else
clause of the previous if(), i.e.:
if (err < 0) {
reply = btd_error_failed(req->msg, strerror(-err));
goto proceed;
} else if (!req->adapter->pending_mode) {
reply = dbus_message_new_method_return(req->msg);
goto proceed;
}
2) Now we can drop both "goto proceed" statements and the "proceed"
label, replacing with a if():
...
if (err < 0)
reply = btd_error_failed(req->msg, strerror(-err));
else if (!req->adapter->pending_mode)
reply = dbus_message_new_method_return(req->msg);
if (err < 0 || !req->adapter->pending_mode) {
/* your comment here; note there is a typo on the original
comment (immidiately -> immediately) */
g_dbus_send_message(req->conn, reply);
dbus_message_unref(req->msg);
req->msg = NULL;
}
...
3) finally you can drop the "goto done" and the "done" label as well.
Note that you changed the behavior of the original code regarding the
attribution of the "reply" variable. If the reply variable is
guaranteed to the NULL before the code code, I suppose you could
replace the " if (err < 0 || !req->adapter->pending_mode)" with just
"if (reply != NULL)".
Anyway, take this just as suggestion. I'm sure the logic can be
changed to avoid all those goto's and two labels.
Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply
* Re: HCI Le time out
From: Anderson Briglia @ 2011-03-01 15:20 UTC (permalink / raw)
To: Marco Sinigaglia; +Cc: linux-bluetooth
In-Reply-To: <4D6CFF69.1020503@csr.com>
Hi Marco,
On Tue, Mar 1, 2011 at 10:15 AM, Marco Sinigaglia
<marco.sinigaglia@csr.com> wrote:
> Hi All,
>
> I am using CSR 8505 A06 and, using LE, I have some timeout problems raised
> on hci.c.
> The following LE functions use a 100ms for the hci_send_req cmd.
> - hci_le_set_scan_parameters
> - hci_le_set_advertise_enable
> - hci_le_set_scan_enable
>
> The 100ms is not enough becouse the chip can be in deep sleep.
> Indeed, increasing it to 1000 the problem is fixed.
>
> Would be possible to check in this modifications?
I would suggest you to follow the patch submission guidelines [1]
before send modifications to this list. And if you are just starting
in bluez development, should read this:
http://www.bluez.org/development/
Regards,
Anderson Briglia
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/SubmittingPatches;hb=HEAD
>
> Cheers
> Marco Sinigaglia
>
>
> @@ -2646,7 +2645,7 @@
> rq.rparam = &status;
> rq.rlen = 1;
>
> - if (hci_send_req(dd, &rq, 100) < 0)
> + if (hci_send_req(dd, &rq, 1000) < 0)
> return -1;
>
> if (status) {
> @@ -2680,7 +2679,7 @@
> rq.rparam = &status;
> rq.rlen = 1;
>
> - if (hci_send_req(dd, &rq, 100) < 0)
> + if (hci_send_req(dd, &rq, 1000) < 0)
> return -1;
>
> if (status) {
> @@ -2708,7 +2707,7 @@
> rq.rparam = &status;
> rq.rlen = 1;
>
> - if (hci_send_req(dd, &rq, 100) < 0)
> + if (hci_send_req(dd, &rq, 1000) < 0)
> return -1;
>
>
>
> Member of the CSR plc group of companies. CSR plc registered in England and
> Wales, registered number 4187346, registered office Churchill House,
> Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
> --
> 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
>
--
INdT - Instituto Nokia de tecnologia
+55 2126 1122
http://techblog.briglia.net
^ permalink raw reply
* Re: [PATCH v2 0/4] Sim Access Profile
From: Harald Schmitt @ 2011-03-01 15:07 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
In-Reply-To: <1298549606-16594-1-git-send-email-waldemar.rymarkiewicz@tieto.com>
Hi,
> Here you are the SAP codes adjusted to previous comments and API change.
>
> /Waldek
>
>
> Waldemar Rymarkiewicz (4):
> Sim Access Profile API
> Sim Access Profile Manager
> Sim Access Profile Server
> Sim Access Profile dummy driver
>
> .gitignore | 1 +
> Makefile.am | 22 +-
> acinclude.m4 | 12 +
> doc/sap-api.txt | 34 ++
> sap/main.c | 55 +++
> sap/manager.c | 93 ++++
> sap/manager.h | 22 +
> sap/sap-dummy.c | 328 +++++++++++++
> sap/sap.h | 192 ++++++++
> sap/server.c | 1425 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> sap/server.h | 26 +
> 11 files changed, 2208 insertions(+), 2 deletions(-)
> create mode 100644 doc/sap-api.txt
> create mode 100644 sap/main.c
> create mode 100644 sap/manager.c
> create mode 100644 sap/manager.h
> create mode 100644 sap/sap-dummy.c
> create mode 100644 sap/sap.h
> create mode 100644 sap/server.c
> create mode 100644 sap/server.h
>
> --
> 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
>
Is there a chance to get comments on this?
Best Regards,
Harald
^ permalink raw reply
* Re: [PATCH 1/2] Move pcsuite drivers to its own plugin
From: Radoslaw Jablonski @ 2011-03-01 14:37 UTC (permalink / raw)
To: ext Luiz Augusto von Dentz; +Cc: linux-bluetooth, Luiz Augusto von Dentz
In-Reply-To: <AANLkTimu8tZT8BzycJ8ROFynrLgbHMfEK3JqU0PbkGuQ@mail.gmail.com>
Hi Luiz,
On 03/01/2011 04:31 PM, ext Luiz Augusto von Dentz wrote:
> Hi Radek,
>
> On Tue, Mar 1, 2011 at 11:23 AM, Radoslaw Jablonski
> <ext-jablonski.radoslaw@nokia.com> wrote:
>>
>> I've applied this patch and suddenly PC Suite stopped to discover if usb
>> cable is connected (no possibility to take backup/restore via usb cable).
>> In syslog there is no obexd logs in that scenario so hard to tell what
>> went wrong:) After reverting to obexd release, based on upstream,
>> everything started to work normally again.
>>
>> So, does other components (which are using this backup functionality)
>> need to make some changes to their code or something is wrong
>> with that patch?
> Did you remember to add --enable-pcsuite to rules, otherwise pcsuite
> plugin won't compile.
>
No, I haven't touched rules so that was source of my problems:)
Many thanks for quick response.
Radek
^ permalink raw reply
* Re: [PATCH 1/2] Move pcsuite drivers to its own plugin
From: Luiz Augusto von Dentz @ 2011-03-01 14:31 UTC (permalink / raw)
To: Radoslaw Jablonski; +Cc: linux-bluetooth, Luiz Augusto von Dentz
In-Reply-To: <4D6D016B.8010308@nokia.com>
Hi Radek,
On Tue, Mar 1, 2011 at 11:23 AM, Radoslaw Jablonski
<ext-jablonski.radoslaw@nokia.com> wrote:
> Hi Luiz,
>
> On 02/26/2011 09:49 PM, ext luiz.dentz@gmail.com wrote:
>>
>> From: Luiz Augusto von Dentz<luiz.dentz-von@nokia.com>
>>
>> This make it easier to enable/disable this funcionality as a whole.
>> ---
>> Makefile.am | 6 +-
>> configure.ac | 9 +-
>> plugins/ftp.c | 165 +---------------
>> plugins/ftp.h | 30 +++
>> plugins/nokia-backup.c | 309 -----------------------------
>> plugins/pcsuite.c | 515
>> ++++++++++++++++++++++++++++++++++++++++++++++++
>> 6 files changed, 561 insertions(+), 473 deletions(-)
>> create mode 100644 plugins/ftp.h
>> delete mode 100644 plugins/nokia-backup.c
>> create mode 100644 plugins/pcsuite.c
>
> I've applied this patch and suddenly PC Suite stopped to discover if usb
> cable is connected (no possibility to take backup/restore via usb cable).
> In syslog there is no obexd logs in that scenario so hard to tell what
> went wrong:) After reverting to obexd release, based on upstream,
> everything started to work normally again.
>
> So, does other components (which are using this backup functionality)
> need to make some changes to their code or something is wrong
> with that patch?
Did you remember to add --enable-pcsuite to rules, otherwise pcsuite
plugin won't compile.
--
Luiz Augusto von Dentz
Computer Engineer
^ permalink raw reply
* [PATCH] Fix response on adapter RequestSession method
From: Dmitriy Paliy @ 2011-03-01 14:25 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz; +Cc: Dmitriy Paliy
In-Reply-To: <1298989535-403-1-git-send-email-dmitriy.paliy@nokia.com>
Fixes response on adapter RequestSession method to be sent after mode is
changed, if such is necessary. More specifically change of power off mode
to power on is in question.
Currenty, response is sent when mode change is confirmed by agent, not by
response from controller. Such may lead to failed CreateDevice method if
it is called quickly enough after RequestSession when controller is in
powered off state.
New session is not created if there is already a session for such D-Bus
message.
---
src/adapter.c | 51 +++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 2e11832..e973aa3 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -452,6 +452,20 @@ static int adapter_set_mode(struct btd_adapter *adapter, uint8_t mode)
return 0;
}
+static struct session_req *find_session_by_msg(GSList *list, const DBusMessage *msg)
+{
+ GSList *l;
+
+ for (l = list; l; l = l->next) {
+ struct session_req *req = l->data;
+
+ if (req->msg == msg)
+ return req;
+ }
+
+ return NULL;
+}
+
static int set_mode(struct btd_adapter *adapter, uint8_t new_mode,
DBusMessage *msg)
{
@@ -496,11 +510,18 @@ done:
DBG("%s", modestr);
- if (msg != NULL)
- /* Wait for mode change to reply */
- adapter->pending_mode = create_session(adapter, connection,
- msg, new_mode, NULL);
- else
+ if (msg != NULL) {
+ struct session_req *req;
+
+ req = find_session_by_msg(adapter->mode_sessions, msg);
+ if (req) {
+ adapter->pending_mode = req;
+ session_ref(req);
+ } else
+ /* Wait for mode change to reply */
+ adapter->pending_mode = create_session(adapter,
+ connection, msg, new_mode, NULL);
+ } else
/* Nothing to reply just write the new mode */
adapter->mode = new_mode;
@@ -795,17 +816,31 @@ static void confirm_mode_cb(struct agent *agent, DBusError *derr, void *data)
return;
}
- err = set_mode(req->adapter, req->mode, NULL);
- if (err < 0)
+ err = set_mode(req->adapter, req->mode, req->msg);
+ if (err < 0) {
reply = btd_error_failed(req->msg, strerror(-err));
- else
+ goto proceed;
+ }
+
+ if (!req->adapter->pending_mode) {
reply = dbus_message_new_method_return(req->msg);
+ goto proceed;
+ }
+
+ goto done;
+proceed:
+ /*
+ * Send reply immidiately only if there was an error changing
+ * mode, or change is not needed. Otherwise, reply is sent in
+ * set_mode_complete.
+ */
g_dbus_send_message(req->conn, reply);
dbus_message_unref(req->msg);
req->msg = NULL;
+done:
if (!find_session(req->adapter->mode_sessions, req->owner))
session_unref(req);
}
--
1.7.1
^ permalink raw reply related
* [PATCH 0/1 v2] Fix response on adapter RequestSession method
From: Dmitriy Paliy @ 2011-03-01 14:25 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
Hi,
This submission is modified version accordingly to previous comments of
Luiz.
New session is not created if session for such message already exists,
instead of session for sender of such message.
Also, dbus_message_new_method_return is removed.
BR,
Dmitriy
^ permalink raw reply
* Re: [PATCH 00/11] mfd and bluetooth: Add CG2900 suppor
From: Arnd Bergmann @ 2011-03-01 14:23 UTC (permalink / raw)
To: Par-Gunnar HJALMDAHL
Cc: Linus Walleij, Vitaly Wool, Par-Gunnar Hjalmdahl, Samuel Ortiz,
Marcel Holtmann, Lee Jones, Alan Cox,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Lukasz Rymanowski, Pavan Savoy
In-Reply-To: <AFCDDB4A3EA003429EEF1E7B211FDBBA334C187A7F@EXDCVYMBSTM005.EQ1STM.local>
On Tuesday 01 March 2011, Par-Gunnar HJALMDAHL wrote:
> As you say, I think it could be good to put it into staging so we have
> a driver in place and then we can continue discussing the architecture from there.
Yes, makes sense.
Arnd
^ permalink raw reply
* Re: [PATCH 1/2] Move pcsuite drivers to its own plugin
From: Radoslaw Jablonski @ 2011-03-01 14:23 UTC (permalink / raw)
To: ext luiz.dentz@gmail.com; +Cc: linux-bluetooth, Luiz Augusto von Dentz
In-Reply-To: <1298749782-24129-3-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On 02/26/2011 09:49 PM, ext luiz.dentz@gmail.com wrote:
> From: Luiz Augusto von Dentz<luiz.dentz-von@nokia.com>
>
> This make it easier to enable/disable this funcionality as a whole.
> ---
> Makefile.am | 6 +-
> configure.ac | 9 +-
> plugins/ftp.c | 165 +---------------
> plugins/ftp.h | 30 +++
> plugins/nokia-backup.c | 309 -----------------------------
> plugins/pcsuite.c | 515 ++++++++++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 561 insertions(+), 473 deletions(-)
> create mode 100644 plugins/ftp.h
> delete mode 100644 plugins/nokia-backup.c
> create mode 100644 plugins/pcsuite.c
I've applied this patch and suddenly PC Suite stopped to discover if usb
cable is connected (no possibility to take backup/restore via usb cable).
In syslog there is no obexd logs in that scenario so hard to tell what
went wrong:) After reverting to obexd release, based on upstream,
everything started to work normally again.
So, does other components (which are using this backup functionality)
need to make some changes to their code or something is wrong
with that patch?
BR,
Radek
^ permalink raw reply
* HCI Le time out
From: Marco Sinigaglia @ 2011-03-01 14:15 UTC (permalink / raw)
To: linux-bluetooth
Hi All,
I am using CSR 8505 A06 and, using LE, I have some timeout problems
raised on hci.c.
The following LE functions use a 100ms for the hci_send_req cmd.
- hci_le_set_scan_parameters
- hci_le_set_advertise_enable
- hci_le_set_scan_enable
The 100ms is not enough becouse the chip can be in deep sleep.
Indeed, increasing it to 1000 the problem is fixed.
Would be possible to check in this modifications?
Cheers
Marco Sinigaglia
@@ -2646,7 +2645,7 @@
rq.rparam = &status;
rq.rlen = 1;
- if (hci_send_req(dd, &rq, 100) < 0)
+ if (hci_send_req(dd, &rq, 1000) < 0)
return -1;
if (status) {
@@ -2680,7 +2679,7 @@
rq.rparam = &status;
rq.rlen = 1;
- if (hci_send_req(dd, &rq, 100) < 0)
+ if (hci_send_req(dd, &rq, 1000) < 0)
return -1;
if (status) {
@@ -2708,7 +2707,7 @@
rq.rparam = &status;
rq.rlen = 1;
- if (hci_send_req(dd, &rq, 100) < 0)
+ if (hci_send_req(dd, &rq, 1000) < 0)
return -1;
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
^ permalink raw reply
* RE: [PATCH 00/11] mfd and bluetooth: Add CG2900 suppor
From: Par-Gunnar HJALMDAHL @ 2011-03-01 14:02 UTC (permalink / raw)
To: Linus Walleij, Vitaly Wool, Par-Gunnar Hjalmdahl
Cc: Samuel Ortiz, Marcel Holtmann, Lee Jones, Alan Cox, Arnd Bergmann,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Lukasz Rymanowski, Pavan Savoy
In-Reply-To: <AANLkTimcBL6D7bGGt-QSWDEE=nnpK0hy1CQZK_JEmEYA@mail.gmail.com>
As you say, I think it could be good to put it into staging so we have a dr=
iver in place and then we can continue discussing the architecture from the=
re.
/P-G
> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij@linaro.org]
> Sent: den 28 februari 2011 23:44
> To: Vitaly Wool; Par-Gunnar Hjalmdahl
> Cc: Par-Gunnar HJALMDAHL; Samuel Ortiz; Marcel Holtmann; Lee Jones;
> Alan Cox; Arnd Bergmann; linux-bluetooth@vger.kernel.org; linux-
> kernel@vger.kernel.org; Lukasz Rymanowski; Pavan Savoy
> Subject: Re: [PATCH 00/11] mfd and bluetooth: Add CG2900 suppor
>=20
> On Fri, Feb 25, 2011 at 6:55 PM, Vitaly Wool <vitalywool@gmail.com>
> wrote:
>=20
> > Making hardware work is, if course, a valid point, but porting a
> windows
> > driver would do that as well, and it's not the reason to pull windows
> > drivers' ports into mainline.
>=20
> Yeah hm, that sounds like it has "drivers/staging" printed all over it
> then,
> so either we solve these issues or we need to put it into staging so we
> can get help from others in fixing it up (we have a similar situation
> with
> the U8500 graphics stuff).
>=20
> P-G do you think it would be proper to take this into staging for the
> moment, or do you prefer to drive it outside the mainline kernel tree
> until
> it lands in the proper place(s)?
>=20
> Yours,
> Linus Walleij
^ permalink raw reply
* [PATCH] TODO: Fix GATT over BR/EDR
From: Claudio Takahasi @ 2011-03-01 13:28 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Claudio Takahasi
---
Needs to be applied after: "[PATCH 4/4] TODO: Add item to implement device
type in the DeviceFound signal"
TODO | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/TODO b/TODO
index 4e3585e..1c22c86 100644
--- a/TODO
+++ b/TODO
@@ -120,9 +120,12 @@ Low Energy
ATT/GATT
========
-- For BR/EDR, Discover All Primary Services shall be started after SDP if the
- remote device exports a Generic Attribute Profile service record. It is
- applied to CreateDevice and CreatePairedDevice.
+- For BR/EDR, primary services can be registered based on the information
+ extracted from the service records. UUIDs, start and end handles information
+ are available in the record, Discover All Primary Services procedure is not
+ necessary. If a GATT service doesn't export a service record means that
+ it should not be used over BR/EDR. Don't start this task before to move the
+ attribute client code to the bluetoothd core.
Priority: Medium
Complexity: C1
--
1.7.4.1
^ permalink raw reply related
* [PATCH] compat-wireless: rt2800pci (and rt2x00pci) don't unload on 'make unload'
From: Greg Whiteley @ 2011-03-01 9:12 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, linux-bluetooth, Greg Whiteley
Add missing module names to scripts/unload.sh
Signed-off-by: Greg Whiteley
---
scripts/unload.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/unload.sh b/scripts/unload.sh
index 2af748a..abc5e72 100755
--- a/scripts/unload.sh
+++ b/scripts/unload.sh
@@ -21,8 +21,8 @@ MODULES="$MODULES ath5k ath ath6kl ar9170usb carl9170"
MODULES="$MODULES p54pci p54usb p54spi p54common"
MODULES="$MODULES rt2400pci rt2500pci rt61pci"
MODULES="$MODULES rt2500usb rt73usb"
-MODULES="$MODULES rt2800usb rt2800lib"
-MODULES="$MODULES rt2x00usb rt2x00lib"
+MODULES="$MODULES rt2800usb rt2800pci rt2800lib"
+MODULES="$MODULES rt2x00usb rt2x00pci rt2x00lib"
MODULES="$MODULES rtl8180 rtl8187 rtl8192ce rtlwifi"
MODULES="$MODULES mwl8k mac80211_hwsim"
MODULES="$MODULES at76c50x_usb at76_usb"
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH] linux-firmware: Add patch and sysconfig files for AR3012.
From: Bala Shanmugam @ 2011-03-01 6:41 UTC (permalink / raw)
To: Shanmugamkamatchi Balashanmugam
Cc: dwmw2@infradead.org, Jothikumar Mothilal,
linux-bluetooth@vger.kernel.org
In-Reply-To: <4D5A4625.4060104@atheros.com>
Hi David,
On 2/15/2011 2:53 PM, Shanmugamkamatchi Balashanmugam wrote:
> Hi David,
>
> On 2/9/2011 4:24 PM, Shanmugamkamatchi Balashanmugam wrote:
>> Signed-off-by: Bala Shanmugam<sbalashanmugam@atheros.com>
>> ---
>> WHENCE | 9 +++++++++
>> ar3k/AthrBT_0x01020001.dfu | Bin 0 -> 55244 bytes
>> ar3k/ramps_0x01020001_26.dfu | Bin 0 -> 1224 bytes
>> 3 files changed, 9 insertions(+), 0 deletions(-)
>> create mode 100644 ar3k/AthrBT_0x01020001.dfu
>> create mode 100644 ar3k/ramps_0x01020001_26.dfu
>>
>> diff --git a/WHENCE b/WHENCE
>> index 1cbd0a6..2de0bea 100644
>> --- a/WHENCE
>> +++ b/WHENCE
>> @@ -1534,3 +1534,12 @@ Driver: vt6656 - VIA VT6656 USB wireless driver
>> File: vntwusb.fw
>>
>> Licence: Redistributable. See LICENCE.via_vt6656 for details.
>> +
>> +--------------------------------------------------------------------------
>> +
>> +Driver: DFU Driver for Atheros bluetooth chipset AR3012
>> +
>> +File: ar3k/AthrBT_0x01020001.dfu
>> +File: ar3k/ramps_0x01020001_26.dfu
>> +
> Driver changes for AR3012 have been upstreamed.
> Can you please upstream above patch?
>
> Regards,
> Bala.
Can you please upstream this patch.
We have few releases waiting.
If you have any concerns in upstreaming it, please let me know.
Regards,
Bala.
^ permalink raw reply
* Re: [PATCH] linux-firmware: Remove ath3k-2.fw
From: Bala Shanmugam @ 2011-03-01 6:38 UTC (permalink / raw)
To: David Woodhouse
Cc: linux-bluetooth@vger.kernel.org, Jothikumar Mothilal,
Vikram Kandukuri
In-Reply-To: <4D4A60E1.3080000@atheros.com>
On 2/3/2011 1:31 PM, Bala Shanmugam wrote:
> On 2/3/2011 1:13 PM, David Woodhouse wrote:
>> On Fri, 2011-01-28 at 15:03 +0530, Bala Shanmugam wrote:
>>> ath3k-2.fw is obsolete and not use by Atheros chipsets
>>> anymore.
>> Are you telling me that there is no extant hardware, and no old kernels,
>> which would use this? It was added to the linux-firmware tree and
>> *never* used?
>>
> Yes David, no older kernel uses this firmware.
> We thought to have new firmware file for newer versions but
> our driver patch was not accepted and we decided to
> have single firmware for this chipset [ath3k-1.fw].
>
> Thanks and Regards,
> Bala.
>
>
Hi David,
Can you please remove this firmware.
If you have any concerns please let me know.
Regards,
Bala.
^ permalink raw reply
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