Realtek/rtkbt: remove ACL over HCI support.
authorDavid Marble <drmarble1@gmail.com>
Mon, 1 Apr 2024 18:04:54 +0000 (13:04 -0500)
committerDavid Marble <drmarble1@gmail.com>
Mon, 1 Apr 2024 18:30:52 +0000 (13:30 -0500)
It was removed by Google in QPR2.
SCO over HCI support was also removed by Google but had already been disabled by realtek.
Remove more remnants of SCO over HCI.

Change-Id: I69bc859a6ebfa65287cb20968eb82e2e133f200c

rtkbt/code/libbt-vendor/include/rtk_btsnoop_net.h
rtkbt/code/libbt-vendor/src/hci_h5.c
rtkbt/code/libbt-vendor/src/rtk_btsnoop_net.c
rtkbt/code/libbt-vendor/src/userial_vendor.c

index 8fa21d4b111c7103856b5902aaf9932889d775bb..1bb6a4261c97d6fddab1cab03ebac00fd5430c39 100755 (executable)
@@ -49,7 +49,7 @@
 
 void rtk_btsnoop_open(void);
 void rtk_btsnoop_close(void);
-void rtk_btsnoop_capture(const HC_BT_HDR *p_buf, bool is_rcvd);
+void rtk_btsnoop_capture(const HC_BT_HDR *p_buf);
 
 void rtk_btsnoop_net_open();
 void rtk_btsnoop_net_close();
