aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorMat Martineau <mathewm@codeaurora.org>2011-07-07 09:39:02 -0700
committerJaikumar Ganesh <jaikumar@google.com>2011-07-11 11:59:33 -0700
commitc0675b8d3c9cef40cd0c41d341815bd4e9faf5b6 (patch)
tree0d15342a23b79a7449ad77b823e54e32212c464d /include/net/bluetooth
parentd0336628cc629b3ef9c2814016c5f5af7a8f0bce (diff)
downloadkernel_samsung_espresso10-c0675b8d3c9cef40cd0c41d341815bd4e9faf5b6.zip
kernel_samsung_espresso10-c0675b8d3c9cef40cd0c41d341815bd4e9faf5b6.tar.gz
kernel_samsung_espresso10-c0675b8d3c9cef40cd0c41d341815bd4e9faf5b6.tar.bz2
Bluetooth: Use event-driven approach for handling ERTM receive buffer
This change moves most L2CAP ERTM receive buffer handling out of the L2CAP core and in to the socket code. It's up to the higher layer (the socket code, in this case) to tell the core when its buffer is full or has space available. The recv op should always accept incoming ERTM data or else the connection will go down. Within the socket layer, an skb that does not fit in the socket receive buffer will be temporarily stored. When the socket is read from, that skb will be placed in the receive buffer if possible. Once adequate buffer space becomes available, the L2CAP core is informed and the ERTM local busy state is cleared. Receive buffer management for non-ERTM modes is unchanged. Signed-off-by: Mat Martineau <mathewm@codeaurora.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/l2cap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 9c18e55..66b8d96 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -422,6 +422,7 @@ struct l2cap_conn {
struct l2cap_pinfo {
struct bt_sock bt;
struct l2cap_chan *chan;
+ struct sk_buff *rx_busy_skb;
};
enum {
@@ -498,5 +499,6 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason);
void l2cap_chan_destroy(struct l2cap_chan *chan);
int l2cap_chan_connect(struct l2cap_chan *chan);
int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len);
+void l2cap_chan_busy(struct l2cap_chan *chan, int busy);
#endif /* __L2CAP_H */