@@ -2838,6 +2838,18 @@ static uint16_t l2cap_br_conf_rsp_opt_ret_fc(struct bt_l2cap_chan *chan, struct
2838
2838
br_chan -> rx .max_transmit = opt_ret_fc -> max_transmit ;
2839
2839
br_chan -> rx .max_window = sys_le16_to_cpu (opt_ret_fc -> tx_windows_size );
2840
2840
br_chan -> rx .mps = sys_le16_to_cpu (opt_ret_fc -> mps );
2841
+
2842
+ if ((opt_ret_fc -> mode == BT_L2CAP_BR_LINK_MODE_RET ) ||
2843
+ (opt_ret_fc -> mode == BT_L2CAP_BR_LINK_MODE_FC )) {
2844
+ /*
2845
+ * Bluetooth Core specification Version 6.0 | Vol 3, Part A, section 5.4.
2846
+ *
2847
+ * In Retransmission mode and Flow Control mode this parameter should be
2848
+ * negotiated to reflect the buffer sizes allocated for the connection on
2849
+ * both sides.
2850
+ */
2851
+ br_chan -> tx .max_window = br_chan -> rx .max_window ;
2852
+ }
2841
2853
}
2842
2854
2843
2855
if (!accept ) {
@@ -3251,6 +3263,18 @@ static uint16_t l2cap_br_conf_rsp_unaccept_opt_ret_fc(struct bt_l2cap_chan *chan
3251
3263
br_chan -> rx .max_transmit = opt_ret_fc -> max_transmit ;
3252
3264
br_chan -> rx .max_window = opt_ret_fc -> tx_windows_size ;
3253
3265
br_chan -> rx .mps = sys_le16_to_cpu (opt_ret_fc -> mps );
3266
+
3267
+ if ((opt_ret_fc -> mode == BT_L2CAP_BR_LINK_MODE_RET ) ||
3268
+ (opt_ret_fc -> mode == BT_L2CAP_BR_LINK_MODE_FC )) {
3269
+ /*
3270
+ * Bluetooth Core specification Version 6.0 | Vol 3, Part A, section 5.4.
3271
+ *
3272
+ * In Retransmission mode and Flow Control mode this parameter should be
3273
+ * negotiated to reflect the buffer sizes allocated for the connection on
3274
+ * both sides.
3275
+ */
3276
+ br_chan -> tx .max_window = br_chan -> rx .max_window ;
3277
+ }
3254
3278
}
3255
3279
3256
3280
if (br_chan -> rx .mode == BT_L2CAP_BR_LINK_MODE_BASIC ) {
@@ -3975,6 +3999,18 @@ static uint16_t l2cap_br_conf_opt_ret_fc(struct bt_l2cap_chan *chan, struct net_
3975
3999
br_chan -> tx .max_transmit = opt_ret_fc -> max_transmit ;
3976
4000
br_chan -> tx .max_window = opt_ret_fc -> tx_windows_size ;
3977
4001
br_chan -> tx .mps = sys_le16_to_cpu (opt_ret_fc -> mps );
4002
+
4003
+ if ((opt_ret_fc -> mode == BT_L2CAP_BR_LINK_MODE_RET ) ||
4004
+ (opt_ret_fc -> mode == BT_L2CAP_BR_LINK_MODE_FC )) {
4005
+ /*
4006
+ * Bluetooth Core specification Version 6.0 | Vol 3, Part A, section 5.4.
4007
+ *
4008
+ * In Retransmission mode and Flow Control mode this parameter should be
4009
+ * negotiated to reflect the buffer sizes allocated for the connection on
4010
+ * both sides.
4011
+ */
4012
+ br_chan -> rx .max_window = br_chan -> tx .max_window ;
4013
+ }
3978
4014
}
3979
4015
3980
4016
if (!accept ) {
0 commit comments