Lines Matching refs:packet

25 			      struct htc_packet *packet);
29 static inline void restore_tx_packet(struct htc_packet *packet) in restore_tx_packet() argument
31 if (packet->info.tx.flags & HTC_FLAGS_TX_FIXUP_NETBUF) { in restore_tx_packet()
32 skb_pull(packet->skb, sizeof(struct htc_frame_hdr)); in restore_tx_packet()
33 packet->info.tx.flags &= ~HTC_FLAGS_TX_FIXUP_NETBUF; in restore_tx_packet()
40 struct htc_packet *packet; in do_send_completion() local
65 packet = list_first_entry(queue_to_indicate, in do_send_completion()
68 list_del(&packet->list); in do_send_completion()
71 __func__, ep->eid, packet); in do_send_completion()
72 ep->ep_cb.tx_complete(ep->target, packet); in do_send_completion()
78 struct htc_packet *packet) in send_packet_completion() argument
80 struct htc_endpoint *ep = &target->endpoint[packet->endpoint]; in send_packet_completion()
83 restore_tx_packet(packet); in send_packet_completion()
85 list_add_tail(&packet->list, &container); in send_packet_completion()
98 struct htc_packet *packet; in get_htc_packet_credit_based() local
110 packet = list_first_entry(&ep->txq, struct htc_packet, list); in get_htc_packet_credit_based()
114 __func__, packet, get_queue_depth(&ep->txq)); in get_htc_packet_credit_based()
116 transfer_len = packet->act_len + HTC_HDR_LENGTH; in get_htc_packet_credit_based()
159 packet = list_first_entry(&ep->txq, struct htc_packet, list); in get_htc_packet_credit_based()
161 list_del(&packet->list); in get_htc_packet_credit_based()
163 packet->info.tx.cred_used = credits_required; in get_htc_packet_credit_based()
165 packet->info.tx.flags = send_flags; in get_htc_packet_credit_based()
166 packet->info.tx.seqno = ep->seqno; in get_htc_packet_credit_based()
169 list_add_tail(&packet->list, queue); in get_htc_packet_credit_based()
177 struct htc_packet *packet; in get_htc_packet() local
186 packet = list_first_entry(&ep->txq, struct htc_packet, list); in get_htc_packet()
187 list_del(&packet->list); in get_htc_packet()
191 __func__, packet, get_queue_depth(&ep->txq)); in get_htc_packet()
192 packet->info.tx.seqno = ep->seqno; in get_htc_packet()
193 packet->info.tx.flags = 0; in get_htc_packet()
194 packet->info.tx.cred_used = 0; in get_htc_packet()
198 list_add_tail(&packet->list, queue); in get_htc_packet()
211 struct htc_packet *packet; in htc_issue_packets() local
218 packet = list_first_entry(pkt_queue, struct htc_packet, list); in htc_issue_packets()
219 list_del(&packet->list); in htc_issue_packets()
221 skb = packet->skb; in htc_issue_packets()
228 payload_len = packet->act_len; in htc_issue_packets()
238 packet->info.tx.flags |= HTC_FLAGS_TX_FIXUP_NETBUF; in htc_issue_packets()
242 htc_hdr->flags = packet->info.tx.flags; in htc_issue_packets()
243 htc_hdr->eid = (u8) packet->endpoint; in htc_issue_packets()
245 htc_hdr->ctrl[1] = (u8) packet->info.tx.seqno; in htc_issue_packets()
250 list_add_tail(&packet->list, &ep->pipe.tx_lookup_queue); in htc_issue_packets()
269 list_del(&packet->list); in htc_issue_packets()
272 ep->cred_dist.credits += packet->info.tx.cred_used; in htc_issue_packets()
276 list_add(&packet->list, pkt_queue); in htc_issue_packets()
286 __func__, packet, status); in htc_issue_packets()
289 packet = list_first_entry(pkt_queue, in htc_issue_packets()
291 list_del(&packet->list); in htc_issue_packets()
292 packet->status = status; in htc_issue_packets()
293 send_packet_completion(target, packet); in htc_issue_packets()
305 struct htc_packet *packet, *tmp_pkt; in htc_try_send() local
370 packet = list_first_entry(txq, in htc_try_send()
374 list_move_tail(&packet->list, &send_queue); in htc_try_send()
382 list_for_each_entry_safe(packet, tmp_pkt, in htc_try_send()
386 __func__, packet); in htc_try_send()
387 action = ep->ep_cb.tx_full(ep->target, packet); in htc_try_send()
398 list_move_tail(&packet->list, in htc_try_send()
501 static void destroy_htc_txctrl_packet(struct htc_packet *packet) in destroy_htc_txctrl_packet() argument
504 skb = packet->skb; in destroy_htc_txctrl_packet()
506 kfree(packet); in destroy_htc_txctrl_packet()
511 struct htc_packet *packet = NULL; in build_htc_txctrl_packet() local
514 packet = kzalloc(sizeof(struct htc_packet), GFP_KERNEL); in build_htc_txctrl_packet()
515 if (packet == NULL) in build_htc_txctrl_packet()
521 kfree(packet); in build_htc_txctrl_packet()
524 packet->skb = skb; in build_htc_txctrl_packet()
526 return packet; in build_htc_txctrl_packet()
530 struct htc_packet *packet) in htc_free_txctrl_packet() argument
532 destroy_htc_txctrl_packet(packet); in htc_free_txctrl_packet()
541 struct htc_packet *packet) in htc_txctrl_complete() argument
543 htc_free_txctrl_packet(target, packet); in htc_txctrl_complete()
694 struct htc_packet *packet; in htc_flush_tx_endpoint() local
698 packet = list_first_entry(&ep->txq, struct htc_packet, list); in htc_flush_tx_endpoint()
699 list_del(&packet->list); in htc_flush_tx_endpoint()
700 packet->status = 0; in htc_flush_tx_endpoint()
701 send_packet_completion(target, packet); in htc_flush_tx_endpoint()
717 struct htc_packet *packet, *tmp_pkt, *found_packet = NULL; in htc_lookup_tx_packet() local
726 list_for_each_entry_safe(packet, tmp_pkt, &ep->pipe.tx_lookup_queue, in htc_lookup_tx_packet()
729 if (skb == packet->skb) { in htc_lookup_tx_packet()
731 list_del(&packet->list); in htc_lookup_tx_packet()
732 found_packet = packet; in htc_lookup_tx_packet()
747 struct htc_packet *packet; in ath6kl_htc_pipe_tx_complete() local
757 packet = htc_lookup_tx_packet(target, ep, skb); in ath6kl_htc_pipe_tx_complete()
758 if (packet == NULL) { in ath6kl_htc_pipe_tx_complete()
763 packet->status = 0; in ath6kl_htc_pipe_tx_complete()
764 send_packet_completion(target, packet); in ath6kl_htc_pipe_tx_complete()
784 struct htc_packet *packet, *tmp_pkt; in htc_send_packets_multiple() local
790 packet = list_first_entry(pkt_queue, struct htc_packet, list); in htc_send_packets_multiple()
792 if (packet->endpoint >= ENDPOINT_MAX) { in htc_send_packets_multiple()
796 ep = &target->endpoint[packet->endpoint]; in htc_send_packets_multiple()
802 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { in htc_send_packets_multiple()
803 packet->status = -ENOMEM; in htc_send_packets_multiple()
815 struct htc_packet *packet; in alloc_htc_packet_container() local
823 packet = target->pipe.htc_packet_pool; in alloc_htc_packet_container()
824 target->pipe.htc_packet_pool = (struct htc_packet *) packet->list.next; in alloc_htc_packet_container()
828 packet->list.next = NULL; in alloc_htc_packet_container()
829 return packet; in alloc_htc_packet_container()
833 struct htc_packet *packet) in free_htc_packet_container() argument
840 target->pipe.htc_packet_pool = packet; in free_htc_packet_container()
841 packet->list.next = NULL; in free_htc_packet_container()
844 packet->list.next = lh; in free_htc_packet_container()
845 target->pipe.htc_packet_pool = packet; in free_htc_packet_container()
912 struct htc_packet *packet; in do_recv_completion() local
921 packet = list_first_entry(queue_to_indicate, in do_recv_completion()
923 list_del(&packet->list); in do_recv_completion()
924 ep->ep_cb.rx(ep->target, packet); in do_recv_completion()
932 struct htc_packet *packet) in recv_packet_completion() argument
936 list_add_tail(&packet->list, &container); in recv_packet_completion()
949 struct htc_packet *packet; in ath6kl_htc_pipe_rx_complete() local
1063 packet = alloc_htc_packet_container(target); in ath6kl_htc_pipe_rx_complete()
1064 if (packet == NULL) { in ath6kl_htc_pipe_rx_complete()
1069 packet->status = 0; in ath6kl_htc_pipe_rx_complete()
1070 packet->endpoint = htc_hdr->eid; in ath6kl_htc_pipe_rx_complete()
1071 packet->pkt_cntxt = skb; in ath6kl_htc_pipe_rx_complete()
1074 packet->buf = skb_push(skb, 0) + HTC_HDR_LENGTH; in ath6kl_htc_pipe_rx_complete()
1075 packet->act_len = netlen - HTC_HDR_LENGTH - trailerlen; in ath6kl_htc_pipe_rx_complete()
1083 recv_packet_completion(target, ep, packet); in ath6kl_htc_pipe_rx_complete()
1086 free_htc_packet_container(target, packet); in ath6kl_htc_pipe_rx_complete()
1099 struct htc_packet *packet; in htc_flush_rx_queue() local
1107 packet = list_first_entry(&ep->rx_bufq, in htc_flush_rx_queue()
1109 list_del(&packet->list); in htc_flush_rx_queue()
1112 packet->status = -ECANCELED; in htc_flush_rx_queue()
1113 packet->act_len = 0; in htc_flush_rx_queue()
1117 packet, packet->buf_len, in htc_flush_rx_queue()
1118 packet->endpoint); in htc_flush_rx_queue()
1121 list_add_tail(&packet->list, &container); in htc_flush_rx_queue()
1161 struct htc_packet *packet) in htc_rxctrl_complete() argument
1163 struct sk_buff *skb = packet->skb; in htc_rxctrl_complete()
1165 if (packet->endpoint == ENDPOINT_0 && in htc_rxctrl_complete()
1166 packet->status == -ECANCELED && in htc_rxctrl_complete()
1223 struct htc_packet *packet = NULL; in ath6kl_htc_pipe_conn_service() local
1255 packet = htc_alloc_txctrl_packet(target); in ath6kl_htc_pipe_conn_service()
1257 if (packet == NULL) { in ath6kl_htc_pipe_conn_service()
1263 skb = packet->skb; in ath6kl_htc_pipe_conn_service()
1290 set_htc_pkt_info(packet, NULL, (u8 *) conn_msg, in ath6kl_htc_pipe_conn_service()
1294 status = ath6kl_htc_pipe_tx(target, packet); in ath6kl_htc_pipe_conn_service()
1297 packet = NULL; in ath6kl_htc_pipe_conn_service()
1399 if (packet != NULL) in ath6kl_htc_pipe_conn_service()
1400 htc_free_txctrl_packet(target, packet); in ath6kl_htc_pipe_conn_service()
1410 struct htc_packet *packet; in ath6kl_htc_pipe_create() local
1427 packet = kzalloc(sizeof(struct htc_packet), GFP_KERNEL); in ath6kl_htc_pipe_create()
1429 if (packet != NULL) in ath6kl_htc_pipe_create()
1430 free_htc_packet_container(target, packet); in ath6kl_htc_pipe_create()
1463 struct htc_packet *packet; in ath6kl_htc_pipe_cleanup() local
1466 packet = alloc_htc_packet_container(target); in ath6kl_htc_pipe_cleanup()
1467 if (packet == NULL) in ath6kl_htc_pipe_cleanup()
1469 kfree(packet); in ath6kl_htc_pipe_cleanup()
1482 struct htc_packet *packet; in ath6kl_htc_pipe_start() local
1487 packet = htc_alloc_txctrl_packet(target); in ath6kl_htc_pipe_start()
1488 if (packet == NULL) { in ath6kl_htc_pipe_start()
1493 skb = packet->skb; in ath6kl_htc_pipe_start()
1502 set_htc_pkt_info(packet, NULL, (u8 *) setup, in ath6kl_htc_pipe_start()
1508 return ath6kl_htc_pipe_tx(target, packet); in ath6kl_htc_pipe_start()
1540 struct htc_packet *packet) in ath6kl_htc_pipe_tx() argument
1546 __func__, packet->endpoint, packet->buf, in ath6kl_htc_pipe_tx()
1547 packet->act_len); in ath6kl_htc_pipe_tx()
1550 list_add_tail(&packet->list, &queue); in ath6kl_htc_pipe_tx()
1625 struct htc_packet *packet, *tmp_pkt, *first; in ath6kl_htc_pipe_add_rxbuf_multiple() local
1654 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { in ath6kl_htc_pipe_add_rxbuf_multiple()
1655 packet->status = -ECANCELED; in ath6kl_htc_pipe_add_rxbuf_multiple()
1674 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_pipe_flush_rx_buf() local
1682 list_for_each_entry_safe(packet, tmp_pkt, in ath6kl_htc_pipe_flush_rx_buf()
1684 list_del(&packet->list); in ath6kl_htc_pipe_flush_rx_buf()
1688 packet, packet->buf_len, in ath6kl_htc_pipe_flush_rx_buf()
1689 packet->endpoint); in ath6kl_htc_pipe_flush_rx_buf()
1690 dev_kfree_skb(packet->pkt_cntxt); in ath6kl_htc_pipe_flush_rx_buf()