Thread (3 messages) flat view 3 messages, 2 authors, 2012-02-22

Re: [RFC] Bluetooth: Add set_err to state_change callback

From: Ulisses Furquim <hidden>
Date: 2012-02-21 17:42:33

Hi Andrei,

On Tue, Feb 21, 2012 at 12:34 PM, Andrei Emeltchenko
[off-list ref] wrote:
From: Andrei Emeltchenko <redacted>

There are several places in the code where l2cap_state_change and
l2cap_chan_set_err used together. With combining them we remove
socket lock in l2cap_send_disconn_req and simplify code in couple
of other places with a price of adding extra parameter err to
state_change.

Signed-off-by: Andrei Emeltchenko <redacted>
---
 include/net/bluetooth/l2cap.h |    3 +-
 net/bluetooth/l2cap_core.c    |   58 ++++++++++++++++++----------------------
 net/bluetooth/l2cap_sock.c    |    9 +++++-
 3 files changed, 36 insertions(+), 34 deletions(-)
While I see the benefit of removing function calls and also some code
I'm not sure about this change now. We need to think of moving sock
handling to l2cap_sock.c and for that we may have to work more on
l2cap_ops indeed. However, we need to change ERTM state machine
handling first, I'd say.

Regards,

-- 
Ulisses Furquim
ProFUSION embedded systems
http://profusion.mobi
Mobile: +55 19 9250 0942
Skype: ulissesffs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help