Lines Matching refs:result

64 	int result;  member
134 …nline void ncp_finish_request(struct ncp_server *server, struct ncp_request_reply *req, int result) in ncp_finish_request() argument
136 req->result = result; in ncp_finish_request()
220 int result; in __ncptcp_try_send() local
228 result = do_send(server->ncp_sock, iovc, rq->tx_iovlen, in __ncptcp_try_send()
231 if (result == -EAGAIN) in __ncptcp_try_send()
234 if (result < 0) { in __ncptcp_try_send()
235 pr_err("tcp: Send failed: %d\n", result); in __ncptcp_try_send()
236 __ncp_abort_request(server, rq, result); in __ncptcp_try_send()
239 if (result >= rq->tx_totallen) { in __ncptcp_try_send()
244 rq->tx_totallen -= result; in __ncptcp_try_send()
246 while (iov->iov_len <= result) { in __ncptcp_try_send()
247 result -= iov->iov_len; in __ncptcp_try_send()
251 iov->iov_base += result; in __ncptcp_try_send()
252 iov->iov_len -= result; in __ncptcp_try_send()
392 int result; in ncpdgram_rcv_proc() local
394 result = _recv(sock, &reply, sizeof(reply), MSG_PEEK | MSG_DONTWAIT); in ncpdgram_rcv_proc()
395 if (result < 0) { in ncpdgram_rcv_proc()
398 if (result >= sizeof(reply)) { in ncpdgram_rcv_proc()
407 result = _recv(sock, buf, sizeof(buf), MSG_DONTWAIT); in ncpdgram_rcv_proc()
408 if (result < 0) { in ncpdgram_rcv_proc()
409 ncp_dbg(1, "recv failed with %d\n", result); in ncpdgram_rcv_proc()
412 if (result < 10) { in ncpdgram_rcv_proc()
413 ncp_dbg(1, "too short (%u) watchdog packet\n", result); in ncpdgram_rcv_proc()
425result = _recv(sock, server->unexpected_packet.data, sizeof(server->unexpected_packet.data), MSG_D… in ncpdgram_rcv_proc()
426 if (result < 0) { in ncpdgram_rcv_proc()
429 info_server(server, 0, server->unexpected_packet.data, result); in ncpdgram_rcv_proc()
441 result = _recv(sock, server->rxbuf, req->datalen, MSG_DONTWAIT); in ncpdgram_rcv_proc()
443 if (result >= 0 && server->sign_active && req->tx_type != NCP_DEALLOC_SLOT_REQUEST) { in ncpdgram_rcv_proc()
444 if (result < 8 + 8) { in ncpdgram_rcv_proc()
445 result = -EIO; in ncpdgram_rcv_proc()
449 result -= 8; in ncpdgram_rcv_proc()
451 …ign_verify_reply(server, server->rxbuf + hdrl, result - hdrl, cpu_to_le32(result), server->rxbuf +… in ncpdgram_rcv_proc()
453 result = -EIO; in ncpdgram_rcv_proc()
460 ncp_finish_request(server, req, result); in ncpdgram_rcv_proc()
512 int result; in do_tcp_rcv() local
515 result = _recv(server->ncp_sock, buffer, len, MSG_DONTWAIT); in do_tcp_rcv()
522 result = _recv(server->ncp_sock, dummy, len, MSG_DONTWAIT); in do_tcp_rcv()
524 if (result < 0) { in do_tcp_rcv()
525 return result; in do_tcp_rcv()
527 if (result > len) { in do_tcp_rcv()
528 pr_err("tcp: bug in recvmsg (%u > %Zu)\n", result, len); in do_tcp_rcv()
531 return result; in do_tcp_rcv()
538 int result; in __ncptcp_rcv_proc() local
544 result = do_tcp_rcv(server, server->rcv.ptr, server->rcv.len); in __ncptcp_rcv_proc()
545 if (result == -EAGAIN) { in __ncptcp_rcv_proc()
548 if (result <= 0) { in __ncptcp_rcv_proc()
555 if (result < 0) { in __ncptcp_rcv_proc()
556 pr_err("tcp: error in recvmsg: %d\n", result); in __ncptcp_rcv_proc()
563 server->rcv.ptr += result; in __ncptcp_rcv_proc()
565 server->rcv.len -= result; in __ncptcp_rcv_proc()
703 int result; in do_ncp_rpc_call() local
718 result = ncp_add_request(server, req); in do_ncp_rpc_call()
719 if (result < 0) in do_ncp_rpc_call()
724 result = -EINTR; in do_ncp_rpc_call()
728 result = req->result; in do_ncp_rpc_call()
733 return result; in do_ncp_rpc_call()
743 int result; in ncp_do_request() local
777 result = do_ncp_rpc_call(server, size, reply, max_reply_size); in ncp_do_request()
785 ncp_dbg(2, "do_ncp_rpc_call returned %d\n", result); in ncp_do_request()
787 return result; in ncp_do_request()
799 int result; in ncp_request2() local
813 result = ncp_do_request(server, server->current_size, reply, size); in ncp_request2()
814 if (result < 0) { in ncp_request2()
815 ncp_dbg(1, "ncp_request_error: %d\n", result); in ncp_request2()
820 server->reply_size = result; in ncp_request2()
821 server->ncp_reply_size = result - sizeof(struct ncp_reply_header); in ncp_request2()
823 result = reply->completion_code; in ncp_request2()
825 if (result != 0) in ncp_request2()
826 ncp_vdbg("completion code=%x\n", result); in ncp_request2()
828 return result; in ncp_request2()
834 int result; in ncp_connect() local
844 result = ncp_do_request(server, sizeof(*h), server->packet, server->packet_size); in ncp_connect()
845 if (result < 0) in ncp_connect()
848 result = 0; in ncp_connect()
850 return result; in ncp_connect()