aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-03-31 23:53:45 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-07 17:06:27 -0400
commite92c8e70faf5e3cc22979daba2a895359aa1eab2 (patch)
treec9d5ec9debd76903cb5770551ad7aa1e92eff867 /include/net/bluetooth
parent2c03a7a49e0831646bd35d0877ec7d051d8f174b (diff)
Bluetooth: Move ERTM timers to struct l2cap_chan
This also triggered a change in l2cap_send_disconn_req() parameters. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/l2cap.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 11c53cb4a116..5f4abea313a2 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -306,6 +306,10 @@ struct l2cap_chan {
306 __u8 remote_max_tx; 306 __u8 remote_max_tx;
307 __u16 remote_mps; 307 __u16 remote_mps;
308 308
309 struct timer_list retrans_timer;
310 struct timer_list monitor_timer;
311 struct timer_list ack_timer;
312
309 struct list_head list; 313 struct list_head list;
310}; 314};
311 315
@@ -379,9 +383,6 @@ struct l2cap_pinfo {
379 383
380 __le16 sport; 384 __le16 sport;
381 385
382 struct timer_list retrans_timer;
383 struct timer_list monitor_timer;
384 struct timer_list ack_timer;
385 struct sk_buff_head tx_queue; 386 struct sk_buff_head tx_queue;
386 struct sk_buff_head srej_queue; 387 struct sk_buff_head srej_queue;
387 struct sk_buff_head busy_queue; 388 struct sk_buff_head busy_queue;
@@ -415,11 +416,11 @@ struct l2cap_pinfo {
415#define L2CAP_CONN_RNR_SENT 0x0200 416#define L2CAP_CONN_RNR_SENT 0x0200
416#define L2CAP_CONN_SAR_RETRY 0x0400 417#define L2CAP_CONN_SAR_RETRY 0x0400
417 418
418#define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ 419#define __mod_retrans_timer() mod_timer(&chan->retrans_timer, \
419 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); 420 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO));
420#define __mod_monitor_timer() mod_timer(&l2cap_pi(sk)->monitor_timer, \ 421#define __mod_monitor_timer() mod_timer(&chan->monitor_timer, \
421 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); 422 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO));
422#define __mod_ack_timer() mod_timer(&l2cap_pi(sk)->ack_timer, \ 423#define __mod_ack_timer() mod_timer(&chan->ack_timer, \
423 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO)); 424 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO));
424 425
425static inline int l2cap_tx_window_full(struct l2cap_chan *ch) 426static inline int l2cap_tx_window_full(struct l2cap_chan *ch)
@@ -466,7 +467,7 @@ void l2cap_sock_kill(struct sock *sk);
466void l2cap_sock_init(struct sock *sk, struct sock *parent); 467void l2cap_sock_init(struct sock *sk, struct sock *parent);
467struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, 468struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
468 int proto, gfp_t prio); 469 int proto, gfp_t prio);
469void l2cap_send_disconn_req(struct l2cap_conn *conn, struct sock *sk, int err); 470void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *chan, int err);
470void l2cap_chan_del(struct l2cap_chan *chan, int err); 471void l2cap_chan_del(struct l2cap_chan *chan, int err);
471int l2cap_do_connect(struct sock *sk); 472int l2cap_do_connect(struct sock *sk);
472 473