aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/l2cap.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-10-13 08:50:41 -0700
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-13 18:58:30 +0300
commit4f1654e08464abad06487e173661cb73721d27a7 (patch)
tree03906a24a3ad343060e5cec47f59513b3a4e6998 /include/net/bluetooth/l2cap.h
parentBluetooth: Store address information in L2CAP channel structure (diff)
downloadlinux-dev-4f1654e08464abad06487e173661cb73721d27a7.tar.xz
linux-dev-4f1654e08464abad06487e173661cb73721d27a7.zip
Bluetooth: Return the correct address type for L2CAP sockets
The L2CAP sockets can use BR/EDR public, LE public and LE random addresses for various combinations of source and destination devices. So make sure that getsockname(), getpeername() and accept() return the correct address type. For this the address type of the source and destination is stored with the L2CAP channel information. The stored address type is not the one specific for the HCI protocol. It is the address type used for the L2CAP sockets and the management interface. The underlying HCI connections store the HCI address type. If needed, it gets converted to the socket address type. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net/bluetooth/l2cap.h')
-rw-r--r--include/net/bluetooth/l2cap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 26b5066e74e2..a27d51dc39a4 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -445,8 +445,11 @@ struct l2cap_chan {
__u8 state;
bdaddr_t dst;
+ __u8 dst_type;
bdaddr_t src;
+ __u8 src_type;
__le16 psm;
+ __le16 sport;
__u16 dcid;
__u16 scid;
@@ -457,8 +460,6 @@ struct l2cap_chan {
__u8 chan_type;
__u8 chan_policy;
- __le16 sport;
-
__u8 sec_level;
__u8 ident;