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

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

From: Andrei Emeltchenko <hidden>
Date: 2012-02-22 08:00:21

Hi Ulisses,

On Tue, Feb 21, 2012 at 03:42:33PM -0200, Ulisses Furquim wrote:
Hi Andrei,

On Tue, Feb 21, 2012 at 12:34 PM, Andrei Emeltchenko
[off-list ref] wrote:
quoted
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.
Yes, the main idea is to remove those socket operations to l2cap_ops so
that other socket-less protocols would override it.

Best regards 
Andrei Emeltchenko 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help