aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-11-05 17:54:24 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-11-10 17:25:03 -0500
commitd45fc42323b7909829b8f27f26676c675f26551f (patch)
tree8f973c20dfc15d1521b51ddd178ff8ca9b6ba864 /net/bluetooth/l2cap_core.c
parent37d9ef76c26092098e8fbd3fd540b7ac2181e6bf (diff)
Bluetooth: Rename l2cap_check_security()
rename to l2cap_chan_check_security() to make it consistent with other l2cap_exported functions. This function will be exported in a later commit. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index e8a6837996cf..43395089d30f 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -518,7 +518,7 @@ static inline u8 l2cap_get_auth_type(struct l2cap_chan *chan)
518} 518}
519 519
520/* Service level security */ 520/* Service level security */
521static inline int l2cap_check_security(struct l2cap_chan *chan) 521int l2cap_chan_check_security(struct l2cap_chan *chan)
522{ 522{
523 struct l2cap_conn *conn = chan->conn; 523 struct l2cap_conn *conn = chan->conn;
524 __u8 auth_type; 524 __u8 auth_type;
@@ -664,7 +664,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
664 if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE)) 664 if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE))
665 return; 665 return;
666 666
667 if (l2cap_check_security(chan) && 667 if (l2cap_chan_check_security(chan) &&
668 __l2cap_no_conn_pending(chan)) { 668 __l2cap_no_conn_pending(chan)) {
669 struct l2cap_conn_req req; 669 struct l2cap_conn_req req;
670 req.scid = cpu_to_le16(chan->scid); 670 req.scid = cpu_to_le16(chan->scid);
@@ -754,7 +754,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
754 if (chan->state == BT_CONNECT) { 754 if (chan->state == BT_CONNECT) {
755 struct l2cap_conn_req req; 755 struct l2cap_conn_req req;
756 756
757 if (!l2cap_check_security(chan) || 757 if (!l2cap_chan_check_security(chan) ||
758 !__l2cap_no_conn_pending(chan)) { 758 !__l2cap_no_conn_pending(chan)) {
759 bh_unlock_sock(sk); 759 bh_unlock_sock(sk);
760 continue; 760 continue;
@@ -787,7 +787,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
787 rsp.scid = cpu_to_le16(chan->dcid); 787 rsp.scid = cpu_to_le16(chan->dcid);
788 rsp.dcid = cpu_to_le16(chan->scid); 788 rsp.dcid = cpu_to_le16(chan->scid);
789 789
790 if (l2cap_check_security(chan)) { 790 if (l2cap_chan_check_security(chan)) {
791 if (bt_sk(sk)->defer_setup) { 791 if (bt_sk(sk)->defer_setup) {
792 struct sock *parent = bt_sk(sk)->parent; 792 struct sock *parent = bt_sk(sk)->parent;
793 rsp.result = cpu_to_le16(L2CAP_CR_PEND); 793 rsp.result = cpu_to_le16(L2CAP_CR_PEND);
@@ -1181,7 +1181,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan)
1181 if (hcon->state == BT_CONNECTED) { 1181 if (hcon->state == BT_CONNECTED) {
1182 if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { 1182 if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
1183 __clear_chan_timer(chan); 1183 __clear_chan_timer(chan);
1184 if (l2cap_check_security(chan)) 1184 if (l2cap_chan_check_security(chan))
1185 l2cap_state_change(chan, BT_CONNECTED); 1185 l2cap_state_change(chan, BT_CONNECTED);
1186 } else 1186 } else
1187 l2cap_do_start(chan); 1187 l2cap_do_start(chan);
@@ -2606,7 +2606,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
2606 chan->ident = cmd->ident; 2606 chan->ident = cmd->ident;
2607 2607
2608 if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE) { 2608 if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE) {
2609 if (l2cap_check_security(chan)) { 2609 if (l2cap_chan_check_security(chan)) {
2610 if (bt_sk(sk)->defer_setup) { 2610 if (bt_sk(sk)->defer_setup) {
2611 l2cap_state_change(chan, BT_CONNECT2); 2611 l2cap_state_change(chan, BT_CONNECT2);
2612 result = L2CAP_CR_PEND; 2612 result = L2CAP_CR_PEND;