diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-05-17 14:13:19 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-13 13:55:33 -0400 |
commit | 1a09bcb97ca1b4eb9a6ea381fbc3beb7a9d2895d (patch) | |
tree | 6983ee0f5f57e0dc2ba5a75fbfcfdfdc2191ef48 /include/net/bluetooth | |
parent | c9b66675373e6edb2dc291562ce1fa05f7980102 (diff) |
Bluetooth: keep reference if any ERTM timer is enabled
ERTM use the generic L2CAP timer functions to keep a reference to the
channel. This is useful for avoiding crashes.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 7aaf7f78ddb1..c284be027d9f 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -441,12 +441,15 @@ struct l2cap_pinfo { | |||
441 | 441 | ||
442 | #define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t)) | 442 | #define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t)) |
443 | #define __clear_chan_timer(c) l2cap_clear_timer(c, &c->chan_timer) | 443 | #define __clear_chan_timer(c) l2cap_clear_timer(c, &c->chan_timer) |
444 | #define __mod_retrans_timer() mod_timer(&chan->retrans_timer, \ | 444 | #define __set_retrans_timer(c) l2cap_set_timer(c, &c->retrans_timer, \ |
445 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); | 445 | L2CAP_DEFAULT_RETRANS_TO); |
446 | #define __mod_monitor_timer() mod_timer(&chan->monitor_timer, \ | 446 | #define __clear_retrans_timer(c) l2cap_clear_timer(c, &c->retrans_timer) |
447 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); | 447 | #define __set_monitor_timer(c) l2cap_set_timer(c, &c->monitor_timer, \ |
448 | #define __mod_ack_timer() mod_timer(&chan->ack_timer, \ | 448 | L2CAP_DEFAULT_MONITOR_TO); |
449 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO)); | 449 | #define __clear_monitor_timer(c) l2cap_clear_timer(c, &c->monitor_timer) |
450 | #define __set_ack_timer(c) l2cap_set_timer(c, &chan->ack_timer, \ | ||
451 | L2CAP_DEFAULT_ACK_TO); | ||
452 | #define __clear_ack_timer(c) l2cap_clear_timer(c, &c->ack_timer) | ||
450 | 453 | ||
451 | static inline int l2cap_tx_window_full(struct l2cap_chan *ch) | 454 | static inline int l2cap_tx_window_full(struct l2cap_chan *ch) |
452 | { | 455 | { |