0152-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch 900 B

1234567891011121314151617181920212223
  1. From 8398a93b43f10a99e9c40297d46801eda6e681b1 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Thu, 17 Dec 2015 13:37:07 +0000
  4. Subject: [PATCH] hci_h5: Don't send conf_req when ACTIVE
  5. Without this patch, a modem and kernel can continuously bombard each
  6. other with conf_req and conf_rsp messages, in a demented game of tag.
  7. ---
  8. drivers/bluetooth/hci_h5.c | 3 ++-
  9. 1 file changed, 2 insertions(+), 1 deletion(-)
  10. --- a/drivers/bluetooth/hci_h5.c
  11. +++ b/drivers/bluetooth/hci_h5.c
  12. @@ -314,7 +314,8 @@ static void h5_handle_internal_rx(struct
  13. h5_link_control(hu, conf_req, 3);
  14. } else if (memcmp(data, conf_req, 2) == 0) {
  15. h5_link_control(hu, conf_rsp, 2);
  16. - h5_link_control(hu, conf_req, 3);
  17. + if (h5->state != H5_ACTIVE)
  18. + h5_link_control(hu, conf_req, 3);
  19. } else if (memcmp(data, conf_rsp, 2) == 0) {
  20. if (H5_HDR_LEN(hdr) > 2)
  21. h5->tx_win = (data[2] & 7);