mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-19 15:39:07 +00:00
Bluetooth: EFS: assign default values in chan add
Assign default EFS values when creating L2CAP channel Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
5a9e7057c5
commit
8f7975b153
@ -39,6 +39,9 @@
|
||||
#define L2CAP_DEFAULT_MAX_PDU_SIZE 1009 /* Sized for 3-DH5 packet */
|
||||
#define L2CAP_DEFAULT_ACK_TO 200
|
||||
#define L2CAP_LE_DEFAULT_MTU 23
|
||||
#define L2CAP_DEFAULT_MAX_SDU_SIZE 0xFFFF
|
||||
#define L2CAP_DEFAULT_SDU_ITIME 0xFFFFFFFF
|
||||
#define L2CAP_DEFAULT_ACC_LAT 0xFFFFFFFF
|
||||
|
||||
#define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */
|
||||
#define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */
|
||||
@ -287,6 +290,12 @@ struct l2cap_conf_efs {
|
||||
__le32 flush_to;
|
||||
} __packed;
|
||||
|
||||
#define L2CAP_SERV_NOTRAFIC 0x00
|
||||
#define L2CAP_SERV_BESTEFFORT 0x01
|
||||
#define L2CAP_SERV_GUARANTEED 0x02
|
||||
|
||||
#define L2CAP_BESTEFFORT_ID 0x01
|
||||
|
||||
struct l2cap_disconn_req {
|
||||
__le16 dcid;
|
||||
__le16 scid;
|
||||
|
@ -338,6 +338,13 @@ static void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
|
||||
chan->omtu = L2CAP_DEFAULT_MTU;
|
||||
}
|
||||
|
||||
chan->local_id = L2CAP_BESTEFFORT_ID;
|
||||
chan->local_stype = L2CAP_SERV_BESTEFFORT;
|
||||
chan->local_msdu = L2CAP_DEFAULT_MAX_SDU_SIZE;
|
||||
chan->local_sdu_itime = L2CAP_DEFAULT_SDU_ITIME;
|
||||
chan->local_acc_lat = L2CAP_DEFAULT_ACC_LAT;
|
||||
chan->local_flush_to = L2CAP_DEFAULT_FLUSH_TO;
|
||||
|
||||
chan_hold(chan);
|
||||
|
||||
list_add(&chan->list, &conn->chan_l);
|
||||
|
Loading…
Reference in New Issue
Block a user