aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-17 03:05:02 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-17 03:05:02 -0500
commita2bfbc072e279ff81e6b336acff612b9bc2e5281 (patch)
tree89cfe21911e1539e1b7f89d8a10d42abecba2a18 /net/bluetooth
parent5c427ff9e4cc61625d48172ea082ae99e21eea6a (diff)
parent82b3cc1a2f5e46300a9dec4a8cc8106dc20a4c23 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/can/Kconfig
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_conn.c1
-rw-r--r--net/bluetooth/l2cap.c13
2 files changed, 10 insertions, 4 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index a9750984f772..b7c4224f4e7d 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -211,6 +211,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
211 conn->type = type; 211 conn->type = type;
212 conn->mode = HCI_CM_ACTIVE; 212 conn->mode = HCI_CM_ACTIVE;
213 conn->state = BT_OPEN; 213 conn->state = BT_OPEN;
214 conn->auth_type = HCI_AT_GENERAL_BONDING;
214 215
215 conn->power_save = 1; 216 conn->power_save = 1;
216 conn->disc_timeout = HCI_DISCONN_TIMEOUT; 217 conn->disc_timeout = HCI_DISCONN_TIMEOUT;
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index ff0233df6246..80d929842f04 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2206,7 +2206,7 @@ static int l2cap_build_conf_req(struct sock *sk, void *data)
2206{ 2206{
2207 struct l2cap_pinfo *pi = l2cap_pi(sk); 2207 struct l2cap_pinfo *pi = l2cap_pi(sk);
2208 struct l2cap_conf_req *req = data; 2208 struct l2cap_conf_req *req = data;
2209 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_ERTM }; 2209 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
2210 void *ptr = req->data; 2210 void *ptr = req->data;
2211 2211
2212 BT_DBG("sk %p", sk); 2212 BT_DBG("sk %p", sk);
@@ -2395,6 +2395,10 @@ done:
2395 rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO; 2395 rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
2396 2396
2397 pi->conf_state |= L2CAP_CONF_MODE_DONE; 2397 pi->conf_state |= L2CAP_CONF_MODE_DONE;
2398
2399 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
2400 sizeof(rfc), (unsigned long) &rfc);
2401
2398 break; 2402 break;
2399 2403
2400 case L2CAP_MODE_STREAMING: 2404 case L2CAP_MODE_STREAMING:
@@ -2402,6 +2406,10 @@ done:
2402 pi->max_pdu_size = rfc.max_pdu_size; 2406 pi->max_pdu_size = rfc.max_pdu_size;
2403 2407
2404 pi->conf_state |= L2CAP_CONF_MODE_DONE; 2408 pi->conf_state |= L2CAP_CONF_MODE_DONE;
2409
2410 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
2411 sizeof(rfc), (unsigned long) &rfc);
2412
2405 break; 2413 break;
2406 2414
2407 default: 2415 default:
@@ -2411,9 +2419,6 @@ done:
2411 rfc.mode = pi->mode; 2419 rfc.mode = pi->mode;
2412 } 2420 }
2413 2421
2414 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
2415 sizeof(rfc), (unsigned long) &rfc);
2416
2417 if (result == L2CAP_CONF_SUCCESS) 2422 if (result == L2CAP_CONF_SUCCESS)
2418 pi->conf_state |= L2CAP_CONF_OUTPUT_DONE; 2423 pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
2419 } 2424 }