aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-04-13 16:20:49 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-28 00:09:58 -0400
commit0c1bc5c626e9783034264ccca4b262b3acc628f1 (patch)
treeca6c9ecaf753ec9892d3cec078c63723299e01fb /net/bluetooth/rfcomm
parent47d1ec6161da2c7b9dbc56a5200fa26b17d5fdc1 (diff)
Bluetooth: Move more channel info to struct l2cap_chan
In this commit, omtu, imtu, flush_to, mode and sport. It also remove the pi var from l2cap_sock_sendmsg(). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r--net/bluetooth/rfcomm/core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 4f728a4f7177..fdd8f5ab18c1 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -710,10 +710,10 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
710 /* Set L2CAP options */ 710 /* Set L2CAP options */
711 sk = sock->sk; 711 sk = sock->sk;
712 lock_sock(sk); 712 lock_sock(sk);
713 l2cap_pi(sk)->imtu = l2cap_mtu; 713 l2cap_pi(sk)->chan->imtu = l2cap_mtu;
714 l2cap_pi(sk)->chan->sec_level = sec_level; 714 l2cap_pi(sk)->chan->sec_level = sec_level;
715 if (l2cap_ertm) 715 if (l2cap_ertm)
716 l2cap_pi(sk)->mode = L2CAP_MODE_ERTM; 716 l2cap_pi(sk)->chan->mode = L2CAP_MODE_ERTM;
717 release_sock(sk); 717 release_sock(sk);
718 718
719 s = rfcomm_session_add(sock, BT_BOUND); 719 s = rfcomm_session_add(sock, BT_BOUND);
@@ -1890,7 +1890,8 @@ static inline void rfcomm_accept_connection(struct rfcomm_session *s)
1890 1890
1891 /* We should adjust MTU on incoming sessions. 1891 /* We should adjust MTU on incoming sessions.
1892 * L2CAP MTU minus UIH header and FCS. */ 1892 * L2CAP MTU minus UIH header and FCS. */
1893 s->mtu = min(l2cap_pi(nsock->sk)->omtu, l2cap_pi(nsock->sk)->imtu) - 5; 1893 s->mtu = min(l2cap_pi(nsock->sk)->chan->omtu,
1894 l2cap_pi(nsock->sk)->chan->imtu) - 5;
1894 1895
1895 rfcomm_schedule(); 1896 rfcomm_schedule();
1896 } else 1897 } else
@@ -1909,7 +1910,7 @@ static inline void rfcomm_check_connection(struct rfcomm_session *s)
1909 1910
1910 /* We can adjust MTU on outgoing sessions. 1911 /* We can adjust MTU on outgoing sessions.
1911 * L2CAP MTU minus UIH header and FCS. */ 1912 * L2CAP MTU minus UIH header and FCS. */
1912 s->mtu = min(l2cap_pi(sk)->omtu, l2cap_pi(sk)->imtu) - 5; 1913 s->mtu = min(l2cap_pi(sk)->chan->omtu, l2cap_pi(sk)->chan->imtu) - 5;
1913 1914
1914 rfcomm_send_sabm(s, 0); 1915 rfcomm_send_sabm(s, 0);
1915 break; 1916 break;
@@ -1992,7 +1993,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)
1992 /* Set L2CAP options */ 1993 /* Set L2CAP options */
1993 sk = sock->sk; 1994 sk = sock->sk;
1994 lock_sock(sk); 1995 lock_sock(sk);
1995 l2cap_pi(sk)->imtu = l2cap_mtu; 1996 l2cap_pi(sk)->chan->imtu = l2cap_mtu;
1996 release_sock(sk); 1997 release_sock(sk);
1997 1998
1998 /* Start listening on the socket */ 1999 /* Start listening on the socket */