summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorGustavo F. Padovan <gustavo@las.ic.unicamp.br>2009-07-04 15:06:24 -0300
committerMarcel Holtmann <marcel@holtmann.org>2009-08-22 14:50:07 -0700
commitf2fcfcd670257236ebf2088bbdf26f6a8ef459fe (patch)
tree5bc6061e3b684ae545b24e2919ab43b711e04c4d /include/net
parent65c7c4918450f8c4545ccb02a9c7a3d77e073535 (diff)
downloadlinux-3.10-f2fcfcd670257236ebf2088bbdf26f6a8ef459fe.tar.gz
linux-3.10-f2fcfcd670257236ebf2088bbdf26f6a8ef459fe.tar.bz2
linux-3.10-f2fcfcd670257236ebf2088bbdf26f6a8ef459fe.zip
Bluetooth: Add configuration support for ERTM and Streaming mode
Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device should propose the same mode. If not, then the channel gets disconnected. Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/l2cap.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 06b072fd6d5..6fc76986d70 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -27,8 +27,9 @@
/* L2CAP defaults */
#define L2CAP_DEFAULT_MTU 672
+#define L2CAP_DEFAULT_MIN_MTU 48
#define L2CAP_DEFAULT_FLUSH_TO 0xffff
-#define L2CAP_DEFAULT_RX_WINDOW 1
+#define L2CAP_DEFAULT_TX_WINDOW 1
#define L2CAP_DEFAULT_MAX_RECEIVE 1
#define L2CAP_DEFAULT_RETRANS_TO 300 /* 300 milliseconds */
#define L2CAP_DEFAULT_MONITOR_TO 1000 /* 1 second */
@@ -272,6 +273,9 @@ struct l2cap_pinfo {
__u16 omtu;
__u16 flush_to;
__u8 mode;
+ __u8 num_conf_req;
+ __u8 num_conf_rsp;
+
__u8 fcs;
__u8 sec_level;
__u8 role_switch;
@@ -280,10 +284,15 @@ struct l2cap_pinfo {
__u8 conf_req[64];
__u8 conf_len;
__u8 conf_state;
- __u8 conf_retry;
__u8 ident;
+ __u8 remote_tx_win;
+ __u8 remote_max_tx;
+ __u16 retrans_timeout;
+ __u16 monitor_timeout;
+ __u16 max_pdu_size;
+
__le16 sport;
struct l2cap_conn *conn;
@@ -291,12 +300,17 @@ struct l2cap_pinfo {
struct sock *prev_c;
};
-#define L2CAP_CONF_REQ_SENT 0x01
-#define L2CAP_CONF_INPUT_DONE 0x02
-#define L2CAP_CONF_OUTPUT_DONE 0x04
-#define L2CAP_CONF_CONNECT_PEND 0x80
+#define L2CAP_CONF_REQ_SENT 0x01
+#define L2CAP_CONF_INPUT_DONE 0x02
+#define L2CAP_CONF_OUTPUT_DONE 0x04
+#define L2CAP_CONF_MTU_DONE 0x08
+#define L2CAP_CONF_MODE_DONE 0x10
+#define L2CAP_CONF_CONNECT_PEND 0x20
+#define L2CAP_CONF_STATE2_DEVICE 0x80
+
+#define L2CAP_CONF_MAX_CONF_REQ 2
+#define L2CAP_CONF_MAX_CONF_RSP 2
-#define L2CAP_CONF_MAX_RETRIES 2
void l2cap_load(void);