Lines Matching refs:dhandle
52 static void hidh_conn_retry (UINT8 dhandle);
134 tHID_STATUS hidh_conn_disconnect (UINT8 dhandle) in hidh_conn_disconnect() argument
136 tHID_CONN *p_hcon = &hh_cb.devices[dhandle].conn; in hidh_conn_disconnect()
146 L2CA_SetIdleTimeoutByBdAddr(hh_cb.devices[dhandle].addr, 0, BT_TRANSPORT_BR_EDR); in hidh_conn_disconnect()
300 uint8_t dhandle = PTR_TO_UINT(data); in hidh_process_repage_timer_timeout() local
301 hidh_try_repage(dhandle); in hidh_process_repage_timer_timeout()
313 void hidh_try_repage(UINT8 dhandle) in hidh_try_repage() argument
317 hidh_conn_initiate(dhandle); in hidh_try_repage()
319 device = &hh_cb.devices[dhandle]; in hidh_try_repage()
322 hh_cb.callback(dhandle, device->addr, HID_HDEV_EVT_RETRYING, in hidh_try_repage()
339 UINT8 dhandle; in hidh_sec_check_complete_orig() local
345 dhandle = (PTR_TO_UINT(p_dev) - PTR_TO_UINT(&(hh_cb.devices[0])))/ sizeof(tHID_HOST_DEV_CTB); in hidh_sec_check_complete_orig()
365 hidh_conn_retry (dhandle); in hidh_sec_check_complete_orig()
371 hidh_conn_disconnect(dhandle); in hidh_sec_check_complete_orig()
389 UINT8 dhandle; in hidh_l2cif_connect_cfm() local
395 if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES ) in hidh_l2cif_connect_cfm()
397 p_dev = &hh_cb.devices[dhandle]; in hidh_l2cif_connect_cfm()
398 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_connect_cfm()
418 hidh_conn_disconnect(dhandle); in hidh_l2cif_connect_cfm()
421 if( (hh_cb.devices[dhandle].conn_tries <= HID_HOST_MAX_CONN_RETRY) && in hidh_l2cif_connect_cfm()
425 hidh_conn_retry(dhandle); in hidh_l2cif_connect_cfm()
431 … hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, reason, NULL ) ; in hidh_l2cif_connect_cfm()
470 UINT8 dhandle; in hidh_l2cif_config_ind() local
475 if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES ) in hidh_l2cif_config_ind()
477 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_config_ind()
509 … if ((p_hcon->intr_cid = L2CA_ConnectReq (HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr)) == 0) in hidh_l2cif_config_ind()
514 hidh_conn_disconnect (dhandle); in hidh_l2cif_config_ind()
515 … hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, reason, NULL ) ; in hidh_l2cif_config_ind()
536 hh_cb.devices[dhandle].state = HID_DEV_CONNECTED; in hidh_l2cif_config_ind()
537 hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_OPEN, 0, NULL ) ; in hidh_l2cif_config_ind()
554 UINT8 dhandle; in hidh_l2cif_config_cfm() local
561 if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES ) in hidh_l2cif_config_cfm()
562 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_config_cfm()
573 hidh_conn_disconnect (dhandle); in hidh_l2cif_config_cfm()
575 hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, reason, NULL ) ; in hidh_l2cif_config_cfm()
587 … if ((p_hcon->intr_cid = L2CA_ConnectReq (HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr)) == 0) in hidh_l2cif_config_cfm()
592 hidh_conn_disconnect (dhandle); in hidh_l2cif_config_cfm()
593 … hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, reason, NULL ) ; in hidh_l2cif_config_cfm()
614 hh_cb.devices[dhandle].state = HID_DEV_CONNECTED; in hidh_l2cif_config_cfm()
615 hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_OPEN, 0, NULL ) ; in hidh_l2cif_config_cfm()
632 UINT8 dhandle; in hidh_l2cif_disconnect_ind() local
638 if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES ) in hidh_l2cif_disconnect_ind()
639 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_disconnect_ind()
661 hh_cb.devices[dhandle].state = HID_DEV_NO_CONN; in hidh_l2cif_disconnect_ind()
669 (!(hh_cb.devices[dhandle].attr_mask & HID_RECONN_INIT)) && in hidh_l2cif_disconnect_ind()
670 (hh_cb.devices[dhandle].attr_mask & HID_NORMALLY_CONNECTABLE)) in hidh_l2cif_disconnect_ind()
672 hh_cb.devices[dhandle].conn_tries = 0; in hidh_l2cif_disconnect_ind()
674 alarm_set_on_queue(hh_cb.devices[dhandle].conn.process_repage_timer, in hidh_l2cif_disconnect_ind()
676 UINT_TO_PTR(dhandle), btu_general_alarm_queue); in hidh_l2cif_disconnect_ind()
677 … hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, disc_res, NULL); in hidh_l2cif_disconnect_ind()
698 …hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, hid_close_evt_reason, N… in hidh_l2cif_disconnect_ind()
715 UINT8 dhandle; in hidh_l2cif_disconnect_cfm() local
720 if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES ) in hidh_l2cif_disconnect_cfm()
721 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_disconnect_cfm()
745 hh_cb.devices[dhandle].state = HID_DEV_NO_CONN; in hidh_l2cif_disconnect_cfm()
747 …hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, p_hcon->disc_reason, NUL… in hidh_l2cif_disconnect_cfm()
763 UINT8 dhandle; in hidh_l2cif_cong_ind() local
767 if( (dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES ) in hidh_l2cif_cong_ind()
768 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_cong_ind()
807 UINT8 dhandle; in hidh_l2cif_data_ind() local
813 if ((dhandle = find_conn_by_cid(l2cap_cid)) < HID_HOST_MAX_DEVICES) in hidh_l2cif_data_ind()
814 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_data_ind()
836 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_HANDSHAKE, param, NULL); in hidh_l2cif_data_ind()
844 hidh_conn_disconnect( dhandle ) ; in hidh_l2cif_data_ind()
846 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_VC_UNPLUG, 0, NULL); in hidh_l2cif_data_ind()
857 evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ? in hidh_l2cif_data_ind()
859 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, evt, rep_type, p_msg); in hidh_l2cif_data_ind()
863 evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) ? in hidh_l2cif_data_ind()
865 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, evt, rep_type, p_msg); in hidh_l2cif_data_ind()
883 tHID_STATUS hidh_conn_snd_data (UINT8 dhandle, UINT8 trans_type, UINT8 param, in hidh_conn_snd_data() argument
886 tHID_CONN *p_hcon = &hh_cb.devices[dhandle].conn; in hidh_conn_snd_data()
897 if (!BTM_IsAclConnectionUp(hh_cb.devices[dhandle].addr, BT_TRANSPORT_BR_EDR)) in hidh_conn_snd_data()
1019 tHID_STATUS hidh_conn_initiate (UINT8 dhandle) in hidh_conn_initiate() argument
1024 tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle]; in hidh_conn_initiate()
1047 hh_cb.callback( dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_conn_initiate()
1098 static void hidh_conn_retry( UINT8 dhandle ) in hidh_conn_retry() argument
1100 tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle]; in hidh_conn_retry()
1107 UINT_TO_PTR(dhandle), btu_general_alarm_queue); in hidh_conn_retry()
1109 hidh_process_repage_process(dhandle); in hidh_conn_retry()