Skip to content

Commit 35e5750

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 83333df commit 35e5750

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
@@ -339,7 +339,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu)
339339
h5_link_control(hu, conf_req, 3);
340340
} else if (memcmp(data, conf_req, 2) == 0) {
341341
h5_link_control(hu, conf_rsp, 2);
342-
h5_link_control(hu, conf_req, 3);
342+
if (h5->state != H5_ACTIVE)
343+
h5_link_control(hu, conf_req, 3);
343344
} else if (memcmp(data, conf_rsp, 2) == 0) {
344345
if (H5_HDR_LEN(hdr) > 2)
345346
h5->tx_win = (data[2] & 0x07);

0 commit comments

Comments
 (0)