index fc59163a259d5e91201e61eab9499439416520bd..d838edc5200e5adffd83c8e3ec6f83b0eb2a1b65 100755 (executable)
@@ -1501,20 +1501,10 @@ static uint8_t h5_complete_rx_pkt(tHCI_H5_CB *h5)
     //H5LogMsg("h5_complete_rx_pkt, pkt_type = %d", pkt_type);
     switch (pkt_type)
     {
-        case HCI_ACLDATA_PKT:
-            pass_up = 1;
-            eventtype = MSG_HC_TO_STACK_HCI_ACL;
-        break;
-
         case HCI_EVENT_PKT:
             pass_up = 1;
             eventtype = MSG_HC_TO_STACK_HCI_EVT;
             break;
-
-        case HCI_SCODATA_PKT:
-            pass_up = 1;
-            eventtype = MSG_HC_TO_STACK_HCI_SCO;
-            break;
         case HCI_COMMAND_PKT:
             pass_up = 1;
             eventtype = MSG_HC_TO_STACK_HCI_ERR;
index 27edcd7dad155c11b175fb0c0853d4368d75b18d..0dea18a12a07066199ab3592939e2eedb2052244 100755 (executable)
@@ -180,7 +180,7 @@ static void rtk_btsnoop_write_packet(serial_data_type_t type, const uint8_t *pac
     pthread_mutex_unlock(&btsnoop_log_lock);
 }
 
-void rtk_btsnoop_capture(const HC_BT_HDR *p_buf, bool is_rcvd) {
+void rtk_btsnoop_capture(const HC_BT_HDR *p_buf) {
   const uint8_t *p = (const uint8_t *)(p_buf + 1) + p_buf->offset;
 
   if (hci_btsnoop_fd == -1)
@@ -192,14 +192,6 @@ void rtk_btsnoop_capture(const HC_BT_HDR *p_buf, bool is_rcvd) {
     else
       rtk_btsnoop_write_packet(HCI_EVENT_PKT, p, false);
       break;
-    case MSG_HC_TO_STACK_HCI_ACL:
-    case MSG_STACK_TO_HC_HCI_ACL:
-      rtk_btsnoop_write_packet(HCI_ACLDATA_PKT, p, is_rcvd);
-      break;
-    case MSG_HC_TO_STACK_HCI_SCO:
-    case MSG_STACK_TO_HC_HCI_SCO:
-      rtk_btsnoop_write_packet(HCI_SCODATA_PKT, p, is_rcvd);
-      break;
     case MSG_STACK_TO_HC_HCI_CMD:
       if(((rtkbt_h5logfilter & 1) == 0) || (*p != 0x94) || (*(p + 1) != 0xfc))
       rtk_btsnoop_write_packet(HCI_COMMAND_PKT, p, true);
index 16cbe9966ca38ff6a33f66f24ea666c7dc8e71f8..a801aabf08663a08a4d7ab788a498e85996829a0 100755 (executable)
@@ -855,8 +855,7 @@ static int userial_coex_recv_data_handler(unsigned char * recv_buffer, int total
     unsigned char * p_data = recv_buffer;
     int length = total_length;
     HC_BT_HDR * p_buf;
-    uint8_t boundary_flag;
-    uint16_t len, handle, acl_length, l2cap_length;
+    uint16_t len;
     switch (coex_packet_recv_state) {
         case RTKBT_PACKET_IDLE:
             coex_packet_bytes_need = 1;
@@ -952,26 +951,11 @@ static int userial_coex_recv_data_handler(unsigned char * recv_buffer, int total
                     if(rtk_parse_manager)
                         rtk_parse_manager->rtk_parse_internal_event_intercept(coex_resvered_buffer);
                 break;
-
-                case DATA_TYPE_ACL:
-                    p_buf->event = MSG_HC_TO_STACK_HCI_ACL;
-                    handle =  *(uint16_t *)coex_resvered_buffer;
-                    acl_length = *(uint16_t *)&coex_resvered_buffer[2];
-                    l2cap_length = *(uint16_t *)&coex_resvered_buffer[4];
-                    boundary_flag = RTK_GET_BOUNDARY_FLAG(handle);
-                    if(rtk_parse_manager)
-                        rtk_parse_manager->rtk_parse_l2cap_data(coex_resvered_buffer, 0);
-                break;
-
-                case DATA_TYPE_SCO:
-                    p_buf->event = MSG_HC_TO_STACK_HCI_SCO;
-                break;
-
                 default:
                     p_buf->event = MSG_HC_TO_STACK_HCI_ERR;
                 break;
             }
-            rtk_btsnoop_capture(p_buf, true);
+            rtk_btsnoop_capture(p_buf);
         }
         break;
 
@@ -994,8 +978,7 @@ static void userial_coex_send_data_handler(unsigned char * send_buffer, int tota
     type = send_buffer[0];
     int length = total_length;
     HC_BT_HDR * p_buf;
-    uint8_t boundary_flag;
-    uint16_t len, handle, acl_length, l2cap_length;
+    uint16_t len;
 
     len = BT_HC_HDR_SIZE + (length - 1);
     uint8_t packet[len];
@@ -1011,27 +994,12 @@ static void userial_coex_send_data_handler(unsigned char * send_buffer, int tota
             if(rtk_parse_manager)
                 rtk_parse_manager->rtk_parse_command(&send_buffer[1]);
         break;
-
-        case DATA_TYPE_ACL:
-            p_buf->event = MSG_STACK_TO_HC_HCI_ACL;
-            handle =  *(uint16_t *)&send_buffer[1];
-            acl_length = *(uint16_t *)&send_buffer[3];
-            l2cap_length = *(uint16_t *)&send_buffer[5];
-            boundary_flag = RTK_GET_BOUNDARY_FLAG(handle);
-            if(rtk_parse_manager)
-                rtk_parse_manager->rtk_parse_l2cap_data(&send_buffer[1], 1);
-
-        break;
-
-        case DATA_TYPE_SCO:
-            p_buf->event = MSG_STACK_TO_HC_HCI_SCO;
-        break;
         default:
             p_buf->event = 0;
             ALOGE("%s invalid data type: %d", __func__, type);
         break;
     }
-    rtk_btsnoop_capture(p_buf, false);
+    rtk_btsnoop_capture(p_buf);
 }
 
 static void userial_coex_handler(void *context)