* [PATCH 05/17] Net: dns_resolver: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/dns_resolver/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/dns_resolver/Makefile b/net/dns_resolver/Makefile
index c0ef4e7..d5c13c2 100644
--- a/net/dns_resolver/Makefile
+++ b/net/dns_resolver/Makefile
@@ -4,4 +4,4 @@
obj-$(CONFIG_DNS_RESOLVER) += dns_resolver.o
-dns_resolver-objs := dns_key.o dns_query.o
+dns_resolver-y := dns_key.o dns_query.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 06/17] Net: econet: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/econet/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/econet/Makefile b/net/econet/Makefile
index 39f0a77..05fae8b 100644
--- a/net/econet/Makefile
+++ b/net/econet/Makefile
@@ -4,4 +4,4 @@
obj-$(CONFIG_ECONET) += econet.o
-econet-objs := af_econet.o
+econet-y := af_econet.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 07/17] Net: ipv4: netfilter: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/ipv4/netfilter/Makefile | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
index 4811159..19eb59d 100644
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -3,15 +3,15 @@
#
# objects for l3 independent conntrack
-nf_conntrack_ipv4-objs := nf_conntrack_l3proto_ipv4.o nf_conntrack_proto_icmp.o
+nf_conntrack_ipv4-y := nf_conntrack_l3proto_ipv4.o nf_conntrack_proto_icmp.o
ifeq ($(CONFIG_NF_CONNTRACK_PROC_COMPAT),y)
ifeq ($(CONFIG_PROC_FS),y)
nf_conntrack_ipv4-objs += nf_conntrack_l3proto_ipv4_compat.o
endif
endif
-nf_nat-objs := nf_nat_core.o nf_nat_helper.o nf_nat_proto_unknown.o nf_nat_proto_common.o nf_nat_proto_tcp.o nf_nat_proto_udp.o nf_nat_proto_icmp.o
-iptable_nat-objs := nf_nat_rule.o nf_nat_standalone.o
+nf_nat-y := nf_nat_core.o nf_nat_helper.o nf_nat_proto_unknown.o nf_nat_proto_common.o nf_nat_proto_tcp.o nf_nat_proto_udp.o nf_nat_proto_icmp.o
+iptable_nat-y := nf_nat_rule.o nf_nat_standalone.o
# connection tracking
obj-$(CONFIG_NF_CONNTRACK_IPV4) += nf_conntrack_ipv4.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 08/17] Net: ipv6: netfiliter: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/ipv6/netfilter/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter/Makefile b/net/ipv6/netfilter/Makefile
index 0a432c9..abfee91 100644
--- a/net/ipv6/netfilter/Makefile
+++ b/net/ipv6/netfilter/Makefile
@@ -11,13 +11,13 @@ obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
obj-$(CONFIG_IP6_NF_SECURITY) += ip6table_security.o
# objects for l3 independent conntrack
-nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o
+nf_conntrack_ipv6-y := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o
# l3 independent conntrack
obj-$(CONFIG_NF_CONNTRACK_IPV6) += nf_conntrack_ipv6.o nf_defrag_ipv6.o
# defrag
-nf_defrag_ipv6-objs := nf_defrag_ipv6_hooks.o nf_conntrack_reasm.o
+nf_defrag_ipv6-y := nf_defrag_ipv6_hooks.o nf_conntrack_reasm.o
obj-$(CONFIG_NF_DEFRAG_IPV6) += nf_defrag_ipv6.o
# matches
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 09/17] Net: irda: ircomm: Makefile: Remove deprecated kbuild goal defintions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/irda/ircomm/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/irda/ircomm/Makefile b/net/irda/ircomm/Makefile
index 4868945..ab23b5b 100644
--- a/net/irda/ircomm/Makefile
+++ b/net/irda/ircomm/Makefile
@@ -4,5 +4,5 @@
obj-$(CONFIG_IRCOMM) += ircomm.o ircomm-tty.o
-ircomm-objs := ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o
-ircomm-tty-objs := ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o
+ircomm-y := ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o
+ircomm-tty-y := ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 10/17] Net: irda: irlan: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/irda/irlan/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/irda/irlan/Makefile b/net/irda/irlan/Makefile
index 77549bc..94eefbc 100644
--- a/net/irda/irlan/Makefile
+++ b/net/irda/irlan/Makefile
@@ -4,4 +4,4 @@
obj-$(CONFIG_IRLAN) += irlan.o
-irlan-objs := irlan_common.o irlan_eth.o irlan_event.o irlan_client.o irlan_provider.o irlan_filter.o irlan_provider_event.o irlan_client_event.o
+irlan-y := irlan_common.o irlan_eth.o irlan_event.o irlan_client.o irlan_provider.o irlan_filter.o irlan_provider_event.o irlan_client_event.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 11/17] Net: irda: irnet: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/irda/irnet/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/irda/irnet/Makefile b/net/irda/irnet/Makefile
index b3ee01e..61c365c 100644
--- a/net/irda/irnet/Makefile
+++ b/net/irda/irnet/Makefile
@@ -4,4 +4,4 @@
obj-$(CONFIG_IRNET) += irnet.o
-irnet-objs := irnet_ppp.o irnet_irda.o
+irnet-y := irnet_ppp.o irnet_irda.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 12/17] Net: lapb: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/lapb/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/lapb/Makefile b/net/lapb/Makefile
index 53f7c90..fff797d 100644
--- a/net/lapb/Makefile
+++ b/net/lapb/Makefile
@@ -4,4 +4,4 @@
obj-$(CONFIG_LAPB) += lapb.o
-lapb-objs := lapb_in.o lapb_out.o lapb_subr.o lapb_timer.o lapb_iface.o
+lapb-y := lapb_in.o lapb_out.o lapb_subr.o lapb_timer.o lapb_iface.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 13/17] Net: phonet: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/phonet/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/phonet/Makefile b/net/phonet/Makefile
index d62bbba..e10b1b1 100644
--- a/net/phonet/Makefile
+++ b/net/phonet/Makefile
@@ -1,6 +1,6 @@
obj-$(CONFIG_PHONET) += phonet.o pn_pep.o
-phonet-objs := \
+phonet-y := \
pn_dev.o \
pn_netlink.o \
socket.o \
@@ -8,4 +8,4 @@ phonet-objs := \
sysctl.o \
af_phonet.o
-pn_pep-objs := pep.o pep-gprs.o
+pn_pep-y := pep.o pep-gprs.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 14/17] Net: rds: Makefile: Remove deprecated items
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Also, use the ccflags-$ flag instead of EXTRA_CFLAGS because EXTRA_CFLAGS is
deprecated and should now be switched.
Last but not least, took out if-conditionals.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/rds/Makefile | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/rds/Makefile b/net/rds/Makefile
index b46eca1..56d3f60 100644
--- a/net/rds/Makefile
+++ b/net/rds/Makefile
@@ -4,7 +4,7 @@ rds-y := af_rds.o bind.o cong.o connection.o info.o message.o \
loop.o page.o rdma.o
obj-$(CONFIG_RDS_RDMA) += rds_rdma.o
-rds_rdma-objs := rdma_transport.o \
+rds_rdma-y := rdma_transport.o \
ib.o ib_cm.o ib_recv.o ib_ring.o ib_send.o ib_stats.o \
ib_sysctl.o ib_rdma.o \
iw.o iw_cm.o iw_recv.o iw_ring.o iw_send.o iw_stats.o \
@@ -12,10 +12,8 @@ rds_rdma-objs := rdma_transport.o \
obj-$(CONFIG_RDS_TCP) += rds_tcp.o
-rds_tcp-objs := tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
+rds_tcp-y := tcp.o tcp_connect.o tcp_listen.o tcp_recv.o \
tcp_send.o tcp_stats.o
-ifeq ($(CONFIG_RDS_DEBUG), y)
-EXTRA_CFLAGS += -DDEBUG
-endif
+ccflags-$(CONFIG_RDS_DEBUG) := -DDEBUG
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 15/17] Net: rxrpc: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/rxrpc/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/rxrpc/Makefile b/net/rxrpc/Makefile
index c46867c..d1c3429 100644
--- a/net/rxrpc/Makefile
+++ b/net/rxrpc/Makefile
@@ -2,7 +2,7 @@
# Makefile for Linux kernel RxRPC
#
-af-rxrpc-objs := \
+af-rxrpc-y := \
af_rxrpc.o \
ar-accept.o \
ar-ack.o \
@@ -21,7 +21,7 @@ af-rxrpc-objs := \
ar-transport.o
ifeq ($(CONFIG_PROC_FS),y)
-af-rxrpc-objs += ar-proc.o
+af-rxrpc-y += ar-proc.o
endif
obj-$(CONFIG_AF_RXRPC) += af-rxrpc.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 16/17] Net: sunrpc: auth_gss: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/sunrpc/auth_gss/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/auth_gss/Makefile b/net/sunrpc/auth_gss/Makefile
index 7350d86..9e4cb59 100644
--- a/net/sunrpc/auth_gss/Makefile
+++ b/net/sunrpc/auth_gss/Makefile
@@ -4,10 +4,10 @@
obj-$(CONFIG_SUNRPC_GSS) += auth_rpcgss.o
-auth_rpcgss-objs := auth_gss.o gss_generic_token.o \
+auth_rpcgss-y := auth_gss.o gss_generic_token.o \
gss_mech_switch.o svcauth_gss.o
obj-$(CONFIG_RPCSEC_GSS_KRB5) += rpcsec_gss_krb5.o
-rpcsec_gss_krb5-objs := gss_krb5_mech.o gss_krb5_seal.o gss_krb5_unseal.o \
+rpcsec_gss_krb5-y := gss_krb5_mech.o gss_krb5_seal.o gss_krb5_unseal.o \
gss_krb5_seqnum.o gss_krb5_wrap.o gss_krb5_crypto.o gss_krb5_keys.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* [PATCH 17/17] Net: wanrouter: Makefile: Remove deprecated kbuild goal definitions
From: Tracey Dent @ 2010-11-22 1:03 UTC (permalink / raw)
To: davem
Cc: marcel, padovan, linux-bluetooth, netdev, sjur.brandeland,
socketcan, urs.thuermann, socketcan-core, sage, ceph-devel,
wang840925, jlayton, kaber, pekkas, linux-kernel, netfilter-devel,
netfilter, samuel, Tracey Dent
In-Reply-To: <1290387808-2239-1-git-send-email-tdent48227@gmail.com>
Changed Makefile to use <modules>-y instead of <modules>-objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
net/wanrouter/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/wanrouter/Makefile b/net/wanrouter/Makefile
index 9f188ab..4da14bc 100644
--- a/net/wanrouter/Makefile
+++ b/net/wanrouter/Makefile
@@ -4,4 +4,4 @@
obj-$(CONFIG_WAN_ROUTER) += wanrouter.o
-wanrouter-objs := wanproc.o wanmain.o
+wanrouter-y := wanproc.o wanmain.o
--
1.7.3.2.245.g03276
^ permalink raw reply related
* Nobody knows the reason?
From: Roc Bai @ 2010-11-22 3:13 UTC (permalink / raw)
To: linux-bluetooth
Hi, All:
When i pair my phone with the PC, i have to quickly input the PIN code
with the linux-2.6.35.1 kernel. But i can do it slowly with linux-2.6.26
kernel. All the application and library are same. So i think the waiting
timeout is changed, but i cann't find the changement. I hope get your help
on the issue. Thanks very much!
My hcid version is 3.36.
Best Regards
Bai Shuwei
--
------------------------
Thinking before action, but you are wasting time if you don't do action.
^ permalink raw reply
* New subscription request to list Bluez-devel from buroc83@gmail.com
From: bluez-devel-owner @ 2010-11-22 3:14 UTC (permalink / raw)
To: bluez-devel-owner
Your authorization is required for a mailing list subscription request
approval:
For: buroc83@gmail.com
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: Nobody knows the reason?
From: Gustavo F. Padovan @ 2010-11-22 3:40 UTC (permalink / raw)
To: Roc Bai; +Cc: linux-bluetooth
In-Reply-To: <AANLkTim-2G0Tzok1cRbMhOCP1RUMhFU8gOHeY8QgFqUf@mail.gmail.com>
Hi Roc,
* Roc Bai <buroc83@gmail.com> [2010-11-22 11:13:27 +0800]:
> Hi, All:
> When i pair my phone with the PC, i have to quickly input the PIN code
> with the linux-2.6.35.1 kernel. But i can do it slowly with linux-2.6.26
> kernel. All the application and library are same. So i think the waiting
> timeout is changed, but i cann't find the changement. I hope get your help
> on the issue. Thanks very much!
>
> My hcid version is 3.36.
Please move to the latest bluez 4 version and then report it again if it
is the case.
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply
* Re: [PATCH 2/2] Bluetooth: Automate remote name requests
From: Arun K. Singh @ 2010-11-22 5:04 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <AANLkTinMq-3K09y-bCWM1Z254FsWoRuZ=QEuZM11WPMb@mail.gmail.com>
Hello Johan,
> The code will work sub-optimally
> with userspace versions that still do the name requesting themselves (it
> shouldn't break anything though) so it is recommended to combine this
> with a userspace software version that doesn't have automated name
> requests.
Could you be bit more explicit about such user space versions that you
recommend? Would latest bluez versions such as 4.80 qualify for your
recommendation?
Best Regards,
Arun Kumar.
^ permalink raw reply
* Re: [PATCH 2/2] Bluetooth: Automate remote name requests
From: Johan Hedberg @ 2010-11-22 7:12 UTC (permalink / raw)
To: Arun K. Singh; +Cc: linux-bluetooth
In-Reply-To: <AANLkTinMq-3K09y-bCWM1Z254FsWoRuZ=QEuZM11WPMb@mail.gmail.com>
Hi Arun,
On Mon, Nov 22, 2010, Arun K. Singh wrote:
> > The code will work sub-optimally with userspace versions that still
> > do the name requesting themselves (it shouldn't break anything
> > though) so it is recommended to combine this with a userspace
> > software version that doesn't have automated name requests.
>
> Could you be bit more explicit about such user space versions that you
> recommend? Would latest bluez versions such as 4.80 qualify for your
> recommendation?
The automated name requests upon "connect complete" events were removed
in 4.78 so any version from there onwards would qualify.
Johan
^ permalink raw reply
* [PATCH 2/2] Increment reference counter when a io_watcher is added
From: Jose Antonio Santos Cadenas @ 2010-11-22 8:07 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jose Antonio Santos Cadenas
In-Reply-To: <1290413446-5391-1-git-send-email-sancane@gmail.com>
Also a destroy function is added in order to avoid memory leaks
---
health/mcap.c | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/health/mcap.c b/health/mcap.c
index 8ecdc68..81fd8df 100644
--- a/health/mcap.c
+++ b/health/mcap.c
@@ -1638,8 +1638,11 @@ static void mcap_connect_mdl_cb(GIOChannel *chan, GError *conn_err,
}
mdl->state = MDL_CONNECTED;
- mdl->wid = g_io_add_watch(mdl->dc, G_IO_ERR | G_IO_HUP | G_IO_NVAL,
- (GIOFunc) mdl_event_cb, mdl);
+ mdl->wid = g_io_add_watch_full(mdl->dc, G_PRIORITY_DEFAULT,
+ G_IO_ERR | G_IO_HUP | G_IO_NVAL,
+ (GIOFunc) mdl_event_cb,
+ mcap_mdl_ref(mdl),
+ (GDestroyNotify) mcap_mdl_unref);
cb(mdl, conn_err, user_data);
}
@@ -1774,9 +1777,11 @@ static void mcap_connect_mcl_cb(GIOChannel *chan, GError *conn_err,
mcap_mcl_ref(mcl));
}
- mcl->wid = g_io_add_watch(mcl->cc,
+ mcl->wid = g_io_add_watch_full(mcl->cc, G_PRIORITY_DEFAULT,
G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
- (GIOFunc) mcl_control_cb, mcl);
+ (GIOFunc) mcl_control_cb,
+ mcap_mcl_ref(mcl),
+ (GDestroyNotify) mcap_mcl_unref);
connect_cb(mcl, gerr, data);
}
@@ -1786,8 +1791,11 @@ static void set_mdl_properties(GIOChannel *chan, struct mcap_mdl *mdl)
mdl->state = MDL_CONNECTED;
mdl->dc = g_io_channel_ref(chan);
- mdl->wid = g_io_add_watch(mdl->dc, G_IO_ERR | G_IO_HUP | G_IO_NVAL,
- (GIOFunc) mdl_event_cb, mdl);
+ mdl->wid = g_io_add_watch_full(mdl->dc, G_PRIORITY_DEFAULT,
+ G_IO_ERR | G_IO_HUP | G_IO_NVAL,
+ (GIOFunc) mdl_event_cb,
+ mcap_mdl_ref(mdl),
+ (GDestroyNotify) mcap_mdl_unref);
mcl->state = MCL_ACTIVE;
mcl->cb->mdl_connected(mdl, mcl->cb->user_data);
@@ -1919,9 +1927,11 @@ static void set_mcl_conf(GIOChannel *chan, struct mcap_mcl *mcl)
mcl->mi->mcls = g_slist_prepend(mcl->mi->mcls,
mcap_mcl_ref(mcl));
- mcl->wid = g_io_add_watch(mcl->cc,
- G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
- (GIOFunc) mcl_control_cb, mcl);
+ mcl->wid = g_io_add_watch_full(mcl->cc, G_PRIORITY_DEFAULT,
+ G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
+ (GIOFunc) mcl_control_cb,
+ mcap_mcl_ref(mcl),
+ (GDestroyNotify) mcap_mcl_unref);
/* Callback to report new MCL */
if (reconn)
--
1.7.1
^ permalink raw reply related
* [PATCH 1/2] Do not increment mdl reference in reconnections
From: Santiago Carot-Nemesio @ 2010-11-22 8:10 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Santiago Carot-Nemesio
diff --git a/health/hdp.c b/health/hdp.c
index 2e06a6b..769e300 100644
--- a/health/hdp.c
+++ b/health/hdp.c
@@ -921,7 +921,8 @@ static void hdp_mcap_mdl_connected_cb(struct mcap_mdl *mdl, void *data)
return;
chan = dev->ndc;
- chan->mdl = mcap_mdl_ref(mdl);
+ if (!chan->mdl)
+ chan->mdl = mcap_mdl_ref(mdl);
if (!g_slist_find(dev->channels, chan))
dev->channels = g_slist_prepend(dev->channels,
--
1.7.3.2
^ permalink raw reply related
* [PATCH] Fix managing dbus filters depending on BT state
From: Bartosz Szatkowski @ 2010-11-22 10:56 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Bartosz Szatkowski
Previously even if BT was disabled, bluetoothd would handle some dbus
singals (mostly connected with HFP). Now filters are added when
BT is enabled and removed when BT is disabled.
---
audio/manager.c | 4 ++--
audio/telephony-dummy.c | 10 ++++++++++
audio/telephony-maemo5.c | 10 ++++++++++
audio/telephony-maemo6.c | 10 ++++++++++
audio/telephony-ofono.c | 10 ++++++++++
audio/telephony.h | 1 +
src/adapter.c | 5 +++++
7 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/audio/manager.c b/audio/manager.c
index 816c807..2fc7bf1 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -1178,7 +1178,7 @@ proceed:
btd_register_adapter_driver(&media_server_driver);
if (enabled.headset) {
- telephony_init();
+ telephony_set_state(1);
btd_register_adapter_driver(&headset_server_driver);
}
@@ -1220,7 +1220,7 @@ void audio_manager_exit(void)
if (enabled.headset) {
btd_unregister_adapter_driver(&headset_server_driver);
- telephony_exit();
+ telephony_set_state(0);
}
if (enabled.gateway)
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
index 06cb798..ef7c5fa 100644
--- a/audio/telephony-dummy.c
+++ b/audio/telephony-dummy.c
@@ -57,6 +57,8 @@ static gboolean events_enabled = FALSE;
*/
static int response_and_hold = -1;
+static int telephony_state = 0;
+
static struct indicator dummy_indicators[] =
{
{ "battchg", "0-5", 5, TRUE },
@@ -411,8 +413,16 @@ static GDBusSignalTable dummy_signals[] = {
{ }
};
+int telephony_set_state(int state)
+{
+ telephony_state = state;
+}
+
int telephony_init(void)
{
+ if (telephony_state == 0)
+ return;
+
uint32_t features = AG_FEATURE_REJECT_A_CALL |
AG_FEATURE_ENHANCED_CALL_STATUS |
AG_FEATURE_EXTENDED_ERROR_RESULT_CODES;
diff --git a/audio/telephony-maemo5.c b/audio/telephony-maemo5.c
index 4d0134c..1dd5449 100644
--- a/audio/telephony-maemo5.c
+++ b/audio/telephony-maemo5.c
@@ -222,6 +222,8 @@ static char *last_dialed_number = NULL;
/* Timer for tracking call creation requests */
static guint create_request_timer = 0;
+static int telephony_state = 0;
+
static struct indicator maemo_indicators[] =
{
{ "battchg", "0-5", 5, TRUE },
@@ -2044,8 +2046,16 @@ static DBusHandlerResult signal_filter(DBusConnection *conn,
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
+int telephony_set_state(int state)
+{
+ telephony_state = state;
+}
+
int telephony_init(void)
{
+ if (telephony_state == 0)
+ return;
+
const char *battery_cap = "battery";
uint32_t features = AG_FEATURE_EC_ANDOR_NR |
AG_FEATURE_INBAND_RINGTONE |
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 72c8e36..916dcb8 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -181,6 +181,8 @@ static char *last_dialed_number = NULL;
/* Timer for tracking call creation requests */
static guint create_request_timer = 0;
+static int telephony_state = 0;
+
static struct indicator maemo_indicators[] =
{
{ "battchg", "0-5", 5, TRUE },
@@ -1937,8 +1939,16 @@ static DBusHandlerResult signal_filter(DBusConnection *conn,
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
+int telephony_set_state(int state)
+{
+ telephony_state = state;
+}
+
int telephony_init(void)
{
+ if (telephony_state == 0)
+ return;
+
const char *battery_cap = "battery";
uint32_t features = AG_FEATURE_EC_ANDOR_NR |
AG_FEATURE_INBAND_RINGTONE |
diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index 693207c..fe3ae19 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -96,6 +96,8 @@ static gboolean events_enabled = FALSE;
*/
static int response_and_hold = -1;
+static int telephony_state = 0;
+
static struct indicator ofono_indicators[] =
{
{ "battchg", "0-5", 5, TRUE },
@@ -1062,8 +1064,16 @@ done:
dbus_message_unref(reply);
}
+int telephony_set_state(int state)
+{
+ telephony_state = state;
+}
+
int telephony_init(void)
{
+ if (telephony_state == 0)
+ return;
+
const char *battery_cap = "battery";
int ret;
diff --git a/audio/telephony.h b/audio/telephony.h
index 5343e8c..9b80e56 100644
--- a/audio/telephony.h
+++ b/audio/telephony.h
@@ -232,5 +232,6 @@ static inline int telephony_get_indicator(const struct indicator *indicators,
return -ENOENT;
}
+int telephony_set_active(int state);
int telephony_init(void);
void telephony_exit(void);
diff --git a/src/adapter.c b/src/adapter.c
index 6b4a354..8ed2040 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -57,6 +57,7 @@
#include "glib-helper.h"
#include "agent.h"
#include "storage.h"
+#include "../audio/telephony.h"
#define IO_CAPABILITY_DISPLAYONLY 0x00
#define IO_CAPABILITY_DISPLAYYESNO 0x01
@@ -2404,6 +2405,8 @@ int adapter_start(struct btd_adapter *adapter)
err = adapter_up(adapter, mode);
+ telephony_init();
+
info("Adapter %s has been enabled", adapter->path);
return err;
@@ -2533,6 +2536,8 @@ int adapter_stop(struct btd_adapter *adapter)
call_adapter_powered_callbacks(adapter, FALSE);
+ telephony_exit();
+
info("Adapter %s has been disabled", adapter->path);
set_mode_complete(adapter);
--
1.7.0.4
^ permalink raw reply related
* [PATCH v2] Bluetooth: Fix error handling for l2cap_init()
From: Anderson Lizardo @ 2010-11-22 10:57 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, Anderson Lizardo
create_singlethread_workqueue() may fail with errors such as -ENOMEM. If
this happens, the return value is not set to a negative value and the
module load will succeed. It will then crash on module unload because of
a destroy_workqueue() call on a NULL pointer.
Additionally, the _busy_wq workqueue is not being destroyed if any
errors happen on l2cap_init().
Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
---
net/bluetooth/l2cap.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 18a802c..7980e24 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -4875,8 +4875,10 @@ static int __init l2cap_init(void)
return err;
_busy_wq = create_singlethread_workqueue("l2cap");
- if (!_busy_wq)
- goto error;
+ if (!_busy_wq) {
+ err = -ENOMEM;
+ goto error_busy_wq;
+ }
err = bt_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops);
if (err < 0) {
@@ -4904,6 +4906,8 @@ static int __init l2cap_init(void)
return 0;
error:
+ destroy_workqueue(_busy_wq);
+error_busy_wq:
proto_unregister(&l2cap_proto);
return err;
}
--
1.7.0.4
^ permalink raw reply related
* [PATCH] hciattach: download configuration at maximum baud rate possible
From: Suraj Sumangala @ 2010-11-22 10:58 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Jothikumar.Mothilal, Suraj Sumangala
This patch support downloading configuration files for
Atheros AR300x HCI UART chip at user requested baud rate
instead of the initial baud rate.
---
tools/hciattach.c | 2 +-
tools/hciattach.h | 3 +-
tools/hciattach_ath3k.c | 97 +++++++++++++++++++++++++++++++++-------------
3 files changed, 72 insertions(+), 30 deletions(-)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index fd53710..a47fa55 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -304,7 +304,7 @@ static int texasalt(int fd, struct uart_t *u, struct termios *ti)
static int ath3k_ps(int fd, struct uart_t *u, struct termios *ti)
{
- return ath3k_init(fd, u->bdaddr, u->speed);
+ return ath3k_init(fd, u->speed, u->init_speed, u->bdaddr, ti);
}
static int ath3k_pm(int fd, struct uart_t *u, struct termios *ti)
diff --git a/tools/hciattach.h b/tools/hciattach.h
index 2d26b77..fed0d11 100644
--- a/tools/hciattach.h
+++ b/tools/hciattach.h
@@ -50,6 +50,7 @@ int texas_post(int fd, struct termios *ti);
int texasalt_init(int fd, int speed, struct termios *ti);
int stlc2500_init(int fd, bdaddr_t *bdaddr);
int bgb2xx_init(int dd, bdaddr_t *bdaddr);
-int ath3k_init(int fd, char *bdaddr, int speed);
+int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,
+ struct termios *ti);
int ath3k_post(int fd, int pm);
int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr);
diff --git a/tools/hciattach_ath3k.c b/tools/hciattach_ath3k.c
index 70ade30..5df20d8 100644
--- a/tools/hciattach_ath3k.c
+++ b/tools/hciattach_ath3k.c
@@ -922,14 +922,49 @@ int ath3k_post(int fd, int pm)
#define WRITE_BAUD_CMD_LEN 6
#define MAX_CMD_LEN WRITE_BDADDR_CMD_LEN
+static int set_cntrlr_baud(int fd, int speed)
+{
+ int baud;
+ struct timespec tm = { 0, 500000 };
+ unsigned char cmd[MAX_CMD_LEN], rsp[HCI_MAX_EVENT_SIZE];
+ unsigned char *ptr = cmd + 1;
+ hci_command_hdr *ch = (void *)ptr;
+
+ cmd[0] = HCI_COMMAND_PKT;
+
+ /* set controller baud rate to user specified value */
+ ptr = cmd + 1;
+ ch->opcode = htobs(cmd_opcode_pack(HCI_VENDOR_CMD_OGF,
+ HCI_CHG_BAUD_CMD_OCF));
+ ch->plen = 2;
+ ptr += HCI_COMMAND_HDR_SIZE;
+
+ baud = speed/100;
+ ptr[0] = (char)baud;
+ ptr[1] = (char)(baud >> 8);
+
+ if (write(fd, cmd, WRITE_BAUD_CMD_LEN) != WRITE_BAUD_CMD_LEN) {
+ perror("Failed to write change baud rate command");
+ return -ETIMEDOUT;
+ }
+
+ nanosleep(&tm, NULL);
+
+ if (read_hci_event(fd, rsp, sizeof(rsp)) < 0)
+ return -ETIMEDOUT;
+
+ return 0;
+}
+
/*
* Atheros AR300x specific initialization and configuration file
* download
*/
-int ath3k_init(int fd, char *bdaddr, int speed)
+int ath3k_init(int fd, int speed, int init_speed, char *bdaddr,
+ struct termios *ti)
{
int r;
- int baud;
+ int err = 0;
struct timespec tm = { 0, 500000 };
unsigned char cmd[MAX_CMD_LEN], rsp[HCI_MAX_EVENT_SIZE];
unsigned char *ptr = cmd + 1;
@@ -937,11 +972,22 @@ int ath3k_init(int fd, char *bdaddr, int speed)
cmd[0] = HCI_COMMAND_PKT;
+ /* set both controller and host baud rate to maximum possible value */
+ err = set_cntrlr_baud(fd, speed);
+ if (err < 0)
+ return err;
+
+ if (set_speed(fd, ti, speed) < 0) {
+ perror("Can't set required baud rate");
+ return -1;
+ }
+
/* Download PS and patch */
r = ath_ps_download(fd);
if (r < 0) {
perror("Failed to Download configuration");
- return -ETIMEDOUT;
+ err = -ETIMEDOUT;
+ goto exit;
}
/* Write BDADDR */
@@ -960,12 +1006,14 @@ int ath3k_init(int fd, char *bdaddr, int speed)
if (write(fd, cmd, WRITE_BDADDR_CMD_LEN) !=
WRITE_BDADDR_CMD_LEN) {
perror("Failed to write BD_ADDR command\n");
- return -ETIMEDOUT;
+ err = -ETIMEDOUT;
+ goto exit;
}
if (read_hci_event(fd, rsp, sizeof(rsp)) < 0) {
perror("Failed to set BD_ADDR\n");
- return -ETIMEDOUT;
+ err = -ETIMEDOUT;
+ goto exit;
}
}
@@ -975,33 +1023,26 @@ int ath3k_init(int fd, char *bdaddr, int speed)
cmd[3] = 0x00;
r = write(fd, cmd, 4);
- if (r != 4)
- return -ETIMEDOUT;
+ if (r != 4) {
+ err = -ETIMEDOUT;
+ goto exit;
+ }
nanosleep(&tm, NULL);
- if (read_hci_event(fd, rsp, sizeof(rsp)) < 0)
- return -ETIMEDOUT;
-
- /* set controller baud rate to user specified value */
- ptr = cmd + 1;
- ch->opcode = htobs(cmd_opcode_pack(HCI_VENDOR_CMD_OGF,
- HCI_CHG_BAUD_CMD_OCF));
- ch->plen = 2;
- ptr += HCI_COMMAND_HDR_SIZE;
-
- baud = speed/100;
- ptr[0] = (char)baud;
- ptr[1] = (char)(baud >> 8);
-
- if (write(fd, cmd, WRITE_BAUD_CMD_LEN) != WRITE_BAUD_CMD_LEN) {
- perror("Failed to write change baud rate command");
- return -ETIMEDOUT;
+ if (read_hci_event(fd, rsp, sizeof(rsp)) < 0) {
+ err = -ETIMEDOUT;
+ goto exit;
}
- nanosleep(&tm, NULL);
+ err = set_cntrlr_baud(fd, speed);
+ if (err < 0)
+ return err;
- if (read_hci_event(fd, rsp, sizeof(rsp)) < 0)
- return -ETIMEDOUT;
+exit:
+ if (err < 0) {
+ set_cntrlr_baud(fd, init_speed);
+ set_speed(fd, ti, init_speed);
+ }
- return 0;
+ return err;
}
--
1.7.0.4
^ permalink raw reply related
* [PATCH v6] Bluetooth: btwilink driver
From: pavan_savoy @ 2010-11-22 11:08 UTC (permalink / raw)
To: marcel, padovan; +Cc: linux-bluetooth, linux-kernel, Pavan Savoy
From: Pavan Savoy <pavan_savoy@ti.com>
Marcel, Gustavo,
comments attended to from v5,
1. Inside ti_st_open, I previously only checked for EINPROGRESS & EPERM,
ow I handle for EINPROGRESS - which is not really an error and
return during all other error cases.
2. _write is still a function pointer and not an exported function, I
need to change the underlying driver's code for this.
However, previous lkml comments on the underlying driver's code
suggested it to be kept as a function pointer and not EXPORT.
Gustavo, Marcel - Please comment on this.
Is this absolutely required? If so why?
3. test_and_set_bit of HCI_RUNNING is done at beginning of
ti_st_open, and did not see issues during firmware download.
However ideally I would still like to set HCI_RUNNING once the firmware
download is done, because I don't want to allow a _send_frame during
firmware download - Marcel, Gustavo - Please comment.
4. test_and_clear of HCI_RUNNING now done @ beginning of close.
5. EAGAIN on failure of st_write is to suggest to try and write again.
I have never this happen - However only if UART goes bad this case may
occur.
6. ti_st_tx_complete is very similar to hci_ldisc's tx_complete - in
fact the code is pretty much borrowed from there.
Marcel, Gustavo - Please suggest where should it be done? If not here.
7. comments cleaned-up + hst memory leak fixed when hci_alloc_dev fails.
8. platform_driver registration inside module_init now is similar to
other drivers.
Thanks for the comments...
Sorry, for previously not being very clear on which comments were
handled and which were not.
-- patch description --
This is the bluetooth protocol driver for the TI WiLink7 chipsets.
Texas Instrument's WiLink chipsets combine wireless technologies
like BT, FM, GPS and WLAN onto a single chip.
This Bluetooth driver works on top of the TI_ST shared transport
line discipline driver which also allows other drivers like
FM V4L2 and GPS character driver to make use of the same UART interface.
Kconfig and Makefile modifications to enable the Bluetooth
driver for Texas Instrument's WiLink 7 chipset.
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
---
drivers/bluetooth/Kconfig | 10 ++
drivers/bluetooth/Makefile | 1 +
drivers/bluetooth/btwilink.c | 362 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 373 insertions(+), 0 deletions(-)
create mode 100644 drivers/bluetooth/btwilink.c
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 02deef4..8e0de9a 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -219,4 +219,14 @@ config BT_ATH3K
Say Y here to compile support for "Atheros firmware download driver"
into the kernel or say M to compile it as module (ath3k).
+config BT_WILINK
+ tristate "Texas Instruments WiLink7 driver"
+ depends on TI_ST
+ help
+ This enables the Bluetooth driver for Texas Instrument's BT/FM/GPS
+ combo devices. This makes use of shared transport line discipline
+ core driver to communicate with the BT core of the combo chip.
+
+ Say Y here to compile support for Texas Instrument's WiLink7 driver
+ into the kernel or say M to compile it as module.
endmenu
diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
index 71bdf13..f4460f4 100644
--- a/drivers/bluetooth/Makefile
+++ b/drivers/bluetooth/Makefile
@@ -18,6 +18,7 @@ obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o
obj-$(CONFIG_BT_ATH3K) += ath3k.o
obj-$(CONFIG_BT_MRVL) += btmrvl.o
obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o
+obj-$(CONFIG_BT_WILINK) += btwilink.o
btmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
new file mode 100644
index 0000000..2b83a12
--- /dev/null
+++ b/drivers/bluetooth/btwilink.c
@@ -0,0 +1,362 @@
+/*
+ * Texas Instrument's Bluetooth Driver For Shared Transport.
+ *
+ * Bluetooth Driver acts as interface between HCI core and
+ * TI Shared Transport Layer.
+ *
+ * Copyright (C) 2009-2010 Texas Instruments
+ * Author: Raja Mani <raja_mani@ti.com>
+ * Pavan Savoy <pavan_savoy@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci_core.h>
+
+#include <linux/ti_wilink_st.h>
+
+/* Bluetooth Driver Version */
+#define VERSION "1.0"
+
+/* Number of seconds to wait for registration completion
+ * when ST returns PENDING status.
+ */
+#define BT_REGISTER_TIMEOUT 6000 /* 6 sec */
+
+/**
+ * struct ti_st - driver operation structure
+ * @hdev: hci device pointer which binds to bt driver
+ * @reg_status: ST registration callback status
+ * @st_write: write function provided by the ST driver
+ * to be used by the driver during send_frame.
+ * @wait_reg_completion - completion sync between ti_st_open
+ * and ti_st_registration_completion_cb.
+ */
+struct ti_st {
+ struct hci_dev *hdev;
+ char reg_status;
+ long (*st_write) (struct sk_buff *);
+ struct completion wait_reg_completion;
+};
+
+/* Increments HCI counters based on pocket ID (cmd,acl,sco) */
+static inline void ti_st_tx_complete(struct ti_st *hst, int pkt_type)
+{
+ struct hci_dev *hdev = hst->hdev;
+
+ /* Update HCI stat counters */
+ switch (pkt_type) {
+ case HCI_COMMAND_PKT:
+ hdev->stat.cmd_tx++;
+ break;
+
+ case HCI_ACLDATA_PKT:
+ hdev->stat.acl_tx++;
+ break;
+
+ case HCI_SCODATA_PKT:
+ hdev->stat.sco_tx++;
+ break;
+ }
+}
+
+/* ------- Interfaces to Shared Transport ------ */
+
+/* Called by ST layer to indicate protocol registration completion
+ * status.ti_st_open() function will wait for signal from this
+ * API when st_register() function returns ST_PENDING.
+ */
+static void st_registration_completion_cb(void *priv_data, char data)
+{
+ struct ti_st *lhst = priv_data;
+
+ /* Save registration status for use in ti_st_open() */
+ lhst->reg_status = data;
+ /* complete the wait in ti_st_open() */
+ complete(&lhst->wait_reg_completion);
+}
+
+/* Called by Shared Transport layer when receive data is
+ * available */
+static long st_receive(void *priv_data, struct sk_buff *skb)
+{
+ struct ti_st *lhst = priv_data;
+ int err;
+
+ if (!skb)
+ return -EFAULT;
+
+ if (!lhst) {
+ kfree_skb(skb);
+ return -EFAULT;
+ }
+
+ skb->dev = (void *) lhst->hdev;
+
+ /* Forward skb to HCI core layer */
+ err = hci_recv_frame(skb);
+ if (err < 0) {
+ BT_ERR("Unable to push skb to HCI core(%d)", err);
+ return err;
+ }
+
+ lhst->hdev->stat.byte_rx += skb->len;
+
+ return 0;
+}
+
+/* ------- Interfaces to HCI layer ------ */
+/* protocol structure registered with shared transport */
+static struct st_proto_s ti_st_proto = {
+ .type = ST_BT,
+ .recv = st_receive,
+ .reg_complete_cb = st_registration_completion_cb,
+};
+
+/* Called from HCI core to initialize the device */
+static int ti_st_open(struct hci_dev *hdev)
+{
+ unsigned long timeleft;
+ struct ti_st *hst;
+ int err;
+
+ BT_DBG("%s %p", hdev->name, hdev);
+ if (test_and_set_bit(HCI_RUNNING, &hdev->flags)) {
+ BT_ERR("btwilink already opened");
+ return -EBUSY;
+ }
+
+ /* provide contexts for callbacks from ST */
+ hst = hdev->driver_data;
+ ti_st_proto.priv_data = hst;
+
+ err = st_register(&ti_st_proto);
+ if (err == -EINPROGRESS) {
+ /* ST is busy with either protocol registration or firmware
+ * download.
+ */
+ /* Prepare wait-for-completion handler data structures.
+ */
+ init_completion(&hst->wait_reg_completion);
+
+ /* Reset ST registration callback status flag , this value
+ * will be updated in ti_st_registration_completion_cb()
+ * function whenever it called from ST driver.
+ */
+ hst->reg_status = -EINPROGRESS;
+
+ BT_DBG(" waiting for registration completion signal from ST");
+ timeleft = wait_for_completion_timeout
+ (&hst->wait_reg_completion,
+ msecs_to_jiffies(BT_REGISTER_TIMEOUT));
+ if (!timeleft) {
+ clear_bit(HCI_RUNNING, &hdev->flags);
+ BT_ERR("Timeout(%d sec),didn't get reg "
+ "completion signal from ST",
+ BT_REGISTER_TIMEOUT / 1000);
+ return -ETIMEDOUT;
+ }
+
+ /* Is ST registration callback called with ERROR status? */
+ if (hst->reg_status != 0) {
+ clear_bit(HCI_RUNNING, &hdev->flags);
+ BT_ERR("ST registration completed with invalid "
+ "status %d", hst->reg_status);
+ return -EAGAIN;
+ }
+ err = 0;
+ } else if (err != 0) {
+ clear_bit(HCI_RUNNING, &hdev->flags);
+ BT_ERR("st_register failed %d", err);
+ return err;
+ }
+
+ /* ti_st_proto.write is filled up by the underlying shared
+ * transport driver upon registration
+ */
+ hst->st_write = ti_st_proto.write;
+ if (!hst->st_write) {
+ BT_ERR("undefined ST write function");
+ clear_bit(HCI_RUNNING, &hdev->flags);
+
+ /* Undo registration with ST */
+ err = st_unregister(ST_BT);
+ if (err)
+ BT_ERR("st_unregister() failed with error %d", err);
+
+ hst->st_write = NULL;
+ return err;
+ }
+
+ return err;
+}
+
+/* Close device */
+static int ti_st_close(struct hci_dev *hdev)
+{
+ int err;
+ struct ti_st *hst = hdev->driver_data;
+
+ if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
+ return 0;
+
+ /* continue to unregister from transport */
+ err = st_unregister(ST_BT);
+ if (err)
+ BT_ERR("st_unregister() failed with error %d", err);
+
+ hst->st_write = NULL;
+
+ return err;
+}
+
+static int ti_st_send_frame(struct sk_buff *skb)
+{
+ struct hci_dev *hdev;
+ struct ti_st *hst;
+ long len;
+
+ hdev = (struct hci_dev *)skb->dev;
+
+ if (!test_bit(HCI_RUNNING, &hdev->flags))
+ return -EBUSY;
+
+ hst = hdev->driver_data;
+
+ /* Prepend skb with frame type */
+ memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
+
+ BT_DBG(" %s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type,
+ skb->len);
+
+ /* Insert skb to shared transport layer's transmit queue.
+ * Freeing skb memory is taken care in shared transport layer,
+ * so don't free skb memory here.
+ */
+ len = hst->st_write(skb);
+ if (len < 0) {
+ kfree_skb(skb);
+ BT_ERR(" ST write failed (%ld)", len);
+ /* Try Again, would only fail if UART has gone bad */
+ return -EAGAIN;
+ }
+
+ /* ST accepted our skb. So, Go ahead and do rest */
+ hdev->stat.byte_tx += len;
+ ti_st_tx_complete(hst, bt_cb(skb)->pkt_type);
+
+ return 0;
+}
+
+static void ti_st_destruct(struct hci_dev *hdev)
+{
+ BT_DBG("%s", hdev->name);
+ kfree(hdev->driver_data);
+}
+
+static int bt_ti_probe(struct platform_device *pdev)
+{
+ static struct ti_st *hst;
+ struct hci_dev *hdev;
+ int err;
+
+ hst = kzalloc(sizeof(struct ti_st), GFP_KERNEL);
+ if (!hst)
+ return -ENOMEM;
+
+ /* Expose "hciX" device to user space */
+ hdev = hci_alloc_dev();
+ if (!hdev) {
+ kfree(hst);
+ return -ENOMEM;
+ }
+
+ BT_DBG("hdev %p", hdev);
+
+ hst->hdev = hdev;
+ hdev->bus = HCI_UART;
+ hdev->driver_data = hst;
+ hdev->open = ti_st_open;
+ hdev->close = ti_st_close;
+ hdev->flush = NULL;
+ hdev->send = ti_st_send_frame;
+ hdev->destruct = ti_st_destruct;
+ hdev->owner = THIS_MODULE;
+
+ err = hci_register_dev(hdev);
+ if (err < 0) {
+ BT_ERR("Can't register HCI device error %d", err);
+ hci_free_dev(hdev);
+ return err;
+ }
+
+ BT_DBG(" HCI device registered (hdev %p)", hdev);
+
+ dev_set_drvdata(&pdev->dev, hst);
+ return err;
+}
+
+static int bt_ti_remove(struct platform_device *pdev)
+{
+ struct hci_dev *hdev;
+ struct ti_st *hst = dev_get_drvdata(&pdev->dev);
+
+ if (!hst)
+ return -EFAULT;
+
+ hdev = hst->hdev;
+ ti_st_close(hdev);
+ hci_unregister_dev(hdev);
+
+ hci_free_dev(hdev);
+ kfree(hst);
+
+ dev_set_drvdata(&pdev->dev, NULL);
+ return 0;
+}
+
+static struct platform_driver btwilink_driver = {
+ .probe = bt_ti_probe,
+ .remove = bt_ti_remove,
+ .driver = {
+ .name = "btwilink",
+ .owner = THIS_MODULE,
+ },
+};
+
+/* ------- Module Init/Exit interfaces ------ */
+static int __init btwilink_init(void)
+{
+ BT_INFO(" Bluetooth Driver for TI WiLink - Version %s", VERSION);
+
+ return platform_driver_register(&btwilink_driver);
+}
+
+static void __exit btwilink_exit(void)
+{
+ platform_driver_unregister(&btwilink_driver);
+}
+
+module_init(btwilink_init);
+module_exit(btwilink_exit);
+
+/* ------ Module Info ------ */
+
+MODULE_AUTHOR("Raja Mani <raja_mani@ti.com>");
+MODULE_DESCRIPTION("Bluetooth Driver for TI Shared Transport" VERSION);
+MODULE_VERSION(VERSION);
+MODULE_LICENSE("GPL");
--
1.5.6.3
^ permalink raw reply related
* [PATCH] Bluetooth: do not use assignment in if condition
From: Emeltchenko Andrei @ 2010-11-22 11:21 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Fix checkpatch errors like:
"ERROR: do not use assignment in if condition"
Simplify code and fix one long line.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
---
net/bluetooth/hci_event.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4165895..3c1957c 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -996,12 +996,14 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
hci_dev_lock(hdev);
- if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr)))
+ ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
+ if (ie)
memcpy(ie->data.dev_class, ev->dev_class, 3);
conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
if (!conn) {
- if (!(conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr))) {
+ conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr);
+ if (!conn) {
BT_ERR("No memory for new connection");
hci_dev_unlock(hdev);
return;
@@ -1608,7 +1610,8 @@ static inline void hci_clock_offset_evt(struct hci_dev *hdev, struct sk_buff *sk
if (conn && !ev->status) {
struct inquiry_entry *ie;
- if ((ie = hci_inquiry_cache_lookup(hdev, &conn->dst))) {
+ ie = hci_inquiry_cache_lookup(hdev, &conn->dst);
+ if (ie) {
ie->data.clock_offset = ev->clock_offset;
ie->timestamp = jiffies;
}
@@ -1642,7 +1645,8 @@ static inline void hci_pscan_rep_mode_evt(struct hci_dev *hdev, struct sk_buff *
hci_dev_lock(hdev);
- if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr))) {
+ ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
+ if (ie) {
ie->data.pscan_rep_mode = ev->pscan_rep_mode;
ie->timestamp = jiffies;
}
@@ -1713,7 +1717,8 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b
if (!ev->status && ev->page == 0x01) {
struct inquiry_entry *ie;
- if ((ie = hci_inquiry_cache_lookup(hdev, &conn->dst)))
+ ie = hci_inquiry_cache_lookup(hdev, &conn->dst);
+ if (ie)
ie->data.ssp_mode = (ev->features[0] & 0x01);
conn->ssp_mode = (ev->features[0] & 0x01);
@@ -1886,7 +1891,8 @@ static inline void hci_remote_host_features_evt(struct hci_dev *hdev, struct sk_
hci_dev_lock(hdev);
- if ((ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr)))
+ ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr);
+ if (ie)
ie->data.ssp_mode = (ev->features[0] & 0x01);
hci_dev_unlock(hdev);
--
1.7.1
^ 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