Lines Matching refs:current

256     num = pkt_bmp->current + 1;  in WBTi_FindBitmapIndex()
369 WBTCommand *current = WBT_GetCurrentCommand(work); in WBTi_SwitchNextCommand() local
370 if (current) in WBTi_SwitchNextCommand()
377 current->my_cmd_counter = work->my_command_counter; in WBTi_SwitchNextCommand()
380 switch (current->command) in WBTi_SwitchNextCommand()
390 if ((current->target_bmp & (1 << aid)) != 0) in WBTi_SwitchNextCommand()
393 WBTi_InitBitmap(work, pkt_bmp, (int)current->get.recv_data_size, in WBTi_SwitchNextCommand()
394 current->get.pkt_bmp_table.packet_bitmap[aid], in WBTi_SwitchNextCommand()
395 current->get.recv_buf_table.recv_buf[aid], in WBTi_SwitchNextCommand()
397 pkt_bmp->current = 0; in WBTi_SwitchNextCommand()
410 current->command = WBT_CMD_REQ_NONE; in WBTi_SwitchNextCommand()
414 retval = (current->command != WBT_CMD_REQ_NONE); in WBTi_SwitchNextCommand()
704 WBTCommand *current = WBT_GetCurrentCommand(work); in WBTi_CheckRequest() local
706 if (current) in WBTi_CheckRequest()
708 switch (current->command) in WBTi_CheckRequest()
713 WBTi_MakeCommandHeader(send_buf, WBT_CMD_REQ_SYNC, current->target_bmp, in WBTi_CheckRequest()
714 current->my_cmd_counter); in WBTi_CheckRequest()
720 current->target_bmp, current->my_cmd_counter); in WBTi_CheckRequest()
730 if ((current->target_bmp & (1 << aid)) != 0) in WBTi_CheckRequest()
739 (1 << aid), current->my_cmd_counter); in WBTi_CheckRequest()
740 MI_StoreLE32(&format->req_getblock_done.id, current->get.block_id); in WBTi_CheckRequest()
749 WBTi_MakeCommandHeader(send_buf, current->command, in WBTi_CheckRequest()
750 current->target_bmp, in WBTi_CheckRequest()
751 current->my_cmd_counter); in WBTi_CheckRequest()
752 MI_StoreLE32(&format->req_getblock.id, current->get.block_id); in WBTi_CheckRequest()
756 WBT_DEBUG_OUTPUT1("send ReqBlock id=%d seq=%d\n", current->get.block_id, in WBTi_CheckRequest()
771 WBTi_MakeCommandHeader(send_buf, WBT_CMD_REQ_USER_DATA, current->target_bmp, in WBTi_CheckRequest()
772 current->my_cmd_counter); in WBTi_CheckRequest()
773 MI_StoreLE8(&format->req_userdata.length, current->user_data.size); in WBTi_CheckRequest()
774 MI_CpuCopy8(current->user_data.data, &format->req_userdata.buffer, in WBTi_CheckRequest()
1020 WBTCommand *current = WBT_GetCurrentCommand(work); in WBTi_NotifyCompletionCallback() local
1023 if ((current != NULL) && in WBTi_NotifyCompletionCallback()
1024 (current->my_cmd_counter == token->token_peer_cmd_counter)) in WBTi_NotifyCompletionCallback()
1027 current->peer_cmd_counter = token->token_peer_cmd_counter; in WBTi_NotifyCompletionCallback()
1028 current->peer_bmp = (u16)peer_bmp; /* For debugging */ in WBTi_NotifyCompletionCallback()
1029 if ((current->target_bmp & peer_bmp) != 0) in WBTi_NotifyCompletionCallback()
1032 current->target_bmp &= ~peer_bmp; in WBTi_NotifyCompletionCallback()
1033 current->event = event; in WBTi_NotifyCompletionCallback()
1034 current->result = WBT_RESULT_SUCCESS; in WBTi_NotifyCompletionCallback()
1038 list->callback(work->userdata, current); in WBTi_NotifyCompletionCallback()
1041 else if (current->callback) in WBTi_NotifyCompletionCallback()
1043 current->callback(current); in WBTi_NotifyCompletionCallback()
1047 if (current->target_bmp == 0) in WBTi_NotifyCompletionCallback()
1162 WBTCommand *current = WBT_GetCurrentCommand(work); in WBT_CallPacketRecvHook() local
1165 if (!current) in WBT_CallPacketRecvHook()
1182 if (current->command == WBT_CMD_REQ_SYNC) in WBT_CallPacketRecvHook()
1184 current->sync.num_of_list = in WBT_CallPacketRecvHook()
1186 current->sync.peer_packet_size = in WBT_CallPacketRecvHook()
1188 current->sync.my_packet_size = in WBT_CallPacketRecvHook()
1194 work->my_data_packet_size = current->sync.my_packet_size; in WBT_CallPacketRecvHook()
1195 work->peer_data_packet_size = current->sync.peer_packet_size; in WBT_CallPacketRecvHook()
1198 current->sync.my_packet_size, in WBT_CallPacketRecvHook()
1199 current->sync.peer_packet_size); in WBT_CallPacketRecvHook()
1206 if (current->command == WBT_CMD_REQ_USER_DATA) in WBT_CallPacketRecvHook()
1215 if ((current->command == WBT_CMD_REQ_GET_BLOCK) || in WBT_CallPacketRecvHook()
1216 (current->command == WBT_CMD_REQ_GET_BLOCKINFO)) in WBT_CallPacketRecvHook()
1222 if (id == current->get.block_id) in WBT_CallPacketRecvHook()
1225 if ((current->target_bmp & (1 << aid)) != 0) in WBT_CallPacketRecvHook()
1246 pkt_bmp->current = index; in WBT_CallPacketRecvHook()
1257 if ((current->command == WBT_CMD_REQ_GET_BLOCK) || in WBT_CallPacketRecvHook()
1258 (current->command == WBT_CMD_REQ_GET_BLOCKINFO)) in WBT_CallPacketRecvHook()
1261 if (current->get.block_id == id) in WBT_CallPacketRecvHook()
1265 current->my_cmd_counter, token->token_peer_cmd_counter); in WBT_CallPacketRecvHook()
1267 (current->command == in WBT_CallPacketRecvHook()
1272 WBT_DEBUG_OUTPUT0("c usr cmd tbmp 0x%x\n", current->target_bmp); in WBT_CallPacketRecvHook()
1428 WBTCommand *current = WBT_GetCurrentCommand(work); in WBT_CancelCommand() local
1429 if (current) in WBT_CancelCommand()
1433 bitmap &= current->target_bmp; in WBT_CancelCommand()
1448 current->event = WBT_CMD_CANCEL; in WBT_CancelCommand()
1449 current->target_bmp &= ~bit; in WBT_CancelCommand()
1450 current->peer_bmp = (u16)bit; in WBT_CancelCommand()
1451 list->callback(work->userdata, current); in WBT_CancelCommand()
1454 else if (current->callback) in WBT_CancelCommand()
1456 current->event = WBT_CMD_CANCEL; in WBT_CancelCommand()
1457 current->target_bmp &= ~bit; in WBT_CancelCommand()
1458 current->peer_bmp = (u16)bit; in WBT_CancelCommand()
1459 (*current->callback) (current); in WBT_CancelCommand()
1463 if (current->target_bmp == 0) in WBT_CancelCommand()
1509 const WBTCommand *current = WBT_GetCurrentCommand(work); in WBT_GetDownloadProgress() local
1510 if ((current != NULL) && in WBT_GetDownloadProgress()
1511 (current->command == WBT_CMD_REQ_GET_BLOCK) && (current->get.block_id == id)) in WBT_GetDownloadProgress()
1539 WBTCommand *current; in WBT_SetPacketLength() local
1544 current = WBT_GetCurrentCommand(work); in WBT_SetPacketLength()
1546 if ((current == NULL) || in WBT_SetPacketLength()
1547 ((current->command != WBT_CMD_REQ_GET_BLOCK) && in WBT_SetPacketLength()
1548 (current->command != WBT_CMD_REQ_GET_BLOCKINFO))) in WBT_SetPacketLength()