Skip to content

Commit d988e2a

Browse files
Phil Elwellpopcornmix
authored andcommitted
hci_h5: Don't send conf_req when ACTIVE
Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag.
1 parent 34eba91 commit d988e2a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/bluetooth/hci_h5.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu)
308308
h5_link_control(hu, conf_req, 3);
309309
} else if (memcmp(data, conf_req, 2) == 0) {
310310
h5_link_control(hu, conf_rsp, 2);
311-
h5_link_control(hu, conf_req, 3);
311+
if (h5->state != H5_ACTIVE)
312+
h5_link_control(hu, conf_req, 3);
312313
} else if (memcmp(data, conf_rsp, 2) == 0) {
313314
if (H5_HDR_LEN(hdr) > 2)
314315
h5->tx_win = (data[2] & 0x07);

0 commit comments

Comments
 (0)