Skip to content

Commit b97d073

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 70e4074 commit b97d073

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
@@ -357,7 +357,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu)
357357
h5_link_control(hu, conf_req, 3);
358358
} else if (memcmp(data, conf_req, 2) == 0) {
359359
h5_link_control(hu, conf_rsp, 2);
360-
h5_link_control(hu, conf_req, 3);
360+
if (h5->state != H5_ACTIVE)
361+
h5_link_control(hu, conf_req, 3);
361362
} else if (memcmp(data, conf_rsp, 2) == 0) {
362363
if (H5_HDR_LEN(hdr) > 2)
363364
h5->tx_win = (data[2] & 0x07);

0 commit comments

Comments
 (0)