aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-10-15 18:24:47 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-10-15 19:42:44 -0400
commit8d836d71e2223b8961b21112bb4ce89ef8231682 (patch)
treeb7f6c82cf7a2b1fabbda72e1af060b3a06d71cb7 /include/net
parentf8e73017c15b007bd519d0049305bb377e8cc1f5 (diff)
Bluetooth: Access sk_sndtimeo indirectly in l2cap_core.c
As part of the work to remove struct sock from l2cap_core.c and make it more generic we remove in this commit the direct access to sk->sk_sndtimeo member. This objective of this change is purely remove sk usage from l2cap_core.c Now we have a new l2cap ops to get the current value of sk->sndtimeo. A l2cap_chan_no_get_sndtimeo was added for users of L2CAP that doesn't need to set a timeout. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/l2cap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 4ec86cec8914..9c6be72b6e4e 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -555,6 +555,7 @@ struct l2cap_ops {
555 void (*ready) (struct l2cap_chan *chan); 555 void (*ready) (struct l2cap_chan *chan);
556 void (*defer) (struct l2cap_chan *chan); 556 void (*defer) (struct l2cap_chan *chan);
557 void (*resume) (struct l2cap_chan *chan); 557 void (*resume) (struct l2cap_chan *chan);
558 long (*get_sndtimeo) (struct l2cap_chan *chan);
558 struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, 559 struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
559 unsigned long len, int nb); 560 unsigned long len, int nb);
560}; 561};
@@ -795,6 +796,11 @@ static inline void l2cap_chan_no_defer(struct l2cap_chan *chan)
795{ 796{
796} 797}
797 798
799static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
800{
801 return 0;
802}
803
798extern bool disable_ertm; 804extern bool disable_ertm;
799 805
800int l2cap_init_sockets(void); 806int l2cap_init_sockets(void);