Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279380
b: refs/heads/master
c: c2ec9c1
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan committed Dec 20, 2011
1 parent 322c3f6 commit d52eee2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 613a1c0c595fe2f2d9148a705f140a53bc9f56e1
refs/heads/master: c2ec9c1bbd17cdd1fc962f000b4ecb98c1dad830
15 changes: 15 additions & 0 deletions trunk/include/net/bluetooth/l2cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,21 @@ enum {
FLAG_EFS_ENABLE,
};

static inline void l2cap_set_timer(struct l2cap_chan *chan,
struct delayed_work *work, long timeout)
{
BT_DBG("chan %p state %d timeout %ld", chan, chan->state, timeout);

cancel_delayed_work_sync(work);

schedule_delayed_work(work, timeout);
}

static inline void l2cap_clear_timer(struct delayed_work *work)
{
cancel_delayed_work_sync(work);
}

#define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t))
#define __clear_chan_timer(c) l2cap_clear_timer(&c->chan_timer)
#define __set_retrans_timer(c) l2cap_set_timer(c, &c->retrans_timer, \
Expand Down
14 changes: 0 additions & 14 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,20 +228,6 @@ static u16 l2cap_alloc_cid(struct l2cap_conn *conn)
return 0;
}

static void l2cap_set_timer(struct l2cap_chan *chan, struct delayed_work *work, long timeout)
{
BT_DBG("chan %p state %d timeout %ld", chan, chan->state, timeout);

cancel_delayed_work_sync(work);

schedule_delayed_work(work, timeout);
}

static void l2cap_clear_timer(struct delayed_work *work)
{
cancel_delayed_work_sync(work);
}

static char *state_to_string(int state)
{
switch(state) {
Expand Down

0 comments on commit d52eee2

Please sign in to comment.