diff options
author | h.sandeep <h.sandeep@samsung.com> | 2016-09-16 14:45:24 +0530 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:53:24 +0900 |
commit | 3cc21ce943ec528881ccb8e1b921c96decbd215a (patch) | |
tree | dad4e35beecc084a52f3de4bd39ade98f9303f7d | |
parent | dea18f7ec613158bc2243e641555dc0499e97cf8 (diff) |
Bluetooth: Fix IPSP connection callback event issue.
This patch fixes the IPSP connection callback event issue
between kernel and bluez layer.
Change-Id: Ia4d625aa8a6dbc9da89a7d9f12308af9c90d0594
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index dad419782a12..e39da6127b25 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1248,8 +1248,23 @@ static void l2cap_chan_ready(struct l2cap_chan *chan) * case of receiving data before the L2CAP info req/rsp * procedure is complete. */ +#ifndef TIZEN_BT if (chan->state == BT_CONNECTED) return; +#else + if (chan->state == BT_CONNECTED) { + if (chan->psm == L2CAP_PSM_IPSP) { + struct l2cap_conn *conn = chan->conn; + + if (conn->hcon->out) + return; + else if (conn->hcon->type != LE_LINK) + return; + } else { + return; + } + } +#endif /* This clears all conf flags, including CONF_NOT_COMPLETE */ chan->conf_state = 0; @@ -6796,8 +6811,23 @@ static void l2cap_data_channel(struct l2cap_conn *conn, u16 cid, * procdure is done simply assume that the channel is supported * and mark it as ready. */ +#ifndef TIZEN_BT if (chan->chan_type == L2CAP_CHAN_FIXED) l2cap_chan_ready(chan); +#else + if (chan->chan_type == L2CAP_CHAN_FIXED) { + if (chan->psm == L2CAP_PSM_IPSP) { + struct l2cap_conn *conn = chan->conn; + + if (conn->hcon->out) + l2cap_chan_ready(chan); + else if (conn->hcon->type != LE_LINK) + l2cap_chan_ready(chan); + } else { + l2cap_chan_ready(chan); + } + } +#endif if (chan->state != BT_CONNECTED) goto drop; |