void ncp_tcp_tx_proc(struct work_struct *work) { struct ncp_server *server = container_of(work, struct ncp_server, tx.tq); mutex_lock(&server->rcv.creq_mutex); __ncptcp_try_send(server); mutex_unlock(&server->rcv.creq_mutex); }
void ncp_tcp_tx_proc(void *s) { mm_segment_t fs; struct ncp_server *server = s; fs = get_fs(); set_fs(get_ds()); down(&server->rcv.creq_sem); __ncptcp_try_send(server); up(&server->rcv.creq_sem); set_fs(fs); return; }
static void ncptcp_start_request(struct ncp_server *server, struct ncp_request_reply *req) { size_t signlen; struct ncp_request_header* h; req->tx_ciov = req->tx_iov; h = req->tx_iov[1].iov_base; ncp_init_header(server, req, h); signlen = sign_packet(server, req->tx_iov[1].iov_base + sizeof(struct ncp_request_header) - 1, req->tx_iov[1].iov_len - sizeof(struct ncp_request_header) + 1, cpu_to_be32(req->tx_totallen + 24), req->sign + 4) + 16; req->sign[0] = htonl(NCP_TCP_XMIT_MAGIC); req->sign[1] = htonl(req->tx_totallen + signlen); req->sign[2] = htonl(NCP_TCP_XMIT_VERSION); req->sign[3] = htonl(req->datalen + 8); req->tx_iov[0].iov_base = req->sign; req->tx_iov[0].iov_len = signlen; req->tx_iovlen += 1; req->tx_totallen += signlen; server->tx.creq = req; __ncptcp_try_send(server); }