* Re: [PATCH] Fix handling empty fields in VCARDs
From: Johan Hedberg @ 2010-08-26 8:15 UTC (permalink / raw)
To: Lukasz Pawlik; +Cc: linux-bluetooth
In-Reply-To: <AANLkTimB9Tvxt6zZKzfHwhGc_j8MnGTo1DbeH-pYoQpe@mail.gmail.com>
Hi Lukasz,
> From 4bb29cdaf4a9923ab62973c38914ebb67f718d64 Mon Sep 17 00:00:00 2001
> From: Lukasz Pawlik <lucas.pawlik@gmail.com>
> Date: Thu, 26 Aug 2010 09:10:26 +0200
> Subject: [PATCH] Fix handling empty fields in VCARDs
>
> Previously even mandatory TEL field was not printed in VCARD if it was
> empty. This patch fix this. Now tag TEL will be printed if phone number
> is not set in phonebook. This patch also fix handling category string
> for VCARDs in version 2.1 for url field.
> ---
> plugins/vcard.c | 51 ++++++++++++++++++++++++++++++++-------------------
> 1 files changed, 32 insertions(+), 19 deletions(-)
In general the patch seems fine, but you need to fix your editor
settings when dealing with BlueZ code. It seems like you're using spaces
for indentation when the coding style is tabs-only:
> - for (l = contact->numbers; l; l = l->next) {
> + if (g_slist_length(l) == 0)
> + vcard_printf_number(vcards, format, NULL, 1,
> + TEL_TYPE_OTHER);
All of the above three added lines are indented with spaces.
> + for (; l; l = l->next) {
This added line is indented with tabs. How did you manage to get your
editor to produce such mixed results?
> + if (g_slist_length(l) == 0)
> + vcard_printf_email(vcards, format, NULL,
> + EMAIL_TYPE_OTHER);
The first line is tabs but the two others use spaces!?
> - for (l = contact->emails; l; l = l->next){
> + for (; l; l = l->next){
Again spaces here.
Please enable whitespace visualization and use proper editor settings to
avoid these issues in the future. Thanks.
Johan
^ permalink raw reply
* [PATCH] Fix handling empty fields in VCARDs
From: Lukasz Pawlik @ 2010-08-26 7:45 UTC (permalink / raw)
To: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-Fix-handling-empty-fields-in-VCARDs.patch --]
[-- Type: text/x-patch, Size: 5038 bytes --]
From 4bb29cdaf4a9923ab62973c38914ebb67f718d64 Mon Sep 17 00:00:00 2001
From: Lukasz Pawlik <lucas.pawlik@gmail.com>
Date: Thu, 26 Aug 2010 09:10:26 +0200
Subject: [PATCH] Fix handling empty fields in VCARDs
Previously even mandatory TEL field was not printed in VCARD if it was
empty. This patch fix this. Now tag TEL will be printed if phone number
is not set in phonebook. This patch also fix handling category string
for VCARDs in version 2.1 for url field.
---
plugins/vcard.c | 51 ++++++++++++++++++++++++++++++++-------------------
1 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/plugins/vcard.c b/plugins/vcard.c
index a20ab4d..a163d1b 100644
--- a/plugins/vcard.c
+++ b/plugins/vcard.c
@@ -256,7 +256,7 @@ static void vcard_printf_number(GString *vcards, uint8_t format,
vcard_printf(vcards, buf, number);
}
-static void vcard_printf_tag(GString *vcards, const char *tag,
+static void vcard_printf_tag(GString *vcards, uint8_t format, const char *tag,
const char *category, const char *fld)
{
char *separator = "", *type = "";
@@ -265,9 +265,10 @@ static void vcard_printf_tag(GString *vcards, const char *tag,
if (tag == NULL || strlen(tag) == 0)
return;
- if (fld == NULL || strlen(fld) == 0)
+ if (fld == NULL || strlen(fld) == 0){
+ vcard_printf(vcards, "%s:", tag);
return;
-
+ }
if (category && strlen(category)) {
separator = ";";
type = "TYPE=";
@@ -280,8 +281,9 @@ static void vcard_printf_tag(GString *vcards, const char *tag,
vcard_printf(vcards, "%s:%s", buf, fld);
}
-static void vcard_printf_slash_tag(GString *vcards, const char *tag,
- const char *category, const char *fld)
+static void vcard_printf_slash_tag(GString *vcards, uint8_t format,
+ const char *tag, const char *category,
+ const char *fld)
{
int len;
char *separator = "", *type = "";
@@ -290,9 +292,10 @@ static void vcard_printf_slash_tag(GString *vcards, const char *tag,
if (tag == NULL || strlen(tag) == 0)
return;
- if (fld == NULL || (len = strlen(fld)) == 0)
+ if (fld == NULL || (len = strlen(fld)) == 0){
+ vcard_printf(vcards, "%s:", tag);
return;
-
+ }
if (category && strlen(category)) {
separator = ";";
type = "TYPE=";
@@ -314,9 +317,10 @@ static void vcard_printf_email(GString *vcards, uint8_t format,
char field[LEN_MAX];
int len = 0;
- if (!address || !(len = strlen(address)))
+ if (!address || !(len = strlen(address))){
+ vcard_printf(vcards, "EMAIL:");
return;
-
+ }
switch (category){
case EMAIL_TYPE_HOME:
if (format == FORMAT_VCARD21)
@@ -358,9 +362,10 @@ static gboolean org_fields_present(struct phonebook_contact *contact)
static void vcard_printf_org(GString *vcards,
struct phonebook_contact *contact)
{
- if (org_fields_present(contact) == FALSE)
+ if (org_fields_present(contact) == FALSE){
+ vcard_printf(vcards, "ORG:");
return;
-
+ }
vcard_printf(vcards, "ORG:%s;%s;%s", contact->company,
contact->department, contact->title);
}
@@ -428,9 +433,13 @@ void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact,
vcard_printf_fullname(vcards, contact->fullname);
if (filter & FILTER_TEL) {
- GSList *l;
+ GSList *l = contact->numbers;
- for (l = contact->numbers; l; l = l->next) {
+ if (g_slist_length(l) == 0)
+ vcard_printf_number(vcards, format, NULL, 1,
+ TEL_TYPE_OTHER);
+
+ for (; l; l = l->next) {
struct phonebook_number *number = l->data;
vcard_printf_number(vcards, format, number->tel, 1,
@@ -439,9 +448,13 @@ void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact,
}
if (filter & FILTER_EMAIL) {
- GSList *l;
+ GSList *l = contact->emails;
+
+ if (g_slist_length(l) == 0)
+ vcard_printf_email(vcards, format, NULL,
+ EMAIL_TYPE_OTHER);
- for (l = contact->emails; l; l = l->next){
+ for (; l; l = l->next){
struct phonebook_email *email = l->data;
vcard_printf_email(vcards, format, email->address, email->type);
@@ -452,18 +465,18 @@ void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact,
vcard_printf_adr(vcards, contact);
if (filter & FILTER_BDAY)
- vcard_printf_tag(vcards, "BDAY", NULL, contact->birthday);
+ vcard_printf_tag(vcards, format, "BDAY", NULL, contact->birthday);
if (filter & FILTER_NICKNAME)
- vcard_printf_slash_tag(vcards, "NICKNAME", NULL,
+ vcard_printf_slash_tag(vcards, format, "NICKNAME", NULL,
contact->nickname);
if (filter & FILTER_URL)
- vcard_printf_slash_tag(vcards, "URL", "INTERNET",
+ vcard_printf_slash_tag(vcards, format, "URL", "INTERNET",
contact->website);
if (filter & FILTER_PHOTO)
- vcard_printf_tag(vcards, "PHOTO", NULL, contact->photo);
+ vcard_printf_tag(vcards, format, "PHOTO", NULL, contact->photo);
if (filter & FILTER_ORG)
vcard_printf_org(vcards, contact);
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH 02/22] Add eL2cap new features macro definition
From: haijun liu @ 2010-08-26 6:59 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <20100826010116.GC16062@vigoh>
Hi Gustavo,
On Thu, Aug 26, 2010 at 9:01 AM, Gustavo F. Padovan
<padovan@profusion.mobi> wrote:
>
> We don't need the L2CAP_FEAT_RESERVED here.
>
Thank you, we'll remove it.
^ permalink raw reply
* New subscription request to list Bluez-devel from tang705@yahoo.com.cn
From: bluez-devel-owner @ 2010-08-26 2:57 UTC (permalink / raw)
To: bluez-devel-owner
Your authorization is required for a mailing list subscription request
approval:
For: tang705@yahoo.com.cn
List: bluez-devel@lists.sourceforge.net
At your convenience, visit:
https://lists.sourceforge.net/lists/admindb/bluez-devel
to process the request.
^ permalink raw reply
* Re: [PATCH 17/22] Add parameter enable_highspeed to control highspeed code in running phase
From: Gustavo F. Padovan @ 2010-08-26 1:28 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTinaFobBK5OiFaV+fGsEe3JRTy7_dT-FFLjSt-Rq@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:38:27 +0800]:
> From c3fba9b5d7546576d9eb1d30eb45c453c8ee1dff Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Mon, 23 Aug 2010 00:17:24 +0800
> Subject: [PATCH 17/22] Add parameter enable_highspeed to control
> highspeed code in running phase.
>
> ---
> net/bluetooth/l2cap.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
> index 449cbdd..e7f7067 100644
> --- a/net/bluetooth/l2cap.c
> +++ b/net/bluetooth/l2cap.c
> @@ -4851,6 +4851,9 @@ module_exit(l2cap_exit);
> module_param(enable_ertm, bool, 0644);
> MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode");
>
> +module_param(enable_highspeed, bool, 0644);
> +MODULE_PARM_DESC(enable_highspeed, "Enable Bluetooth V3.0+HS
> highspeed feature");
I did not run this code, but I'm sure that this patch doesn't compile. ;)
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 22/22] Parse EFS & EWS parameters for in l2cap_parse_conf_rsp
From: Gustavo F. Padovan @ 2010-08-26 1:26 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTimQsNmOc-Mv30xA0x_NEpxvs4kXjGfuOfqHxEDP@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:41:02 +0800]:
> From 72afc40895eb272269156b98ab3024ac4f130b0d Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Wed, 25 Aug 2010 22:08:47 +0800
> Subject: [PATCH 22/22] Parse EFS & EWS parameters for in l2cap_parse_conf_rsp.
>
> ---
> net/bluetooth/l2cap.c | 35 ++++++++++++++++++++++++++++++-----
> 1 files changed, 30 insertions(+), 5 deletions(-)
For 20, 21 and 22. Create a separeted patches for EFS and EWS, they are
different stuff and do not overstep the column 80 when coding.
Fix that and the we can do another review ;)
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 16/22] Store new configuration values in l2cap_pinfo
From: Gustavo F. Padovan @ 2010-08-26 1:21 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTimnW0jk19cDG+r64Q+-HxdH2qdTBirTMB7ikr1W@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:37:30 +0800]:
> From d093975dde6d85c824a5aaac943d676100810010 Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Mon, 23 Aug 2010 00:09:56 +0800
> Subject: [PATCH 16/22] Store new configuration values in l2cap_pinfo.
>
> ---
> include/net/bluetooth/l2cap.h | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index 2d864d4..f2dd65d 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -406,6 +406,15 @@ struct l2cap_pinfo {
> __u16 remote_mps;
> __u16 mps;
>
> + __u8 ext_flowspec_enable;
> + struct ext_flow_spec loc_efs;
> + struct ext_flow_spec rem_efs;
> +
> + __u8 extwin_enable;
> + __u16 extwin_size;
> + __u8 rem_extwin_enable;
> + __u16 rem_extwin_size;
The same comment in 14/22 goes here and others patches in the patch set.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 14/22] Add three new options for l2cap_pinfo
From: Gustavo F. Padovan @ 2010-08-26 1:13 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTikf=UeHUaT8wLnwUDnxgg0ouz1f6QkgYZvbr8t8@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:36:35 +0800]:
> From 06124ba36c1f6c9cf5bef861751ce749712cecb0 Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Mon, 23 Aug 2010 00:03:39 +0800
> Subject: [PATCH 14/22] Add three new options for l2cap_pinfo.
>
> ---
> include/net/bluetooth/l2cap.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index 4f87aec..7a9bec4 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -367,6 +367,10 @@ struct l2cap_pinfo {
> __u8 num_conf_req;
> __u8 num_conf_rsp;
>
> + __u8 hschan_req;
> + __u8 guaranteed;
> + __u8 reconfig;
> +
The same here, you have to explain why you to increase struct l2cap_pinfo
size, and maybe only add them when you have a piece of code that uses
that.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 13/22] Add three new options for l2cap_options which used in setsockopt & getsockopt
From: Gustavo F. Padovan @ 2010-08-26 1:10 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTi=8xVks--xcLXEQ_=sHfP3fY+Wvyctu5K_kMDG-@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:36:05 +0800]:
> From 897b281d14ba4cf9a5fbbf5ba65b84c85e688737 Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Mon, 23 Aug 2010 00:00:26 +0800
> Subject: [PATCH 13/22] Add three new options for l2cap_options which
> used in setsockopt & getsockopt.
>
> ---
> include/net/bluetooth/l2cap.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index d0ae9f5..4f87aec 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -65,6 +65,9 @@ struct l2cap_options {
> __u8 fcs;
> __u8 max_tx;
> __u16 txwin_size;
> + __u8 hschan_req;
> + __u8 guaranteed;
> + __u8 reconfig;
> };
Here you are extending the API with the userspace, so we need a patch
for each option explaining why you need it and why the userspace should
care about that. It's a good idea here add this option to l2cap_options
in the same patch you implement the handling for it apply such patch hen
it is actually needed. ;)
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 12/22] Add some default values for configuration process
From: Gustavo F. Padovan @ 2010-08-26 1:04 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTikAZBO6dka+yN3tFTZekm9+1nzo3=OZEoxZ1Eab@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:35:34 +0800]:
> From 2d21459fa52b754ce0f666ccefc0175bc7f04420 Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Sun, 22 Aug 2010 23:57:09 +0800
> Subject: [PATCH 12/22] Add some default values for configuration process.
>
> ---
> include/net/bluetooth/l2cap.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index fe411e2..d0ae9f5 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -36,6 +36,11 @@
> #define L2CAP_DEFAULT_MAX_PDU_SIZE 672
> #define L2CAP_DEFAULT_ACK_TO 200
> #define L2CAP_LOCAL_BUSY_TRIES 12
> +#define L2CAP_DEFAULT_MAX_SDU_SIZE 0xFFFF
> +#define L2CAP_DEFAULT_SDU_ARRIVAL_TIME 0xFFFFFFFF
> +#define L2CAP_DEFAULT_FLUSH_TIMEOUT 0xFFFFFFFF
We already have L2CAP_DEFAULT_FLUSH_TO with the same value.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 02/22] Add eL2cap new features macro definition
From: Gustavo F. Padovan @ 2010-08-26 1:01 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTi=qOgovmY3s3PcS4tGb59HUhxx-Qydr2NyNs9Me@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:27:35 +0800]:
> From fb2a4d17435dbd6d8787e6928c1da4f12a839265 Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Wed, 18 Aug 2010 22:33:22 +0800
> Subject: [PATCH 02/22] Add eL2cap new features macro definition.
>
> ---
> include/net/bluetooth/l2cap.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index bf0ea10..2e782d0 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -99,7 +99,11 @@ struct l2cap_conninfo {
> #define L2CAP_FEAT_ERTM 0x00000008
> #define L2CAP_FEAT_STREAMING 0x00000010
> #define L2CAP_FEAT_FCS 0x00000020
> +#define L2CAP_FEAT_EFS_BREDR 0x00000040
> #define L2CAP_FEAT_FIXED_CHAN 0x00000080
> +#define L2CAP_FEAT_EXT_WINSIZE 0x00000100
> +#define L2CAP_FEAT_UCDR 0x00000200
> +#define L2CAP_FEAT_RESERVED 0x80000000
We don't need the L2CAP_FEAT_RESERVED here.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 01/22] Add eL2cap signal macro definition
From: Gustavo F. Padovan @ 2010-08-26 0:57 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTinpXB4ZXW=Oarn0qZAWWdRrr1JL1SB7mu9KSj08@mail.gmail.com>
Hi Haijun,
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:22:27 +0800]:
> From 0ce1315590e4bfe0d344acad7e770710833795aa Mon Sep 17 00:00:00 2001
> From: haijun <haijun@haijun-laptop.(none)>
> Date: Wed, 18 Aug 2010 22:26:19 +0800
> Subject: [PATCH 01/22] Add eL2cap signal macro definition.
>
> ---
> include/net/bluetooth/l2cap.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
Please use L2CAP instead eL2CAP.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 22/22] Parse EFS & EWS parameters for in l2cap_parse_conf_rsp
From: Gustavo F. Padovan @ 2010-08-26 0:55 UTC (permalink / raw)
To: haijun liu; +Cc: linux-bluetooth
In-Reply-To: <AANLkTimQsNmOc-Mv30xA0x_NEpxvs4kXjGfuOfqHxEDP@mail.gmail.com>
* haijun liu <liuhaijun.er@gmail.com> [2010-08-26 06:41:02 +0800]:
> From 72afc40895eb272269156b98ab3024ac4f130b0d Mon Sep 17 00:00:00 2001
> From: haijun.liu <haijun.liu@atheros.com>
> Date: Wed, 25 Aug 2010 22:08:47 +0800
> Subject: [PATCH 22/22] Parse EFS & EWS parameters for in l2cap_parse_conf_rsp.
>
> ---
> net/bluetooth/l2cap.c | 35 ++++++++++++++++++++++++++++++-----
> 1 files changed, 30 insertions(+), 5 deletions(-)
For all patches here, please write a proper commit title and message in
your patches. The subject should always start with "Bluetooth:" and then
briefly describe your changes in the patch. It's recommended to not use
more than 50 letters in the subject and never use more than 72 letters.
And then you have the commit message, there you explain everything it's
needed to understand the patch.
Also you need a Signed-off-by line in the commit, and fixes your git
configuration to show your name instead of your email id.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* [PATCH 22/22] Parse EFS & EWS parameters for in l2cap_parse_conf_rsp
From: haijun liu @ 2010-08-25 22:41 UTC (permalink / raw)
To: linux-bluetooth
>From 72afc40895eb272269156b98ab3024ac4f130b0d Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Wed, 25 Aug 2010 22:08:47 +0800
Subject: [PATCH 22/22] Parse EFS & EWS parameters for in l2cap_parse_conf_rsp.
---
net/bluetooth/l2cap.c | 35 ++++++++++++++++++++++++++++++-----
1 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index d66d923..e21aed0 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2896,6 +2896,7 @@ static int l2cap_parse_conf_rsp(struct sock *sk,
void *rsp, int len, void *data,
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc;
+ struct l2cap_conf_efs efs;
BT_DBG("sk %p, rsp %p, len %d, req %p", sk, rsp, len, data);
@@ -2926,18 +2927,34 @@ static int l2cap_parse_conf_rsp(struct sock
*sk, void *rsp, int len, void *data,
rfc.mode != pi->mode)
return -ECONNREFUSED;
+ pi->mode = rfc.mode;
pi->fcs = 0;
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
sizeof(rfc), (unsigned long) &rfc);
break;
- }
- }
- if (pi->mode == L2CAP_MODE_BASIC && pi->mode != rfc.mode)
- return -ECONNREFUSED;
+ case L2CAP_CONF_EFS:
+ if (olen == sizeof(efs))
+ memcpy(&efs, (void *)val, olen);
- pi->mode = rfc.mode;
+ if (pi->loc_efs.service_type != L2CAP_SERVTYPE_NOTRAFIC &&
+ efs.service_type != L2CAP_SERVTYPE_NOTRAFIC &&
+ efs.service_type != pi->loc_efs.service_type)
+ return -ECONNREFUSED;
+
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+ sizeof(efs), (unsigned long) &efs);
+ break;
+
+ case L2CAP_CONF_EWS:
+ pi->extwin_size = val;
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS,
+ 2, pi->extwin_size);
+ break;
+
+ }
+ }
if (*result == L2CAP_CONF_SUCCESS) {
switch (rfc.mode) {
@@ -2946,6 +2963,14 @@ static int l2cap_parse_conf_rsp(struct sock
*sk, void *rsp, int len, void *data,
pi->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
pi->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
pi->mps = le16_to_cpu(rfc.max_pdu_size);
+ if (pi->ext_flowspec_enable) {
+ /* id, service type should not be changed */
+ pi->loc_efs.max_sdu_size = le16_to_cpu(efs.max_sdu_size);
+ pi->loc_efs.sdu_inter_time = le16_to_cpu(efs.sdu_inter_time);
+ pi->loc_efs.access_latency = le16_to_cpu(efs.access_latency);
+ pi->loc_efs.flush_timeout = le16_to_cpu(efs.flush_timeout);
+ }
+
break;
case L2CAP_MODE_STREAMING:
pi->mps = le16_to_cpu(rfc.max_pdu_size);
--
1.6.3.3
^ permalink raw reply related
* [PATCH 21/22] Parse EFS & EWS parameters for in l2cap_parse_conf_req
From: haijun liu @ 2010-08-25 22:40 UTC (permalink / raw)
To: linux-bluetooth
>From c3c9a97f3dfda527da2f9c4893302cde56e24198 Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Wed, 25 Aug 2010 21:59:19 +0800
Subject: [PATCH 21/22] Parse EFS & EWS parameters for in l2cap_parse_conf_req.
---
net/bluetooth/l2cap.c | 100 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 93 insertions(+), 7 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 73142ae..d66d923 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2660,6 +2660,9 @@ static int l2cap_parse_conf_req(struct sock *sk,
void *data)
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
u16 mtu = L2CAP_DEFAULT_MTU;
+ struct l2cap_conf_efs efs = { .service_type = L2CAP_SERVTYPE_BESTEFFORT };
+ u8 ext_flowspec_enable = 0;
+ u16 extwin_size = 0;
u16 result = L2CAP_CONF_SUCCESS;
BT_DBG("sk %p", sk);
@@ -2693,6 +2696,17 @@ static int l2cap_parse_conf_req(struct sock
*sk, void *data)
break;
+ case L2CAP_CONF_EFS:
+ /* handle the extended flow spec mode */
+ ext_flowspec_enable = 1;
+ if (olen == sizeof(efs))
+ memcpy(&efs, (void *) val, olen);
+ break;
+
+ case L2CAP_CONF_EWS:
+ extwin_size = val;
+ break;
+
default:
if (hint)
break;
@@ -2709,16 +2723,29 @@ static int l2cap_parse_conf_req(struct sock
*sk, void *data)
switch (pi->mode) {
case L2CAP_MODE_STREAMING:
case L2CAP_MODE_ERTM:
- if (!(pi->conf_state & L2CAP_CONF_STATE2_DEVICE)) {
- pi->mode = l2cap_select_mode(rfc.mode,
- pi->conn->feat_mask);
- break;
+ pi->conf_state |= L2CAP_CONF_STATE2_DEVICE;
+ if (enable_highspeed && ext_flowspec_enable && pi->hschan_req) {
+ pi->ext_flowspec_enable = 1;
+
+ pi->loc_efs.service_type = (!pi->guaranteed) ?
+ L2CAP_SERVTYPE_BESTEFFORT : L2CAP_SERVTYPE_GUARANTEED;
+ pi->loc_efs.max_sdu_size = L2CAP_DEFAULT_MAX_SDU_SIZE;
+ pi->loc_efs.sdu_inter_time = L2CAP_DEFAULT_SDU_ARRIVAL_TIME;
+ pi->loc_efs.access_latency = L2CAP_DEFAULT_ACCESS_LATENCY;
+ pi->loc_efs.flush_timeout = L2CAP_DEFAULT_FLUSH_TIMEOUT;
+ }
+ if (enable_highspeed && (pi->conn->feat_mask & L2CAP_FEAT_EXT_WINSIZE)) {
+ pi->extwin_enable = 1;
+ pi->extwin_size = L2CAP_DEFAULT_EXT_WINSIZE;
}
- if (pi->mode != rfc.mode)
+ if (!l2cap_mode_supported(pi->mode, pi->conn->feat_mask))
return -ECONNREFUSED;
break;
+ default:
+ pi->mode = l2cap_select_mode(sk, rfc.mode, pi->conn->feat_mask);
+ break;
}
done:
@@ -2733,8 +2760,36 @@ done:
sizeof(rfc), (unsigned long) &rfc);
}
+ /*
+ Add the ext flow spec and ext win size option parameters check here.
+ */
+
+ if (result == L2CAP_CONF_SUCCESS && ext_flowspec_enable) {
+ if (!pi->ext_flowspec_enable) {
+ /* remote support , local not support, refused */
+
+ result = L2CAP_CONF_REJECT;
+ return -ECONNREFUSED;
+ } else if (pi->loc_efs.service_type != L2CAP_SERVTYPE_NOTRAFIC &&
+ efs.service_type != L2CAP_SERVTYPE_NOTRAFIC &&
+ efs.service_type != pi->loc_efs.service_type) {
+
+ result = L2CAP_CONF_UNACCEPT;
+
+ if (pi->num_conf_req >= 1)
+ return -ECONNREFUSED;
+
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+ sizeof(efs), (unsigned long) &efs);
+
+ } else {
+ result = L2CAP_CONF_PENDING;
+ pi->conf_state |= L2CAP_CONF_LOCAL_PEND;
+ }
+ }
- if (result == L2CAP_CONF_SUCCESS) {
+
+ if (result == L2CAP_CONF_SUCCESS || result == L2CAP_CONF_PENDING) {
/* Configure output options and let the other side know
* which ones we don't like. */
@@ -2770,6 +2825,22 @@ done:
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
sizeof(rfc), (unsigned long) &rfc);
+ if (pi->ext_flowspec_enable) {
+ /* record the extend flow spec parameters */
+ pi->rem_efs.id = efs.id;
+ pi->rem_efs.service_type = efs.service_type;
+ pi->rem_efs.max_sdu_size = le16_to_cpu(efs.max_sdu_size);
+ pi->rem_efs.flush_timeout = le16_to_cpu(efs.flush_timeout);
+ pi->rem_efs.access_latency = le16_to_cpu(efs.access_latency);
+ pi->rem_efs.sdu_inter_time = le16_to_cpu(efs.sdu_inter_time);
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+ sizeof(efs), (unsigned long) &efs);
+ }
+ if (extwin_size > 0) {
+ pi->rem_extwin_enable = 1;
+ pi->rem_extwin_size = extwin_size;
+ pi->conf_state |= L2CAP_CONF_EXTWINSIZE_DONE;
+ }
break;
case L2CAP_MODE_STREAMING:
@@ -2782,7 +2853,22 @@ done:
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
sizeof(rfc), (unsigned long) &rfc);
-
+ if (pi->ext_flowspec_enable) {
+ /* record the extend flow spec parameters */
+ pi->rem_efs.id = efs.id;
+ pi->rem_efs.service_type = efs.service_type;
+ pi->rem_efs.max_sdu_size = le16_to_cpu(efs.max_sdu_size);
+ pi->rem_efs.flush_timeout = le16_to_cpu(efs.flush_timeout);
+ pi->rem_efs.access_latency = le16_to_cpu(efs.access_latency);
+ pi->rem_efs.sdu_inter_time = le16_to_cpu(efs.sdu_inter_time);
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+ sizeof(efs), (unsigned long) &efs);
+ }
+ if (extwin_size == 0) {
+ pi->rem_extwin_enable = 1;
+ pi->rem_extwin_size = extwin_size;
+ pi->conf_state |= L2CAP_CONF_EXTWINSIZE_DONE;
+ }
break;
default:
--
1.6.3.3
^ permalink raw reply related
* [PATCH 20/22] Add EFS & EWS config parameters for ERTM & Streaming modes in l2cap_build_conf_req
From: haijun liu @ 2010-08-25 22:40 UTC (permalink / raw)
To: linux-bluetooth
>From 74b6581d7fdb0d3e5c0cd9546b15d58357c3758c Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Tue, 24 Aug 2010 15:52:49 +0800
Subject: [PATCH 20/22] Add EFS & EWS config parameters for ERTM &
Streaming modes in l2cap_build_conf_req.
---
net/bluetooth/l2cap.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 64 insertions(+), 3 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index e7f7067..73142ae 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2500,6 +2500,7 @@ static int l2cap_build_conf_req(struct sock *sk,
void *data)
struct l2cap_pinfo *pi = l2cap_pi(sk);
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = pi->mode };
+ struct l2cap_conf_efs efs = { .service_type = L2CAP_SERVTYPE_BESTEFFORT };
void *ptr = req->data;
BT_DBG("sk %p", sk);
@@ -2510,10 +2511,25 @@ static int l2cap_build_conf_req(struct sock
*sk, void *data)
switch (pi->mode) {
case L2CAP_MODE_STREAMING:
case L2CAP_MODE_ERTM:
- if (pi->conf_state & L2CAP_CONF_STATE2_DEVICE)
- break;
+ pi->conf_state |= L2CAP_CONF_STATE2_DEVICE;
- /* fall through */
+ if (enable_highspeed && pi->hschan_req) {
+ pi->ext_flowspec_enable = 1;
+
+ pi->loc_efs.service_type = (!pi->guaranteed) ?
+ L2CAP_SERVTYPE_BESTEFFORT : L2CAP_SERVTYPE_GUARANTEED;
+ pi->loc_efs.max_sdu_size = L2CAP_DEFAULT_MAX_SDU_SIZE;
+ pi->loc_efs.sdu_inter_time = L2CAP_DEFAULT_SDU_ARRIVAL_TIME;
+ pi->loc_efs.access_latency = L2CAP_DEFAULT_ACCESS_LATENCY;
+ pi->loc_efs.flush_timeout = L2CAP_DEFAULT_FLUSH_TIMEOUT;
+ }
+ if (enable_highspeed && (pi->conn->feat_mask & L2CAP_FEAT_EXT_WINSIZE)) {
+ pi->extwin_enable = 1;
+ pi->extwin_size = L2CAP_DEFAULT_EXT_WINSIZE;
+ }
+ if (!l2cap_mode_supported(pi->mode, pi->conn->feat_mask))
+ l2cap_send_disconn_req(pi->conn, sk, ECONNRESET);
+ break;
default:
pi->mode = l2cap_select_mode(rfc.mode, pi->conn->feat_mask);
break;
@@ -2552,6 +2568,33 @@ done:
pi->fcs = L2CAP_FCS_NONE;
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1, pi->fcs);
}
+
+ if (pi->ext_flowspec_enable) {
+ efs.service_type = pi->loc_efs.service_type;
+ efs.max_sdu_size = cpu_to_le16(pi->loc_efs.max_sdu_size);
+ efs.sdu_inter_time = cpu_to_le32(pi->loc_efs.sdu_inter_time);
+ if (pi->loc_efs.service_type == L2CAP_SERVTYPE_BESTEFFORT) {
+ pi->loc_efs.id = 1;
+ efs.id = pi->loc_efs.id;
+ efs.access_latency = cpu_to_le32(0xFFFFFFFF);
+ efs.flush_timeout = cpu_to_le32(0xFFFFFFFF);
+ } else {
+ /* As spec, the ident shall be unique within
+ the scope of a physical link.
+ */
+ pi->loc_efs.id = l2cap_flowspec_ident(l2cap_pi(sk)->conn);
+ efs.id = pi->loc_efs.id;
+ efs.access_latency = cpu_to_le32(pi->loc_efs.access_latency);
+ efs.flush_timeout = cpu_to_le32(pi->loc_efs.flush_timeout);
+ }
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+ sizeof(efs), (unsigned long) &efs);
+ }
+
+ if (pi->extwin_enable) {
+ pi->extwin_size = max_t(__u16, pi->extwin_size, 0x01);
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS, 4, pi->extwin_size);
+ }
break;
case L2CAP_MODE_STREAMING:
@@ -2572,6 +2615,24 @@ done:
pi->fcs = L2CAP_FCS_NONE;
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1, pi->fcs);
}
+
+ if (pi->ext_flowspec_enable) {
+ efs.id = 1;
+ efs.service_type = L2CAP_SERVTYPE_BESTEFFORT;
+ efs.max_sdu_size = cpu_to_le16(pi->loc_efs.max_sdu_size);
+ efs.sdu_inter_time = cpu_to_le32(pi->loc_efs.sdu_inter_time);
+ efs.access_latency = 0;
+ efs.flush_timeout = 0;
+
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+ sizeof(efs), (unsigned long) &efs);
+ }
+
+ if (pi->extwin_enable) {
+ pi->extwin_enable = 1;
+ pi->extwin_size = 0;
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS, 4, pi->extwin_size);
+ }
break;
}
--
1.6.3.3
^ permalink raw reply related
* [PATCH 19/22] Store physical link status in l2cap_conn
From: haijun liu @ 2010-08-25 22:39 UTC (permalink / raw)
To: linux-bluetooth
>From df717c32ff5e397dc7860f7ce93b3aa734aeac73 Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:23:32 +0800
Subject: [PATCH 19/22] Store physical link status in l2cap_conn.
---
include/net/bluetooth/l2cap.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index f91111c..8a544a0 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -336,6 +336,8 @@ struct l2cap_conn {
__u8 disc_reason;
struct l2cap_chan_list chan_list;
+
+ __u8 phyl_status;
};
struct sock_del_list {
--
1.6.3.3
^ permalink raw reply related
* [PATCH 18/22] Add physical link status definition
From: haijun liu @ 2010-08-25 22:39 UTC (permalink / raw)
To: linux-bluetooth
>From 45246346bed4c351f61b6c71002dccaff88be6ac Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:20:59 +0800
Subject: [PATCH 18/22] Add physical link status definition.
---
include/net/bluetooth/l2cap.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index f2dd65d..f91111c 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -299,6 +299,11 @@ struct l2cap_info_rsp {
#define L2CAP_IR_SUCCESS 0x0000
#define L2CAP_IR_NOTSUPP 0x0001
+/* physical link status */
+#define L2CAP_PHYLINK_NOAVL 0x0000
+#define L2CAP_PHYLINK_CREATING 0x0001
+#define L2CAP_PHYLINK_READY 0x0002
+
/* ----- L2CAP connections ----- */
struct l2cap_chan_list {
struct sock *head;
--
1.6.3.3
^ permalink raw reply related
* [PATCH 17/22] Add parameter enable_highspeed to control highspeed code in running phase
From: haijun liu @ 2010-08-25 22:38 UTC (permalink / raw)
To: linux-bluetooth
>From c3fba9b5d7546576d9eb1d30eb45c453c8ee1dff Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:17:24 +0800
Subject: [PATCH 17/22] Add parameter enable_highspeed to control
highspeed code in running phase.
---
net/bluetooth/l2cap.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 449cbdd..e7f7067 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -4851,6 +4851,9 @@ module_exit(l2cap_exit);
module_param(enable_ertm, bool, 0644);
MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode");
+module_param(enable_highspeed, bool, 0644);
+MODULE_PARM_DESC(enable_highspeed, "Enable Bluetooth V3.0+HS
highspeed feature");
+
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);
MODULE_VERSION(VERSION);
--
1.6.3.3
^ permalink raw reply related
* Add parameter enable_highspeed to control highspeed code in running phase
From: haijun liu @ 2010-08-25 22:37 UTC (permalink / raw)
To: linux-bluetooth
>From c3fba9b5d7546576d9eb1d30eb45c453c8ee1dff Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:17:24 +0800
Subject: [PATCH 17/22] Add parameter enable_highspeed to control
highspeed code in running phase.
---
net/bluetooth/l2cap.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 449cbdd..e7f7067 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -4851,6 +4851,9 @@ module_exit(l2cap_exit);
module_param(enable_ertm, bool, 0644);
MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode");
+module_param(enable_highspeed, bool, 0644);
+MODULE_PARM_DESC(enable_highspeed, "Enable Bluetooth V3.0+HS
highspeed feature");
+
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);
MODULE_VERSION(VERSION);
--
1.6.3.3
^ permalink raw reply related
* [PATCH 16/22] Store new configuration values in l2cap_pinfo
From: haijun liu @ 2010-08-25 22:37 UTC (permalink / raw)
To: linux-bluetooth
>From d093975dde6d85c824a5aaac943d676100810010 Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:09:56 +0800
Subject: [PATCH 16/22] Store new configuration values in l2cap_pinfo.
---
include/net/bluetooth/l2cap.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 2d864d4..f2dd65d 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -406,6 +406,15 @@ struct l2cap_pinfo {
__u16 remote_mps;
__u16 mps;
+ __u8 ext_flowspec_enable;
+ struct ext_flow_spec loc_efs;
+ struct ext_flow_spec rem_efs;
+
+ __u8 extwin_enable;
+ __u16 extwin_size;
+ __u8 rem_extwin_enable;
+ __u16 rem_extwin_size;
+
__le16 sport;
struct timer_list retrans_timer;
--
1.6.3.3
^ permalink raw reply related
* [PATCH 15/22] Enlarge value scope of conf_state in l2cap_pinfo to hold new states for lock step configuration
From: haijun liu @ 2010-08-25 22:36 UTC (permalink / raw)
To: linux-bluetooth
>From ff97115044570dae7e88dd665a0e82d6b542da5b Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:05:43 +0800
Subject: [PATCH 15/22] Enlarge value scope of conf_state in
l2cap_pinfo to hold new states for lock step configuration.
---
include/net/bluetooth/l2cap.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 7a9bec4..2d864d4 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -378,7 +378,7 @@ struct l2cap_pinfo {
__u8 conf_req[64];
__u8 conf_len;
- __u8 conf_state;
+ __u16 conf_state;
__u16 conn_state;
__u8 next_tx_seq;
--
1.6.3.3
^ permalink raw reply related
* [PATCH 14/22] Add three new options for l2cap_pinfo
From: haijun liu @ 2010-08-25 22:36 UTC (permalink / raw)
To: linux-bluetooth
>From 06124ba36c1f6c9cf5bef861751ce749712cecb0 Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:03:39 +0800
Subject: [PATCH 14/22] Add three new options for l2cap_pinfo.
---
include/net/bluetooth/l2cap.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 4f87aec..7a9bec4 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -367,6 +367,10 @@ struct l2cap_pinfo {
__u8 num_conf_req;
__u8 num_conf_rsp;
+ __u8 hschan_req;
+ __u8 guaranteed;
+ __u8 reconfig;
+
__u8 fcs;
__u8 sec_level;
__u8 role_switch;
--
1.6.3.3
^ permalink raw reply related
* [PATCH 13/22] Add three new options for l2cap_options which used in setsockopt & getsockopt
From: haijun liu @ 2010-08-25 22:36 UTC (permalink / raw)
To: linux-bluetooth
>From 897b281d14ba4cf9a5fbbf5ba65b84c85e688737 Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Mon, 23 Aug 2010 00:00:26 +0800
Subject: [PATCH 13/22] Add three new options for l2cap_options which
used in setsockopt & getsockopt.
---
include/net/bluetooth/l2cap.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index d0ae9f5..4f87aec 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -65,6 +65,9 @@ struct l2cap_options {
__u8 fcs;
__u8 max_tx;
__u16 txwin_size;
+ __u8 hschan_req;
+ __u8 guaranteed;
+ __u8 reconfig;
};
#define L2CAP_CONNINFO 0x02
--
1.6.3.3
^ permalink raw reply related
* [PATCH 12/22] Add some default values for configuration process
From: haijun liu @ 2010-08-25 22:35 UTC (permalink / raw)
To: linux-bluetooth
>From 2d21459fa52b754ce0f666ccefc0175bc7f04420 Mon Sep 17 00:00:00 2001
From: haijun.liu <haijun.liu@atheros.com>
Date: Sun, 22 Aug 2010 23:57:09 +0800
Subject: [PATCH 12/22] Add some default values for configuration process.
---
include/net/bluetooth/l2cap.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index fe411e2..d0ae9f5 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -36,6 +36,11 @@
#define L2CAP_DEFAULT_MAX_PDU_SIZE 672
#define L2CAP_DEFAULT_ACK_TO 200
#define L2CAP_LOCAL_BUSY_TRIES 12
+#define L2CAP_DEFAULT_MAX_SDU_SIZE 0xFFFF
+#define L2CAP_DEFAULT_SDU_ARRIVAL_TIME 0xFFFFFFFF
+#define L2CAP_DEFAULT_FLUSH_TIMEOUT 0xFFFFFFFF
+#define L2CAP_DEFAULT_ACCESS_LATENCY 0xFFFFFFFF
+#define L2CAP_DEFAULT_EXT_WINSIZE 1024
#define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */
#define L2CAP_CONFIG_TIMEOUT (40000) /* 40 seconds */
--
1.6.3.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