aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-06-08 19:05:31 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:08 -0400
commit625477523b4e656fbcc5ec2a8ca7a1beb39b1caf (patch)
treecd268d2f40e981ba30af2b15fc7493db4c0709f0 /net/bluetooth/l2cap.c
parentae12d52efd492ee6634c34322302ac754ff8cde8 (diff)
Bluetooth: Actively send request for Basic Mode
The Profile Tuning Suite requires that we send a RFC containing the Basic Mode configuration when requesting Basic Mode. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index ceed5df43fee..ca9bab225777 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2492,6 +2492,14 @@ done:
2492 case L2CAP_MODE_BASIC: 2492 case L2CAP_MODE_BASIC:
2493 if (pi->imtu != L2CAP_DEFAULT_MTU) 2493 if (pi->imtu != L2CAP_DEFAULT_MTU)
2494 l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu); 2494 l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu);
2495
2496 rfc.mode = L2CAP_MODE_BASIC;
2497 rfc.txwin_size = 0;
2498 rfc.max_transmit = 0;
2499 rfc.retrans_timeout = 0;
2500 rfc.monitor_timeout = 0;
2501 rfc.max_pdu_size = 0;
2502
2495 break; 2503 break;
2496 2504
2497 case L2CAP_MODE_ERTM: 2505 case L2CAP_MODE_ERTM:
@@ -2504,9 +2512,6 @@ done:
2504 if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) 2512 if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10)
2505 rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); 2513 rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10);
2506 2514
2507 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
2508 sizeof(rfc), (unsigned long) &rfc);
2509
2510 if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) 2515 if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS))
2511 break; 2516 break;
2512 2517
@@ -2527,9 +2532,6 @@ done:
2527 if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) 2532 if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10)
2528 rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); 2533 rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10);
2529 2534
2530 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
2531 sizeof(rfc), (unsigned long) &rfc);
2532
2533 if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) 2535 if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS))
2534 break; 2536 break;
2535 2537
@@ -2541,6 +2543,9 @@ done:
2541 break; 2543 break;
2542 } 2544 }
2543 2545
2546 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
2547 (unsigned long) &rfc);
2548
2544 /* FIXME: Need actual value of the flush timeout */ 2549 /* FIXME: Need actual value of the flush timeout */
2545 //if (flush_to != L2CAP_DEFAULT_FLUSH_TO) 2550 //if (flush_to != L2CAP_DEFAULT_FLUSH_TO)
2546 // l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO, 2, pi->flush_to); 2551 // l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO, 2, pi->flush_to);