Commit d45fc423 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

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: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 37d9ef76
...@@ -810,5 +810,6 @@ int l2cap_chan_connect(struct l2cap_chan *chan); ...@@ -810,5 +810,6 @@ int l2cap_chan_connect(struct l2cap_chan *chan);
int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len, int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
u32 priority); u32 priority);
void l2cap_chan_busy(struct l2cap_chan *chan, int busy); void l2cap_chan_busy(struct l2cap_chan *chan, int busy);
int l2cap_chan_check_security(struct l2cap_chan *chan);
#endif /* __L2CAP_H */ #endif /* __L2CAP_H */
...@@ -518,7 +518,7 @@ static inline u8 l2cap_get_auth_type(struct l2cap_chan *chan) ...@@ -518,7 +518,7 @@ static inline u8 l2cap_get_auth_type(struct l2cap_chan *chan)
} }
/* Service level security */ /* Service level security */
static inline int l2cap_check_security(struct l2cap_chan *chan) int l2cap_chan_check_security(struct l2cap_chan *chan)
{ {
struct l2cap_conn *conn = chan->conn; struct l2cap_conn *conn = chan->conn;
__u8 auth_type; __u8 auth_type;
...@@ -664,7 +664,7 @@ static void l2cap_do_start(struct l2cap_chan *chan) ...@@ -664,7 +664,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE)) if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE))
return; return;
if (l2cap_check_security(chan) && if (l2cap_chan_check_security(chan) &&
__l2cap_no_conn_pending(chan)) { __l2cap_no_conn_pending(chan)) {
struct l2cap_conn_req req; struct l2cap_conn_req req;
req.scid = cpu_to_le16(chan->scid); req.scid = cpu_to_le16(chan->scid);
...@@ -754,7 +754,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn) ...@@ -754,7 +754,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
if (chan->state == BT_CONNECT) { if (chan->state == BT_CONNECT) {
struct l2cap_conn_req req; struct l2cap_conn_req req;
if (!l2cap_check_security(chan) || if (!l2cap_chan_check_security(chan) ||
!__l2cap_no_conn_pending(chan)) { !__l2cap_no_conn_pending(chan)) {
bh_unlock_sock(sk); bh_unlock_sock(sk);
continue; continue;
...@@ -787,7 +787,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn) ...@@ -787,7 +787,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
rsp.scid = cpu_to_le16(chan->dcid); rsp.scid = cpu_to_le16(chan->dcid);
rsp.dcid = cpu_to_le16(chan->scid); rsp.dcid = cpu_to_le16(chan->scid);
if (l2cap_check_security(chan)) { if (l2cap_chan_check_security(chan)) {
if (bt_sk(sk)->defer_setup) { if (bt_sk(sk)->defer_setup) {
struct sock *parent = bt_sk(sk)->parent; struct sock *parent = bt_sk(sk)->parent;
rsp.result = cpu_to_le16(L2CAP_CR_PEND); rsp.result = cpu_to_le16(L2CAP_CR_PEND);
...@@ -1181,7 +1181,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan) ...@@ -1181,7 +1181,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan)
if (hcon->state == BT_CONNECTED) { if (hcon->state == BT_CONNECTED) {
if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
__clear_chan_timer(chan); __clear_chan_timer(chan);
if (l2cap_check_security(chan)) if (l2cap_chan_check_security(chan))
l2cap_state_change(chan, BT_CONNECTED); l2cap_state_change(chan, BT_CONNECTED);
} else } else
l2cap_do_start(chan); l2cap_do_start(chan);
...@@ -2606,7 +2606,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd ...@@ -2606,7 +2606,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
chan->ident = cmd->ident; chan->ident = cmd->ident;
if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE) { if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE) {
if (l2cap_check_security(chan)) { if (l2cap_chan_check_security(chan)) {
if (bt_sk(sk)->defer_setup) { if (bt_sk(sk)->defer_setup) {
l2cap_state_change(chan, BT_CONNECT2); l2cap_state_change(chan, BT_CONNECT2);
result = L2CAP_CR_PEND; result = L2CAP_CR_PEND;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment