Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7888b61c authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'for-upstream' of...

parents d9a577c3 71fb4197
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -115,6 +115,9 @@ struct bt_voice {
#define BT_VOICE_TRANSPARENT			0x0003
#define BT_VOICE_CVSD_16BIT			0x0060

#define BT_SNDMTU		12
#define BT_RCVMTU		13

__printf(1, 2)
int bt_info(const char *fmt, ...);
__printf(1, 2)
+6 −0
Original line number Diff line number Diff line
@@ -275,6 +275,12 @@ enum {
#define LMP_EXTFEATURES	0x80

/* Extended LMP features */
#define LMP_CSB_MASTER	0x01
#define LMP_CSB_SLAVE	0x02
#define LMP_SYNC_TRAIN	0x04
#define LMP_SYNC_SCAN	0x08

/* Host features */
#define LMP_HOST_SSP		0x01
#define LMP_HOST_LE		0x02
#define LMP_HOST_LE_BREDR	0x04
+6 −0
Original line number Diff line number Diff line
@@ -798,6 +798,12 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
#define lmp_transp_capable(dev)    ((dev)->features[0][2] & LMP_TRANSPARENT)

/* ----- Extended LMP capabilities ----- */
#define lmp_csb_master_capable(dev) ((dev)->features[2][0] & LMP_CSB_MASTER)
#define lmp_csb_slave_capable(dev)  ((dev)->features[2][0] & LMP_CSB_SLAVE)
#define lmp_sync_train_capable(dev) ((dev)->features[2][0] & LMP_SYNC_TRAIN)
#define lmp_sync_scan_capable(dev)  ((dev)->features[2][0] & LMP_SYNC_SCAN)

/* ----- Host capabilities ----- */
#define lmp_host_ssp_capable(dev)  ((dev)->features[1][0] & LMP_HOST_SSP)
#define lmp_host_le_capable(dev)   (!!((dev)->features[1][0] & LMP_HOST_LE))
#define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR))
+45 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ struct l2cap_conninfo {
#define L2CAP_MOVE_CHAN_CFM_RSP	0x11
#define L2CAP_CONN_PARAM_UPDATE_REQ	0x12
#define L2CAP_CONN_PARAM_UPDATE_RSP	0x13
#define L2CAP_LE_CONN_REQ	0x14
#define L2CAP_LE_CONN_RSP	0x15
#define L2CAP_LE_CREDITS	0x16

/* L2CAP extended feature mask */
#define L2CAP_FEAT_FLOWCTL	0x00000001
@@ -249,6 +252,7 @@ struct l2cap_conn_rsp {
#define L2CAP_CID_SMP		0x0006
#define L2CAP_CID_DYN_START	0x0040
#define L2CAP_CID_DYN_END	0xffff
#define L2CAP_CID_LE_DYN_END	0x007f

/* connect/create channel results */
#define L2CAP_CR_SUCCESS	0x0000
@@ -257,6 +261,10 @@ struct l2cap_conn_rsp {
#define L2CAP_CR_SEC_BLOCK	0x0003
#define L2CAP_CR_NO_MEM		0x0004
#define L2CAP_CR_BAD_AMP	0x0005
#define L2CAP_CR_AUTHENTICATION	0x0005
#define L2CAP_CR_AUTHORIZATION	0x0006
#define L2CAP_CR_BAD_KEY_SIZE	0x0007
#define L2CAP_CR_ENCRYPTION	0x0008

/* connect/create channel status */
#define L2CAP_CS_NO_INFO	0x0000
@@ -321,6 +329,12 @@ struct l2cap_conf_rfc {
#define L2CAP_MODE_ERTM		0x03
#define L2CAP_MODE_STREAMING	0x04

/* Unlike the above this one doesn't actually map to anything that would
 * ever be sent over the air. Therefore, use a value that's unlikely to
 * ever be used in the BR/EDR configuration phase.
 */
#define L2CAP_MODE_LE_FLOWCTL	0x80

struct l2cap_conf_efs {
	__u8	id;
	__u8	stype;
@@ -423,6 +437,30 @@ struct l2cap_conn_param_update_rsp {
#define L2CAP_CONN_PARAM_ACCEPTED	0x0000
#define L2CAP_CONN_PARAM_REJECTED	0x0001

#define L2CAP_LE_MAX_CREDITS		10
#define L2CAP_LE_DEFAULT_MPS		230

struct l2cap_le_conn_req {
	__le16     psm;
	__le16     scid;
	__le16     mtu;
	__le16     mps;
	__le16     credits;
} __packed;

struct l2cap_le_conn_rsp {
	__le16     dcid;
	__le16     mtu;
	__le16     mps;
	__le16     credits;
	__le16     result;
} __packed;

struct l2cap_le_credits {
	__le16     cid;
	__le16     credits;
} __packed;

/* ----- L2CAP channels and connections ----- */
struct l2cap_seq_list {
	__u16	head;
@@ -477,6 +515,9 @@ struct l2cap_chan {
	__u16		monitor_timeout;
	__u16		mps;

	__u16		tx_credits;
	__u16		rx_credits;

	__u8		tx_state;
	__u8		rx_state;

@@ -553,6 +594,7 @@ struct l2cap_ops {
	void			(*ready) (struct l2cap_chan *chan);
	void			(*defer) (struct l2cap_chan *chan);
	void			(*resume) (struct l2cap_chan *chan);
	void			(*suspend) (struct l2cap_chan *chan);
	void			(*set_shutdown) (struct l2cap_chan *chan);
	long			(*get_sndtimeo) (struct l2cap_chan *chan);
	struct sk_buff		*(*alloc_skb) (struct l2cap_chan *chan,
@@ -654,6 +696,7 @@ enum {
	FLAG_EXT_CTRL,
	FLAG_EFS_ENABLE,
	FLAG_DEFER_SETUP,
	FLAG_LE_CONN_REQ_SENT,
};

enum {
@@ -809,11 +852,13 @@ static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
}

extern bool disable_ertm;
extern bool enable_lecoc;

int l2cap_init_sockets(void);
void l2cap_cleanup_sockets(void);
bool l2cap_is_socket(struct socket *sock);

void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan);
void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);

int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
#include <net/bluetooth/bluetooth.h>
#include <linux/proc_fs.h>

#define VERSION "2.17"
#define VERSION "2.18"

/* Bluetooth sockets */
#define BT_MAX_PROTO	8
Loading