Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/holtmann/bluetooth-2.6
  • Loading branch information
David S. Miller committed Nov 16, 2009
2 parents 8812304 + 68ae663 commit eaa04dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
conn->type = type;
conn->mode = HCI_CM_ACTIVE;
conn->state = BT_OPEN;
conn->auth_type = HCI_AT_GENERAL_BONDING;

conn->power_save = 1;
conn->disc_timeout = HCI_DISCONN_TIMEOUT;
Expand Down
13 changes: 9 additions & 4 deletions net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ static int l2cap_build_conf_req(struct sock *sk, void *data)
{
struct l2cap_pinfo *pi = l2cap_pi(sk);
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_ERTM };
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
void *ptr = req->data;

BT_DBG("sk %p", sk);
Expand Down Expand Up @@ -2394,13 +2394,21 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;

pi->conf_state |= L2CAP_CONF_MODE_DONE;

l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
sizeof(rfc), (unsigned long) &rfc);

break;

case L2CAP_MODE_STREAMING:
pi->remote_tx_win = rfc.txwin_size;
pi->max_pdu_size = rfc.max_pdu_size;

pi->conf_state |= L2CAP_CONF_MODE_DONE;

l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
sizeof(rfc), (unsigned long) &rfc);

break;

default:
Expand All @@ -2410,9 +2418,6 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
rfc.mode = pi->mode;
}

l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
sizeof(rfc), (unsigned long) &rfc);

if (result == L2CAP_CONF_SUCCESS)
pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
}
Expand Down

0 comments on commit eaa04dc

Please sign in to comment.