• Home
  • Raw
  • Download

Lines Matching refs:p_port

142   tPORT* p_port;  in RFCOMM_CreateConnection()  local
144 p_port = port_find_port(dlci, bd_addr); in RFCOMM_CreateConnection()
145 if (p_port != nullptr) { in RFCOMM_CreateConnection()
147 if (!p_port->is_server) { in RFCOMM_CreateConnection()
149 << static_cast<int>(p_port->state) in RFCOMM_CreateConnection()
150 << ", RFC_state=" << static_cast<int>(p_port->rfc.state) in RFCOMM_CreateConnection()
152 << (p_port->rfc.p_mcb ? p_port->rfc.p_mcb->state : 0) in RFCOMM_CreateConnection()
157 << ", port=" << std::to_string(p_port->handle); in RFCOMM_CreateConnection()
158 *p_handle = p_port->handle; in RFCOMM_CreateConnection()
165 p_port = port_allocate_port(dlci, bd_addr); in RFCOMM_CreateConnection()
166 if (p_port == nullptr) { in RFCOMM_CreateConnection()
173 *p_handle = p_port->handle; in RFCOMM_CreateConnection()
178 p_port->default_signal_state = PORT_OBEX_DEFAULT_SIGNAL_STATE; in RFCOMM_CreateConnection()
181 p_port->default_signal_state = PORT_SPP_DEFAULT_SIGNAL_STATE; in RFCOMM_CreateConnection()
184 p_port->default_signal_state = PORT_PPP_DEFAULT_SIGNAL_STATE; in RFCOMM_CreateConnection()
188 p_port->default_signal_state = PORT_DUN_DEFAULT_SIGNAL_STATE; in RFCOMM_CreateConnection()
191 p_port->default_signal_state = in RFCOMM_CreateConnection()
197 p_port->state = PORT_STATE_OPENING; in RFCOMM_CreateConnection()
198 p_port->uuid = uuid; in RFCOMM_CreateConnection()
199 p_port->is_server = is_server; in RFCOMM_CreateConnection()
200 p_port->scn = scn; in RFCOMM_CreateConnection()
201 p_port->ev_mask = 0; in RFCOMM_CreateConnection()
209 p_port->mtu = (mtu < rfcomm_mtu) ? mtu : rfcomm_mtu; in RFCOMM_CreateConnection()
211 p_port->mtu = rfcomm_mtu; in RFCOMM_CreateConnection()
217 p_port->keep_port_handle = true; in RFCOMM_CreateConnection()
220 p_port->keep_mtu = p_port->mtu; in RFCOMM_CreateConnection()
222 p_port->local_ctrl.modem_signal = p_port->default_signal_state; in RFCOMM_CreateConnection()
223 p_port->local_ctrl.fc = false; in RFCOMM_CreateConnection()
224 p_port->p_mgmt_callback = p_mgmt_cb; in RFCOMM_CreateConnection()
225 p_port->bd_addr = bd_addr; in RFCOMM_CreateConnection()
231 << ", signal_state=" << loghex(p_port->default_signal_state) in RFCOMM_CreateConnection()
232 << ", p_port=" << p_port; in RFCOMM_CreateConnection()
235 if (p_port->is_server) { in RFCOMM_CreateConnection()
240 return port_open_continue(p_port); in RFCOMM_CreateConnection()
253 tPORT* p_port; in RFCOMM_RemoveConnection() local
262 p_port = &rfc_cb.port.port[handle - 1]; in RFCOMM_RemoveConnection()
264 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in RFCOMM_RemoveConnection()
269 p_port->state = PORT_STATE_CLOSING; in RFCOMM_RemoveConnection()
271 port_start_close(p_port); in RFCOMM_RemoveConnection()
291 tPORT* p_port = &rfc_cb.port.port[handle - 1]; in RFCOMM_RemoveServer() local
294 p_port->p_mgmt_callback = nullptr; in RFCOMM_RemoveServer()
296 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in RFCOMM_RemoveServer()
303 p_port->keep_port_handle = false; in RFCOMM_RemoveServer()
304 p_port->state = PORT_STATE_CLOSING; in RFCOMM_RemoveServer()
306 port_start_close(p_port); in RFCOMM_RemoveServer()
327 tPORT* p_port; in PORT_SetEventCallback() local
334 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetEventCallback()
336 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_SetEventCallback()
342 p_port->p_callback = p_port_cb; in PORT_SetEventCallback()
357 tPORT* p_port; in PORT_ClearKeepHandleFlag() local
364 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_ClearKeepHandleFlag()
365 p_port->keep_port_handle = 0; in PORT_ClearKeepHandleFlag()
383 tPORT* p_port; in PORT_SetDataCallback() local
393 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetDataCallback()
395 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_SetDataCallback()
399 p_port->p_data_callback = p_port_cb; in PORT_SetDataCallback()
418 tPORT* p_port; in PORT_SetDataCOCallback() local
428 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetDataCOCallback()
430 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_SetDataCOCallback()
434 p_port->p_data_co_callback = p_port_cb; in PORT_SetDataCOCallback()
450 tPORT* p_port; in PORT_SetEventMask() local
460 p_port = &rfc_cb.port.port[port_handle - 1]; in PORT_SetEventMask()
462 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_SetEventMask()
466 p_port->ev_mask = mask; in PORT_SetEventMask()
489 tPORT* p_port = &rfc_cb.port.port[handle - 1]; in PORT_CheckConnection() local
493 __func__, handle, p_port->in_use, p_port->state, p_port->rfc.p_mcb, in PORT_CheckConnection()
494 (p_port->rfc.p_mcb ? p_port->rfc.p_mcb->peer_ready : -1), in PORT_CheckConnection()
495 p_port->rfc.state); in PORT_CheckConnection()
497 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_CheckConnection()
501 if (!p_port->rfc.p_mcb || !p_port->rfc.p_mcb->peer_ready || in PORT_CheckConnection()
502 (p_port->rfc.state != RFC_STATE_OPENED)) { in PORT_CheckConnection()
506 *bd_addr = p_port->rfc.p_mcb->bd_addr; in PORT_CheckConnection()
507 if (p_lcid) *p_lcid = p_port->rfc.p_mcb->lcid; in PORT_CheckConnection()
534 tPORT* p_port = nullptr; in PORT_IsOpening() local
539 p_port = &port; in PORT_IsOpening()
545 (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) { in PORT_IsOpening()
570 tPORT* p_port; in PORT_SetState() local
580 p_port = &rfc_cb.port.port[handle - 1]; in PORT_SetState()
582 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_SetState()
586 if (p_port->line_status) { in PORT_SetState()
593 baud_rate = p_port->user_port_pars.baud_rate; in PORT_SetState()
594 p_port->user_port_pars = *p_settings; in PORT_SetState()
598 port_start_par_neg(p_port); in PORT_SetState()
614 tPORT* p_port; in PORT_GetRxQueueCnt() local
623 p_port = &rfc_cb.port.port[handle - 1]; in PORT_GetRxQueueCnt()
625 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_GetRxQueueCnt()
629 if (p_port->line_status) { in PORT_GetRxQueueCnt()
633 *p_rx_queue_count = p_port->rx.queue_size; in PORT_GetRxQueueCnt()
637 *p_rx_queue_count, p_port->rx.queue_size); in PORT_GetRxQueueCnt()
655 tPORT* p_port; in PORT_GetState() local
664 p_port = &rfc_cb.port.port[handle - 1]; in PORT_GetState()
666 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_GetState()
670 if (p_port->line_status) { in PORT_GetState()
674 *p_settings = p_port->user_port_pars; in PORT_GetState()
690 tPORT* p_port; in PORT_Control() local
700 p_port = &rfc_cb.port.port[handle - 1]; in PORT_Control()
702 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_Control()
706 old_modem_signal = p_port->local_ctrl.modem_signal; in PORT_Control()
707 p_port->local_ctrl.break_signal = 0; in PORT_Control()
711 p_port->local_ctrl.modem_signal |= PORT_CTSRTS_ON; in PORT_Control()
715 p_port->local_ctrl.modem_signal &= ~PORT_CTSRTS_ON; in PORT_Control()
719 p_port->local_ctrl.modem_signal |= PORT_DTRDSR_ON; in PORT_Control()
723 p_port->local_ctrl.modem_signal &= ~PORT_DTRDSR_ON; in PORT_Control()
727 p_port->local_ctrl.modem_signal |= PORT_RING_ON; in PORT_Control()
731 p_port->local_ctrl.modem_signal &= ~PORT_RING_ON; in PORT_Control()
735 p_port->local_ctrl.modem_signal |= PORT_DCD_ON; in PORT_Control()
739 p_port->local_ctrl.modem_signal &= ~PORT_DCD_ON; in PORT_Control()
744 p_port->local_ctrl.break_signal = PORT_BREAK_DURATION; in PORT_Control()
745 else if (p_port->local_ctrl.modem_signal == old_modem_signal) in PORT_Control()
748 port_start_control(p_port); in PORT_Control()
752 ((p_port->local_ctrl.modem_signal & MODEM_SIGNAL_DTRDSR) ? 1 : 0), in PORT_Control()
753 ((p_port->local_ctrl.modem_signal & MODEM_SIGNAL_RTSCTS) ? 1 : 0), in PORT_Control()
754 ((p_port->local_ctrl.modem_signal & MODEM_SIGNAL_RI) ? 1 : 0), in PORT_Control()
755 ((p_port->local_ctrl.modem_signal & MODEM_SIGNAL_DCD) ? 1 : 0)); in PORT_Control()
773 tPORT* p_port; in PORT_FlowControl() local
784 p_port = &rfc_cb.port.port[handle - 1]; in PORT_FlowControl()
786 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_FlowControl()
790 if (!p_port->rfc.p_mcb) { in PORT_FlowControl()
794 p_port->rx.user_fc = !enable; in PORT_FlowControl()
796 if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT) { in PORT_FlowControl()
797 if (!p_port->rx.user_fc) { in PORT_FlowControl()
798 port_flow_control_peer(p_port, true, 0); in PORT_FlowControl()
801 old_fc = p_port->local_ctrl.fc; in PORT_FlowControl()
804 p_port->local_ctrl.fc = (p_port->rx.user_fc | p_port->rx.peer_fc); in PORT_FlowControl()
806 if (p_port->local_ctrl.fc != old_fc) port_start_control(p_port); in PORT_FlowControl()
811 if (enable && (p_port->rx.queue_size != 0)) { in PORT_FlowControl()
813 if (p_port->rx_flag_ev_pending) { in PORT_FlowControl()
814 p_port->rx_flag_ev_pending = false; in PORT_FlowControl()
818 events &= p_port->ev_mask; in PORT_FlowControl()
819 if (p_port->p_callback && events) { in PORT_FlowControl()
820 p_port->p_callback(events, p_port->handle); in PORT_FlowControl()
840 tPORT* p_port; in PORT_FlowControl_MaxCredit() local
851 p_port = &rfc_cb.port.port[handle - 1]; in PORT_FlowControl_MaxCredit()
853 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_FlowControl_MaxCredit()
857 if (!p_port->rfc.p_mcb) { in PORT_FlowControl_MaxCredit()
861 p_port->rx.user_fc = !enable; in PORT_FlowControl_MaxCredit()
863 if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT) { in PORT_FlowControl_MaxCredit()
864 if (!p_port->rx.user_fc) { in PORT_FlowControl_MaxCredit()
865 port_flow_control_peer(p_port, true, p_port->credit_rx); in PORT_FlowControl_MaxCredit()
868 old_fc = p_port->local_ctrl.fc; in PORT_FlowControl_MaxCredit()
871 p_port->local_ctrl.fc = (p_port->rx.user_fc | p_port->rx.peer_fc); in PORT_FlowControl_MaxCredit()
873 if (p_port->local_ctrl.fc != old_fc) port_start_control(p_port); in PORT_FlowControl_MaxCredit()
878 if (enable && (p_port->rx.queue_size != 0)) { in PORT_FlowControl_MaxCredit()
880 if (p_port->rx_flag_ev_pending) { in PORT_FlowControl_MaxCredit()
881 p_port->rx_flag_ev_pending = false; in PORT_FlowControl_MaxCredit()
885 events &= p_port->ev_mask; in PORT_FlowControl_MaxCredit()
886 if (p_port->p_callback && events) { in PORT_FlowControl_MaxCredit()
887 p_port->p_callback(events, p_port->handle); in PORT_FlowControl_MaxCredit()
907 tPORT* p_port; in PORT_GetModemStatus() local
913 p_port = &rfc_cb.port.port[handle - 1]; in PORT_GetModemStatus()
915 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_GetModemStatus()
919 *p_signal = p_port->peer_ctrl.modem_signal; in PORT_GetModemStatus()
945 tPORT* p_port; in PORT_ClearError() local
953 p_port = &rfc_cb.port.port[handle - 1]; in PORT_ClearError()
955 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_ClearError()
959 *p_errors = p_port->line_status; in PORT_ClearError()
964 p_port->line_status = (p_port->line_status & LINE_STATUS_FAILED); in PORT_ClearError()
981 tPORT* p_port; in PORT_SendError() local
989 p_port = &rfc_cb.port.port[handle - 1]; in PORT_SendError()
991 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_SendError()
995 if (!p_port->rfc.p_mcb) { in PORT_SendError()
999 RFCOMM_LineStatusReq(p_port->rfc.p_mcb, p_port->dlci, errors); in PORT_SendError()
1015 tPORT* p_port; in PORT_GetQueueStatus() local
1023 p_port = &rfc_cb.port.port[handle - 1]; in PORT_GetQueueStatus()
1025 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_GetQueueStatus()
1029 p_status->in_queue_size = (uint16_t)p_port->rx.queue_size; in PORT_GetQueueStatus()
1030 p_status->out_queue_size = (uint16_t)p_port->tx.queue_size; in PORT_GetQueueStatus()
1032 p_status->mtu_size = (uint16_t)p_port->peer_mtu; in PORT_GetQueueStatus()
1036 if (!(p_port->peer_ctrl.modem_signal & PORT_CTSRTS_ON)) in PORT_GetQueueStatus()
1039 if (!(p_port->peer_ctrl.modem_signal & PORT_DTRDSR_ON)) in PORT_GetQueueStatus()
1042 if (!(p_port->peer_ctrl.modem_signal & PORT_DCD_ON)) in PORT_GetQueueStatus()
1060 tPORT* p_port; in PORT_Purge() local
1072 p_port = &rfc_cb.port.port[handle - 1]; in PORT_Purge()
1074 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_Purge()
1081 count = fixed_queue_length(p_port->rx.queue); in PORT_Purge()
1083 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->rx.queue)) != NULL) in PORT_Purge()
1086 p_port->rx.queue_size = 0; in PORT_Purge()
1091 if (count) port_flow_control_peer(p_port, true, count); in PORT_Purge()
1097 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->tx.queue)) != NULL) in PORT_Purge()
1100 p_port->tx.queue_size = 0; in PORT_Purge()
1106 events |= port_flow_control_user(p_port); in PORT_Purge()
1108 events &= p_port->ev_mask; in PORT_Purge()
1110 if ((p_port->p_callback != NULL) && events) in PORT_Purge()
1111 (p_port->p_callback)(events, p_port->handle); in PORT_Purge()
1132 tPORT* p_port; in PORT_ReadData() local
1146 p_port = &rfc_cb.port.port[handle - 1]; in PORT_ReadData()
1148 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_ReadData()
1152 if (p_port->line_status) { in PORT_ReadData()
1156 if (fixed_queue_is_empty(p_port->rx.queue)) return (PORT_SUCCESS); in PORT_ReadData()
1161 p_buf = (BT_HDR*)fixed_queue_try_peek_first(p_port->rx.queue); in PORT_ReadData()
1173 p_port->rx.queue_size -= max_len; in PORT_ReadData()
1186 p_port->rx.queue_size -= p_buf->len; in PORT_ReadData()
1192 osi_free(fixed_queue_try_dequeue(p_port->rx.queue)); in PORT_ReadData()
1202 p_port->rx.queue_size, *p_len, (p_data[0])); in PORT_ReadData()
1205 p_port->rx.queue_size, *p_len); in PORT_ReadData()
1210 port_flow_control_peer(p_port, true, count); in PORT_ReadData()
1227 tPORT* p_port; in PORT_Read() local
1236 p_port = &rfc_cb.port.port[handle - 1]; in PORT_Read()
1238 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_Read()
1242 if (p_port->line_status) { in PORT_Read()
1248 p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->rx.queue); in PORT_Read()
1250 p_port->rx.queue_size -= p_buf->len; in PORT_Read()
1256 port_flow_control_peer(p_port, true, 1); in PORT_Read()
1276 static int port_write(tPORT* p_port, BT_HDR* p_buf) { in port_write() argument
1279 if (p_port->is_server && (p_port->rfc.state != RFC_STATE_OPENED)) { in port_write()
1287 if (p_port->tx.peer_fc || !p_port->rfc.p_mcb || in port_write()
1288 !p_port->rfc.p_mcb->peer_ready || in port_write()
1289 (p_port->rfc.state != RFC_STATE_OPENED) || in port_write()
1290 ((p_port->port_ctrl & (PORT_CTRL_REQ_SENT | PORT_CTRL_IND_RECEIVED)) != in port_write()
1292 if ((p_port->tx.queue_size > PORT_TX_CRITICAL_WM) || in port_write()
1293 (fixed_queue_length(p_port->tx.queue) > PORT_TX_BUF_CRITICAL_WM)) { in port_write()
1294 RFCOMM_TRACE_WARNING("PORT_Write: Queue size: %d", p_port->tx.queue_size); in port_write()
1298 if ((p_port->p_callback != NULL) && (p_port->ev_mask & PORT_EV_ERR)) in port_write()
1299 p_port->p_callback(PORT_EV_ERR, p_port->handle); in port_write()
1307 p_port->tx.peer_fc, in port_write()
1308 (p_port->rfc.p_mcb && p_port->rfc.p_mcb->peer_ready), p_port->rfc.state, in port_write()
1309 p_port->port_ctrl); in port_write()
1311 fixed_queue_enqueue(p_port->tx.queue, p_buf); in port_write()
1312 p_port->tx.queue_size += p_buf->len; in port_write()
1318 RFCOMM_DataReq(p_port->rfc.p_mcb, p_port->dlci, p_buf); in port_write()
1335 tPORT* p_port; in PORT_Write() local
1347 p_port = &rfc_cb.port.port[handle - 1]; in PORT_Write()
1349 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_Write()
1354 if (p_port->line_status) { in PORT_Write()
1356 p_port->line_status); in PORT_Write()
1361 rc = port_write(p_port, p_buf); in PORT_Write()
1362 event |= port_flow_control_user(p_port); in PORT_Write()
1374 event &= p_port->ev_mask; in PORT_Write()
1377 if (p_port->p_callback && event) (p_port->p_callback)(event, p_port->handle); in PORT_Write()
1394 tPORT* p_port; in PORT_WriteDataCO() local
1407 p_port = &rfc_cb.port.port[handle - 1]; in PORT_WriteDataCO()
1409 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_WriteDataCO()
1411 p_port->state); in PORT_WriteDataCO()
1415 if (!p_port->peer_mtu) { in PORT_WriteDataCO()
1416 RFCOMM_TRACE_ERROR("PORT_WriteDataByFd() peer_mtu:%d", p_port->peer_mtu); in PORT_WriteDataCO()
1421 if (!p_port->p_data_co_callback(handle, (uint8_t*)&available, in PORT_WriteDataCO()
1440 p_buf = (BT_HDR*)fixed_queue_try_peek_last(p_port->tx.queue); in PORT_WriteDataCO()
1442 (((int)p_buf->len + available) <= (int)p_port->peer_mtu) && in PORT_WriteDataCO()
1446 if (!p_port->p_data_co_callback( in PORT_WriteDataCO()
1460 p_port->tx.queue_size += (uint16_t)available; in PORT_WriteDataCO()
1478 if ((p_port->tx.queue_size > PORT_TX_HIGH_WM) || in PORT_WriteDataCO()
1479 (fixed_queue_length(p_port->tx.queue) > PORT_TX_BUF_HIGH_WM)) { in PORT_WriteDataCO()
1480 port_flow_control_user(p_port); in PORT_WriteDataCO()
1484 p_port->tx.queue_size, fixed_queue_length(p_port->tx.queue), in PORT_WriteDataCO()
1494 if (p_port->peer_mtu < length) length = p_port->peer_mtu; in PORT_WriteDataCO()
1502 if (!p_port->p_data_co_callback(handle, in PORT_WriteDataCO()
1513 rc = port_write(p_port, p_buf); in PORT_WriteDataCO()
1516 event |= port_flow_control_user(p_port); in PORT_WriteDataCO()
1529 event &= p_port->ev_mask; in PORT_WriteDataCO()
1532 if (p_port->p_callback && event) (p_port->p_callback)(event, p_port->handle); in PORT_WriteDataCO()
1552 tPORT* p_port; in PORT_WriteData() local
1566 p_port = &rfc_cb.port.port[handle - 1]; in PORT_WriteData()
1568 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_WriteData()
1569 RFCOMM_TRACE_WARNING("PORT_WriteData() no port state:%d", p_port->state); in PORT_WriteData()
1573 if (!max_len || !p_port->peer_mtu) { in PORT_WriteData()
1574 RFCOMM_TRACE_ERROR("PORT_WriteData() peer_mtu:%d", p_port->peer_mtu); in PORT_WriteData()
1587 p_buf = (BT_HDR*)fixed_queue_try_peek_last(p_port->tx.queue); in PORT_WriteData()
1588 if ((p_buf != NULL) && ((p_buf->len + max_len) <= p_port->peer_mtu) && in PORT_WriteData()
1591 p_port->tx.queue_size += max_len; in PORT_WriteData()
1605 if ((p_port->tx.queue_size > PORT_TX_HIGH_WM) || in PORT_WriteData()
1606 (fixed_queue_length(p_port->tx.queue) > PORT_TX_BUF_HIGH_WM)) in PORT_WriteData()
1614 if (p_port->peer_mtu < length) length = p_port->peer_mtu; in PORT_WriteData()
1623 rc = port_write(p_port, p_buf); in PORT_WriteData()
1626 event |= port_flow_control_user(p_port); in PORT_WriteData()
1640 event &= p_port->ev_mask; in PORT_WriteData()
1643 if (p_port->p_callback && event) (p_port->p_callback)(event, p_port->handle); in PORT_WriteData()
1660 tPORT* p_port; in PORT_Test() local
1667 p_port = &rfc_cb.port.port[handle - 1]; in PORT_Test()
1669 if (!p_port->in_use || (p_port->state == PORT_STATE_CLOSED)) { in PORT_Test()
1673 if (len > ((p_port->mtu == 0) ? RFCOMM_DEFAULT_MTU : p_port->mtu)) { in PORT_Test()
1683 rfc_send_test(p_port->rfc.p_mcb, true, p_buf); in PORT_Test()