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->my_cmd_counter == token->token_peer_cmd_counter) in WBTi_NotifyCompletionCallback()
1026 current->peer_cmd_counter = token->token_peer_cmd_counter; in WBTi_NotifyCompletionCallback()
1027 current->peer_bmp = (u16)peer_bmp; /* For debugging */ in WBTi_NotifyCompletionCallback()
1028 if ((current->target_bmp & peer_bmp) != 0) in WBTi_NotifyCompletionCallback()
1031 current->target_bmp &= ~peer_bmp; in WBTi_NotifyCompletionCallback()
1032 current->event = event; in WBTi_NotifyCompletionCallback()
1033 current->result = WBT_RESULT_SUCCESS; in WBTi_NotifyCompletionCallback()
1037 list->callback(work->userdata, current); in WBTi_NotifyCompletionCallback()
1040 else if (current->callback) in WBTi_NotifyCompletionCallback()
1042 current->callback(current); in WBTi_NotifyCompletionCallback()
1046 if (current->target_bmp == 0) in WBTi_NotifyCompletionCallback()
1161 WBTCommand *current = WBT_GetCurrentCommand(work); in WBT_CallPacketRecvHook() local
1164 if (!current) in WBT_CallPacketRecvHook()
1181 if (current->command == WBT_CMD_REQ_SYNC) in WBT_CallPacketRecvHook()
1183 current->sync.num_of_list = in WBT_CallPacketRecvHook()
1185 current->sync.peer_packet_size = in WBT_CallPacketRecvHook()
1187 current->sync.my_packet_size = in WBT_CallPacketRecvHook()
1193 work->my_data_packet_size = current->sync.my_packet_size; in WBT_CallPacketRecvHook()
1194 work->peer_data_packet_size = current->sync.peer_packet_size; in WBT_CallPacketRecvHook()
1197 current->sync.my_packet_size, in WBT_CallPacketRecvHook()
1198 current->sync.peer_packet_size); in WBT_CallPacketRecvHook()
1205 if (current->command == WBT_CMD_REQ_USER_DATA) in WBT_CallPacketRecvHook()
1214 if ((current->command == WBT_CMD_REQ_GET_BLOCK) || in WBT_CallPacketRecvHook()
1215 (current->command == WBT_CMD_REQ_GET_BLOCKINFO)) in WBT_CallPacketRecvHook()
1221 if (id == current->get.block_id) in WBT_CallPacketRecvHook()
1224 if ((current->target_bmp & (1 << aid)) != 0) in WBT_CallPacketRecvHook()
1245 pkt_bmp->current = index; in WBT_CallPacketRecvHook()
1256 if ((current->command == WBT_CMD_REQ_GET_BLOCK) || in WBT_CallPacketRecvHook()
1257 (current->command == WBT_CMD_REQ_GET_BLOCKINFO)) in WBT_CallPacketRecvHook()
1260 if (current->get.block_id == id) in WBT_CallPacketRecvHook()
1264 current->my_cmd_counter, token->token_peer_cmd_counter); in WBT_CallPacketRecvHook()
1266 (current->command == in WBT_CallPacketRecvHook()
1271 WBT_DEBUG_OUTPUT0("c usr cmd tbmp 0x%x\n", current->target_bmp); in WBT_CallPacketRecvHook()
1427 WBTCommand *current = WBT_GetCurrentCommand(work); in WBT_CancelCommand() local
1428 if (current) in WBT_CancelCommand()
1432 bitmap &= current->target_bmp; in WBT_CancelCommand()
1447 current->event = WBT_CMD_CANCEL; in WBT_CancelCommand()
1448 current->target_bmp &= ~bit; in WBT_CancelCommand()
1449 current->peer_bmp = (u16)bit; in WBT_CancelCommand()
1450 list->callback(work->userdata, current); in WBT_CancelCommand()
1453 else if (current->callback) in WBT_CancelCommand()
1455 current->event = WBT_CMD_CANCEL; in WBT_CancelCommand()
1456 current->target_bmp &= ~bit; in WBT_CancelCommand()
1457 current->peer_bmp = (u16)bit; in WBT_CancelCommand()
1458 (*current->callback) (current); in WBT_CancelCommand()
1462 if (current->target_bmp == 0) in WBT_CancelCommand()
1508 const WBTCommand *current = WBT_GetCurrentCommand(work); in WBT_GetDownloadProgress() local
1509 if ((current != NULL) && in WBT_GetDownloadProgress()
1510 (current->command == WBT_CMD_REQ_GET_BLOCK) && (current->get.block_id == id)) in WBT_GetDownloadProgress()
1538 WBTCommand *current; in WBT_SetPacketLength() local
1543 current = WBT_GetCurrentCommand(work); in WBT_SetPacketLength()
1545 if ((current == NULL) || in WBT_SetPacketLength()
1546 ((current->command != WBT_CMD_REQ_GET_BLOCK) && in WBT_SetPacketLength()
1547 (current->command != WBT_CMD_REQ_GET_BLOCKINFO))) in WBT_SetPacketLength()