Skip to content

Commit 196fc43

Browse files
Phil Elwellpopcornmix
Phil Elwell
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 6c6dcf2 commit 196fc43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/bluetooth/hci_h5.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu)
358358
h5_link_control(hu, conf_req, 3);
359359
} else if (memcmp(data, conf_req, 2) == 0) {
360360
h5_link_control(hu, conf_rsp, 2);
361-
h5_link_control(hu, conf_req, 3);
361+
if (h5->state != H5_ACTIVE)
362+
h5_link_control(hu, conf_req, 3);
362363
} else if (memcmp(data, conf_rsp, 2) == 0) {
363364
if (H5_HDR_LEN(hdr) > 2)
364365
h5->tx_win = (data[2] & 0x07);

0 commit comments

Comments
 (0)