diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/l2cap.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 9ba1e8eee37c..0f34e1275147 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2527,6 +2527,10 @@ done: | |||
2527 | if (pi->imtu != L2CAP_DEFAULT_MTU) | 2527 | if (pi->imtu != L2CAP_DEFAULT_MTU) |
2528 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu); | 2528 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu); |
2529 | 2529 | ||
2530 | if (!(pi->conn->feat_mask & L2CAP_FEAT_ERTM) && | ||
2531 | !(pi->conn->feat_mask & L2CAP_FEAT_STREAMING)) | ||
2532 | break; | ||
2533 | |||
2530 | rfc.mode = L2CAP_MODE_BASIC; | 2534 | rfc.mode = L2CAP_MODE_BASIC; |
2531 | rfc.txwin_size = 0; | 2535 | rfc.txwin_size = 0; |
2532 | rfc.max_transmit = 0; | 2536 | rfc.max_transmit = 0; |
@@ -2534,6 +2538,8 @@ done: | |||
2534 | rfc.monitor_timeout = 0; | 2538 | rfc.monitor_timeout = 0; |
2535 | rfc.max_pdu_size = 0; | 2539 | rfc.max_pdu_size = 0; |
2536 | 2540 | ||
2541 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2542 | (unsigned long) &rfc); | ||
2537 | break; | 2543 | break; |
2538 | 2544 | ||
2539 | case L2CAP_MODE_ERTM: | 2545 | case L2CAP_MODE_ERTM: |
@@ -2546,6 +2552,9 @@ done: | |||
2546 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) | 2552 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) |
2547 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); | 2553 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); |
2548 | 2554 | ||
2555 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2556 | (unsigned long) &rfc); | ||
2557 | |||
2549 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) | 2558 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) |
2550 | break; | 2559 | break; |
2551 | 2560 | ||
@@ -2566,6 +2575,9 @@ done: | |||
2566 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) | 2575 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) |
2567 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); | 2576 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); |
2568 | 2577 | ||
2578 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2579 | (unsigned long) &rfc); | ||
2580 | |||
2569 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) | 2581 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) |
2570 | break; | 2582 | break; |
2571 | 2583 | ||
@@ -2577,9 +2589,6 @@ done: | |||
2577 | break; | 2589 | break; |
2578 | } | 2590 | } |
2579 | 2591 | ||
2580 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2581 | (unsigned long) &rfc); | ||
2582 | |||
2583 | /* FIXME: Need actual value of the flush timeout */ | 2592 | /* FIXME: Need actual value of the flush timeout */ |
2584 | //if (flush_to != L2CAP_DEFAULT_FLUSH_TO) | 2593 | //if (flush_to != L2CAP_DEFAULT_FLUSH_TO) |
2585 | // l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO, 2, pi->flush_to); | 2594 | // l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO, 2, pi->flush_to); |