Bluetooth: Provide msg_name callback for L2CAP connectionless channels

The L2CAP connectionless channels use SOCK_DGRAM and recvmsg() and need
to receive the remote BD_ADDR and PSM information via msg_name from
the recvmsg() system call.

So in case the L2CAP socket is for connectionless channels, provide
a msg_name callback that can update the data. Also store the remote
BD_ADDR and PSM in the skb so it can be extracted later on.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Marcel Holtmann
2013-10-13 12:55:29 -07:00
committed by Johan Hedberg
parent d97636980f
commit 2edf870d19
3 changed files with 20 additions and 1 deletions

View File

@@ -284,6 +284,8 @@ struct bt_skb_cb {
__u8 force_active;
struct l2cap_ctrl control;
struct hci_req_ctrl req;
bdaddr_t bdaddr;
__le16 psm;
};
#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))