GLOBAL/suraj | 1 Jun 2010 08:54
Favicon

[PATCH 1/3] Rename hci_recv_fragment to reflect its actual use

Renaming hci_recv_fragment to hci_recv_packet_fragment as it will be used 
only for reassembling HCI fragments with know packet type.

Signed-off-by: suraj <suraj@...>
---
 include/net/bluetooth/hci_core.h |    3 ++-
 net/bluetooth/hci_core.c         |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index e42f6ed..65c3c13 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
 <at>  <at>  -427,7 +427,8  <at>  <at>  int hci_inquiry(void __user *arg);
 void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);

 int hci_recv_frame(struct sk_buff *skb);
-int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);
+int hci_recv_packet_fragment(struct hci_dev *hdev, int type, void *data,
+				int count);

 int hci_register_sysfs(struct hci_dev *hdev);
 void hci_unregister_sysfs(struct hci_dev *hdev);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5e83f8e..e7ce432 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
 <at>  <at>  -1033,7 +1033,8  <at>  <at>  EXPORT_SYMBOL(hci_recv_frame);
 /* Receive packet type fragment */
 #define __reassembly(hdev, type)  ((hdev)->reassembly[(type) - 2])
(Continue reading)

GLOBAL/suraj | 1 Jun 2010 08:54
Favicon

[PATCH 2/3] Replace hci_recv_fragment calls


Replace all usages of hci_recv_fragment calls with hci_recv_packet_fragment

Signed-off-by: suraj <suraj@...>
---
 drivers/bluetooth/btusb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5d9cc53..50aa8d1 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
 <at>  <at>  -211,7 +211,7  <at>  <at>  static void btusb_intr_complete(struct urb *urb)
 	if (urb->status == 0) {
 		hdev->stat.byte_rx += urb->actual_length;

-		if (hci_recv_fragment(hdev, HCI_EVENT_PKT,
+		if (hci_recv_packet_fragment(hdev, HCI_EVENT_PKT,
 						urb->transfer_buffer,
 						urb->actual_length) < 0) {
 			BT_ERR("%s corrupted event packet", hdev->name);
 <at>  <at>  -295,7 +295,7  <at>  <at>  static void btusb_bulk_complete(struct urb *urb)
 	if (urb->status == 0) {
 		hdev->stat.byte_rx += urb->actual_length;

-		if (hci_recv_fragment(hdev, HCI_ACLDATA_PKT,
+		if (hci_recv_packet_fragment(hdev, HCI_ACLDATA_PKT,
 						urb->transfer_buffer,
 						urb->actual_length) < 0) {
 			BT_ERR("%s corrupted ACL packet", hdev->name);
(Continue reading)

GLOBAL/suraj | 1 Jun 2010 08:54
Favicon

[PATCH 3/3] frame reassembly implementation for data from stream

Implemented hci_recv_stream_fragment to reassemble HCI packets received from any data stream
with packet type not known.

Signed-off-by: suraj <suraj@...>
---
 include/net/bluetooth/hci_core.h |    1 +
 net/bluetooth/hci_core.c         |  104 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+), 0 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 65c3c13..9892c26 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
 <at>  <at>  -429,6 +429,7  <at>  <at>  void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
 int hci_recv_frame(struct sk_buff *skb);
 int hci_recv_packet_fragment(struct hci_dev *hdev, int type, void *data,
 				int count);
+int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count);

 int hci_register_sysfs(struct hci_dev *hdev);
 void hci_unregister_sysfs(struct hci_dev *hdev);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e7ce432..1587dc8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
 <at>  <at>  -1033,6 +1033,110  <at>  <at>  EXPORT_SYMBOL(hci_recv_frame);
 /* Receive packet type fragment */
 #define __reassembly(hdev, type)  ((hdev)->reassembly[(type) - 2])

+#define __get_max_rx_size(type)					\
(Continue reading)

suraj | 1 Jun 2010 10:04
Favicon

[PATCH 1/3] Rename hci_recv_fragment to hci_recv_packet_fragment

Renaming hci_recv_fragment to hci_recv_packet_fragment as it will be used 
only for reassembling HCI fragments with know packet type.

Signed-off-by: suraj <suraj@...>
---
 include/net/bluetooth/hci_core.h |    3 ++-
 net/bluetooth/hci_core.c         |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index e42f6ed..65c3c13 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
 <at>  <at>  -427,7 +427,8  <at>  <at>  int hci_inquiry(void __user *arg);
 void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);

 int hci_recv_frame(struct sk_buff *skb);
-int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count);
+int hci_recv_packet_fragment(struct hci_dev *hdev, int type, void *data,
+				int count);

 int hci_register_sysfs(struct hci_dev *hdev);
 void hci_unregister_sysfs(struct hci_dev *hdev);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5e83f8e..e7ce432 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
 <at>  <at>  -1033,7 +1033,8  <at>  <at>  EXPORT_SYMBOL(hci_recv_frame);
 /* Receive packet type fragment */
 #define __reassembly(hdev, type)  ((hdev)->reassembly[(type) - 2])
(Continue reading)

suraj | 1 Jun 2010 10:08
Favicon

[PATCH 2/3] Replace hci_recv_fragment calls

Replace all usages of hci_recv_fragment calls with
hci_recv_packet_fragment

Signed-off-by: suraj <suraj@...>
---
 drivers/bluetooth/btusb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5d9cc53..50aa8d1 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
 <at>  <at>  -211,7 +211,7  <at>  <at>  static void btusb_intr_complete(struct urb *urb)
 	if (urb->status == 0) {
 		hdev->stat.byte_rx += urb->actual_length;

-		if (hci_recv_fragment(hdev, HCI_EVENT_PKT,
+		if (hci_recv_packet_fragment(hdev, HCI_EVENT_PKT,
 						urb->transfer_buffer,
 						urb->actual_length) < 0) {
 			BT_ERR("%s corrupted event packet", hdev->name);
 <at>  <at>  -295,7 +295,7  <at>  <at>  static void btusb_bulk_complete(struct urb *urb)
 	if (urb->status == 0) {
 		hdev->stat.byte_rx += urb->actual_length;

-		if (hci_recv_fragment(hdev, HCI_ACLDATA_PKT,
+		if (hci_recv_packet_fragment(hdev, HCI_ACLDATA_PKT,
 						urb->transfer_buffer,
 						urb->actual_length) < 0) {
 			BT_ERR("%s corrupted ACL packet", hdev->name);
(Continue reading)

suraj | 1 Jun 2010 10:11
Favicon

[PATCH 3/3] frame reassembly implementation for data from stream

Implemented hci_recv_stream_fragment to reassemble HCI packets received from a data stream
with packet type not known.

Signed-off-by: suraj <suraj@...>
---
 include/net/bluetooth/hci_core.h |    1 +
 net/bluetooth/hci_core.c         |  104 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+), 0 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 65c3c13..9892c26 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
 <at>  <at>  -429,6 +429,7  <at>  <at>  void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
 int hci_recv_frame(struct sk_buff *skb);
 int hci_recv_packet_fragment(struct hci_dev *hdev, int type, void *data,
 				int count);
+int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count);

 int hci_register_sysfs(struct hci_dev *hdev);
 void hci_unregister_sysfs(struct hci_dev *hdev);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e7ce432..1587dc8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
 <at>  <at>  -1033,6 +1033,110  <at>  <at>  EXPORT_SYMBOL(hci_recv_frame);
 /* Receive packet type fragment */
 #define __reassembly(hdev, type)  ((hdev)->reassembly[(type) - 2])

+#define __get_max_rx_size(type)					\
(Continue reading)

Luis Rodriguez | 1 Jun 2010 16:29
Favicon

RE: [PATCH 2/3] Replace hci_recv_fragment calls


You want to unify patches 1 and 2. Patches upstream should be atomic so that if  you apply it, it should make
everything still work. Your first patch removes hci_recv_fragment() and then this one fixes the places
that call it, you want to do both in one shot.

  Luis
________________________________________
From: Suraj Sumangala
Sent: Tuesday, June 01, 2010 1:08 AM
To: linux-bluetooth@...
Cc: marcel@...; Luis Rodriguez; Jothikumar Mothilal
Subject: [PATCH 2/3] Replace hci_recv_fragment calls

Replace all usages of hci_recv_fragment calls with
hci_recv_packet_fragment

Signed-off-by: suraj <suraj@...>
---
 drivers/bluetooth/btusb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5d9cc53..50aa8d1 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
 <at>  <at>  -211,7 +211,7  <at>  <at>  static void btusb_intr_complete(struct urb *urb)
        if (urb->status == 0) {
                hdev->stat.byte_rx += urb->actual_length;

-               if (hci_recv_fragment(hdev, HCI_EVENT_PKT,
(Continue reading)

Elvis Pfützenreuter | 1 Jun 2010 21:54

[PATCH v3] Change MDP profile name and macros to HDP

---
 lib/sdp.c       |    6 +++---
 lib/sdp.h       |   22 ++++++++++++++++------
 tools/sdptool.c |    6 +++---
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index aa22c63..ca3b4c4 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
 <at>  <at>  -201,9 +201,9  <at>  <at>  static struct tupla ServiceClass[] = {
 	{ VIDEO_SOURCE_SVCLASS_ID,		"Video Source"			},
 	{ VIDEO_SINK_SVCLASS_ID,		"Video Sink"			},
 	{ VIDEO_DISTRIBUTION_SVCLASS_ID,	"Video Distribution"		},
-	{ MDP_SVCLASS_ID,			"MDP"				},
-	{ MDP_SOURCE_SVCLASS_ID,		"MDP Source"			},
-	{ MDP_SINK_SVCLASS_ID,			"MDP Sink"			},
+	{ HDP_SVCLASS_ID,			"HDP"				},
+	{ HDP_SOURCE_SVCLASS_ID,		"HDP Source"			},
+	{ HDP_SINK_SVCLASS_ID,			"HDP Sink"			},
 	{ APPLE_AGENT_SVCLASS_ID,		"Apple Agent"			},
 	{ 0 }
 };
diff --git a/lib/sdp.h b/lib/sdp.h
index a33e0a8..909bb02 100644
--- a/lib/sdp.h
+++ b/lib/sdp.h
 <at>  <at>  -140,9 +140,9  <at>  <at>  extern "C" {
 #define VIDEO_SOURCE_SVCLASS_ID		0x1303
 #define VIDEO_SINK_SVCLASS_ID		0x1304
(Continue reading)

Marcel Holtmann | 1 Jun 2010 21:59

RE: [PATCH 2/3] Replace hci_recv_fragment calls

Hi Luis,

> You want to unify patches 1 and 2. Patches upstream should be atomic so that if  you apply it, it should make
everything still work. Your first patch removes hci_recv_fragment() and then this one fixes the places
that call it, you want to do both in one shot.

actually I prefer to leave these two patches out for now. Since the
renaming could be done easily later. The important part is actually the
other implementation.

Regards

Marcel

Luis R. Rodriguez | 1 Jun 2010 22:51
Favicon

Re: [PATCH 2/3] Replace hci_recv_fragment calls

On Tue, Jun 01, 2010 at 12:59:13PM -0700, Marcel Holtmann wrote:
> Hi Luis,
> 
> > You want to unify patches 1 and 2. Patches upstream should be atomic so that if  you apply it, it should make
everything still work. Your first patch removes hci_recv_fragment() and then this one fixes the places
that call it, you want to do both in one shot.
> 
> actually I prefer to leave these two patches out for now. Since the
> renaming could be done easily later. The important part is actually the
> other implementation.

Won't that break compilation on the first patch since all existing
code users no longer have the exported symbol available?

  Luis

Gmane