diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-29 12:35:35 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-06-22 19:23:47 -0400 |
commit | 073d1cf35fe45d89f5a553c21eea18b504dd6937 (patch) | |
tree | 7c81cce1417e1f00eaca864bd1e9b2a917a813e0 /net/bluetooth | |
parent | c5623556fc61804713b1569b4f748e36956bc6e8 (diff) |
Bluetooth: Rename L2CAP_CID_LE_DATA to L2CAP_CID_ATT
In future Core Specification versions the ATT CID will be just one of
many possible CIDs that can be used for data transfer. Therefore, it
makes sense to rename the define for the ATT CID to something less
ambigous.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 14 | ||||
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index ab9961118181..c87f8f94083d 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -504,8 +504,8 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan) | |||
504 | if (conn->hcon->type == LE_LINK) { | 504 | if (conn->hcon->type == LE_LINK) { |
505 | /* LE connection */ | 505 | /* LE connection */ |
506 | chan->omtu = L2CAP_DEFAULT_MTU; | 506 | chan->omtu = L2CAP_DEFAULT_MTU; |
507 | chan->scid = L2CAP_CID_LE_DATA; | 507 | chan->scid = L2CAP_CID_ATT; |
508 | chan->dcid = L2CAP_CID_LE_DATA; | 508 | chan->dcid = L2CAP_CID_ATT; |
509 | } else { | 509 | } else { |
510 | /* Alloc CID for connection-oriented socket */ | 510 | /* Alloc CID for connection-oriented socket */ |
511 | chan->scid = l2cap_alloc_cid(conn); | 511 | chan->scid = l2cap_alloc_cid(conn); |
@@ -1344,7 +1344,7 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) | |||
1344 | BT_DBG(""); | 1344 | BT_DBG(""); |
1345 | 1345 | ||
1346 | /* Check if we have socket listening on cid */ | 1346 | /* Check if we have socket listening on cid */ |
1347 | pchan = l2cap_global_chan_by_scid(BT_LISTEN, L2CAP_CID_LE_DATA, | 1347 | pchan = l2cap_global_chan_by_scid(BT_LISTEN, L2CAP_CID_ATT, |
1348 | conn->src, conn->dst); | 1348 | conn->src, conn->dst); |
1349 | if (!pchan) | 1349 | if (!pchan) |
1350 | return; | 1350 | return; |
@@ -1792,7 +1792,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, | |||
1792 | 1792 | ||
1793 | auth_type = l2cap_get_auth_type(chan); | 1793 | auth_type = l2cap_get_auth_type(chan); |
1794 | 1794 | ||
1795 | if (chan->dcid == L2CAP_CID_LE_DATA) | 1795 | if (chan->dcid == L2CAP_CID_ATT) |
1796 | hcon = hci_connect(hdev, LE_LINK, dst, dst_type, | 1796 | hcon = hci_connect(hdev, LE_LINK, dst, dst_type, |
1797 | chan->sec_level, auth_type); | 1797 | chan->sec_level, auth_type); |
1798 | else | 1798 | else |
@@ -6397,7 +6397,7 @@ static void l2cap_att_channel(struct l2cap_conn *conn, | |||
6397 | { | 6397 | { |
6398 | struct l2cap_chan *chan; | 6398 | struct l2cap_chan *chan; |
6399 | 6399 | ||
6400 | chan = l2cap_global_chan_by_scid(0, L2CAP_CID_LE_DATA, | 6400 | chan = l2cap_global_chan_by_scid(0, L2CAP_CID_ATT, |
6401 | conn->src, conn->dst); | 6401 | conn->src, conn->dst); |
6402 | if (!chan) | 6402 | if (!chan) |
6403 | goto drop; | 6403 | goto drop; |
@@ -6448,7 +6448,7 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb) | |||
6448 | l2cap_conless_channel(conn, psm, skb); | 6448 | l2cap_conless_channel(conn, psm, skb); |
6449 | break; | 6449 | break; |
6450 | 6450 | ||
6451 | case L2CAP_CID_LE_DATA: | 6451 | case L2CAP_CID_ATT: |
6452 | l2cap_att_channel(conn, skb); | 6452 | l2cap_att_channel(conn, skb); |
6453 | break; | 6453 | break; |
6454 | 6454 | ||
@@ -6574,7 +6574,7 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) | |||
6574 | continue; | 6574 | continue; |
6575 | } | 6575 | } |
6576 | 6576 | ||
6577 | if (chan->scid == L2CAP_CID_LE_DATA) { | 6577 | if (chan->scid == L2CAP_CID_ATT) { |
6578 | if (!status && encrypt) { | 6578 | if (!status && encrypt) { |
6579 | chan->sec_level = hcon->sec_level; | 6579 | chan->sec_level = hcon->sec_level; |
6580 | l2cap_chan_ready(chan); | 6580 | l2cap_chan_ready(chan); |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 36fed40c162c..0098af80b213 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -466,7 +466,7 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, | |||
466 | static bool l2cap_valid_mtu(struct l2cap_chan *chan, u16 mtu) | 466 | static bool l2cap_valid_mtu(struct l2cap_chan *chan, u16 mtu) |
467 | { | 467 | { |
468 | switch (chan->scid) { | 468 | switch (chan->scid) { |
469 | case L2CAP_CID_LE_DATA: | 469 | case L2CAP_CID_ATT: |
470 | if (mtu < L2CAP_LE_MIN_MTU) | 470 | if (mtu < L2CAP_LE_MIN_MTU) |
471 | return false; | 471 | return false; |
472 | break; | 472 | break; |
@@ -630,7 +630,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, | |||
630 | conn = chan->conn; | 630 | conn = chan->conn; |
631 | 631 | ||
632 | /*change security for LE channels */ | 632 | /*change security for LE channels */ |
633 | if (chan->scid == L2CAP_CID_LE_DATA) { | 633 | if (chan->scid == L2CAP_CID_ATT) { |
634 | if (!conn->hcon->out) { | 634 | if (!conn->hcon->out) { |
635 | err = -EINVAL; | 635 | err = -EINVAL; |
636 | break; | 636 | break; |