linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] Re: Bluetooth SCO message sending (sco_send_frame) (Marcel Holtmann)
@ 2005-08-23 15:23 Youngwoo Park
  2005-08-23 15:37 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Youngwoo Park @ 2005-08-23 15:23 UTC (permalink / raw)
  To: bluez-devel



I'm sorry about my coding style and thank you for your comment.
I modified sco_send_frame() function like following..


Before Modification...
-----------------

/*static inline int sco_send_frame(struct sock *sk, struct msghdr *msg,
int len)
{
struct sco_conn *conn = sco_pi(sk)->conn;
struct sk_buff *skb;
int err, count;*/

/* Check outgoing MTU */
if (len > conn->mtu)
return -EINVAL;

BT_DBG("sk %p len %d", sk, len);

count = min_t(unsigned int, conn->mtu, len);
if (!(skb = bt_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT,
&err)))
return err;

if (memcpy_fromiovec(skb_put(skb, count), msg->msg_iov, count)) {
err = -EFAULT;
goto fail;
}

if ((err = hci_send_sco(conn->hcon, skb)) < 0)
goto fail;

return count;


fail:
kfree_skb(skb);
return err;
}*/



After Modification...
----------------

/**
* sco_send_frame - send sco frame
*
* Modified 2005 by Youngwoo Park
*
* Send large sco frame sequentially even if frame size is larger than MTU
*
**/
static inline int sco_send_frame(struct sock *sk, struct msghdr *msg,
int len)
{
struct sco_conn *conn = sco_pi(sk)->conn;
struct sk_buff *skb;
int err, count;

do {

BT_DBG("sk %p len %d", sk, len);

count = min_t(unsigned int, conn->mtu, len);

if (!(skb = bt_skb_send_alloc(sk, count, msg->msg_flags & MSG_DONTWAIT,
&err))) {
BT_DBG("Faile to alloc");
return err;
}

if (memcpy_fromiovec(skb_put(skb, count), msg->msg_iov, count)) {
err = -EFAULT;
goto fail;
}

if ((err = hci_send_sco(conn->hcon, skb)) < 0)
goto fail;

len -= count;

} while(len > 0);

return len;

fail:
BT_DBG("Fail To Send", sk, len);
kfree_skb(skb);
return err;
}



Regards

Park.



-- 
Youngwoo Park

M.S. Student
CORE(COmputer engineering REsearch) Lab
Dept. EECS, KAIST, Daejeon 305-701, Korea
Phone: +82-42-869-5425 Fax: +82-42-8695425
e-mail: ywpark@core.kaist.ac.kr

--




















-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bluez-devel] Re: Bluetooth SCO message sending (sco_send_frame) (Marcel Holtmann)
@ 2005-08-23 15:33 Youngwoo Park
  0 siblings, 0 replies; 3+ messages in thread
From: Youngwoo Park @ 2005-08-23 15:33 UTC (permalink / raw)
  To: bluez-devel


I fogot to tell about the experimental environment.


I tested using CSR Bluecore Chipset.

The Problem is occured using SCO over UART(h4).
Fame size is larger than MTU and varied periodically
I adjusted MTU size but it had no effect.

However USB Module operate well.
In this case, frame size is smaller than MTU.

-- 
Youngwoo Park

M.S. Student
CORE(COmputer engineering REsearch) Lab
Dept. EECS, KAIST, Daejeon 305-701, Korea
Phone: +82-42-869-5425 Fax: +82-42-8695425
e-mail: ywpark@core.kaist.ac.kr

--




















-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-devel] Re: Bluetooth SCO message sending (sco_send_frame) (Marcel Holtmann)
  2005-08-23 15:23 [Bluez-devel] Re: Bluetooth SCO message sending (sco_send_frame) (Marcel Holtmann) Youngwoo Park
@ 2005-08-23 15:37 ` Marcel Holtmann
  0 siblings, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2005-08-23 15:37 UTC (permalink / raw)
  To: bluez-devel

Hi Youngwoo,

> I'm sorry about my coding style and thank you for your comment.
> I modified sco_send_frame() function like following..

follow the coding style and create a unified diff. Otherwise I will not
even consider including it.

Regards

Marcel




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-23 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-23 15:23 [Bluez-devel] Re: Bluetooth SCO message sending (sco_send_frame) (Marcel Holtmann) Youngwoo Park
2005-08-23 15:37 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2005-08-23 15:33 Youngwoo Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).