From: "Gustavo F. Padovan" <gustavo@padovan.org>
To: Suraj <suraj@Atheros.com>
Cc: Suraj Sumangala <Suraj.Sumangala@Atheros.com>,
Marcel Holtmann <marcel@holtmann.org>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
Jothikumar Mothilal <Jothikumar.Mothilal@Atheros.com>
Subject: Re: [PATCH v2] frame reassembly implementation for data stream
Date: Wed, 2 Jun 2010 13:44:57 -0300 [thread overview]
Message-ID: <20100602164457.GB16657@vigoh> (raw)
In-Reply-To: <4C0684DA.3000306@Atheros.com>
Hi Suraj,
* Suraj <suraj@Atheros.com> [2010-06-02 21:50:42 +0530]:
> Hi Gustavo,
>
> On 6/2/2010 9:41 PM, Gustavo F. Padovan wrote:
> >Hi Suraj,
> >
> >* Marcel Holtmann<marcel@holtmann.org> [2010-06-02 08:02:35 -0700]:
> >
> >>Hi Suraj,
> >>
> >>>Implemented hci_recv_stream_fragment to reassemble HCI packets received from a data stream.
> >>>
> >>>Signed-off-by: suraj<suraj@Atheros.com>
> >>
> >>please fix your signed-off-by line. This is not proper.
> >>
> >>>---
> >>> include/net/bluetooth/hci_core.h | 1 +
> >>> net/bluetooth/hci_core.c | 98 ++++++++++++++++++++++++++++++++++++++
> >>> 2 files changed, 99 insertions(+), 0 deletions(-)
> >>>
> >>>diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> >>>index e42f6ed..6f33f11 100644
> >>>--- a/include/net/bluetooth/hci_core.h
> >>>+++ b/include/net/bluetooth/hci_core.h
> >>>@@ -428,6 +428,7 @@ 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_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 5e83f8e..ac9ccf7 100644
> >>>--- a/net/bluetooth/hci_core.c
> >>>+++ b/net/bluetooth/hci_core.c
> >>>@@ -1033,6 +1033,104 @@ EXPORT_SYMBOL(hci_recv_frame);
> >>> /* Receive packet type fragment */
> >>> #define __reassembly(hdev, type) ((hdev)->reassembly[(type) - 2])
> >>>
> >>>+#define __get_max_rx_size(type) \
> >>>+ (((type) == HCI_ACLDATA_PKT) ? \
> >>>+ HCI_MAX_FRAME_SIZE : \
> >>>+ ((type) == HCI_EVENT_PKT) ? HCI_MAX_EVENT_SIZE :\
> >>>+ HCI_MAX_SCO_SIZE)
> >>>+
> >>>+#define __get_header_len(type) \
> >>>+ (((type) == HCI_ACLDATA_PKT) ? \
> >>>+ HCI_ACL_HDR_SIZE : \
> >>>+ ((type) == HCI_EVENT_PKT) ? HCI_EVENT_HDR_SIZE :\
> >>>+ HCI_SCO_HDR_SIZE)
> >>
> >>This is total hackish code. Who do you think is able to read this?
> >
> >A switch sounds a way better for both macros, change that to a function
> >and use switch to compare.
>
> Sure, I guess I was trying to be too clever there. This call is
> called only once. So, wouldn't it better to put the switch case
> directly inline rather than writing a function?
> >
It is your choice, both a inline function or the switch directly should be
good.
--
Gustavo F. Padovan
http://padovan.org
next prev parent reply other threads:[~2010-06-02 16:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 8:24 [PATCH v2] frame reassembly implementation for data stream suraj
2010-06-02 15:02 ` Marcel Holtmann
2010-06-02 16:10 ` Suraj
2010-06-02 16:11 ` Gustavo F. Padovan
2010-06-02 16:20 ` Suraj
2010-06-02 16:44 ` Gustavo F. Padovan [this message]
2010-06-03 2:58 ` Suraj
2010-06-03 6:38 ` Marcel Holtmann
2010-06-03 7:07 ` Suraj
2010-06-07 4:17 ` Suraj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100602164457.GB16657@vigoh \
--to=gustavo@padovan.org \
--cc=Jothikumar.Mothilal@Atheros.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=Suraj.Sumangala@Atheros.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=suraj@Atheros.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox