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()
239 packet->info.tx.flags |= HTC_FLAGS_TX_FIXUP_NETBUF; in htc_issue_packets()
243 htc_hdr->flags = packet->info.tx.flags; in htc_issue_packets()
244 htc_hdr->eid = (u8) packet->endpoint; in htc_issue_packets()
246 htc_hdr->ctrl[1] = (u8) packet->info.tx.seqno; in htc_issue_packets()
251 list_add_tail(&packet->list, &ep->pipe.tx_lookup_queue); in htc_issue_packets()
270 list_del(&packet->list); in htc_issue_packets()
273 ep->cred_dist.credits += packet->info.tx.cred_used; in htc_issue_packets()
277 list_add(&packet->list, pkt_queue); in htc_issue_packets()
287 __func__, packet, status); in htc_issue_packets()
290 packet = list_first_entry(pkt_queue, in htc_issue_packets()
292 list_del(&packet->list); in htc_issue_packets()
293 packet->status = status; in htc_issue_packets()
294 send_packet_completion(target, packet); in htc_issue_packets()
306 struct htc_packet *packet, *tmp_pkt; in htc_try_send() local
371 packet = list_first_entry(txq, in htc_try_send()
375 list_move_tail(&packet->list, &send_queue); in htc_try_send()
383 list_for_each_entry_safe(packet, tmp_pkt, in htc_try_send()
387 __func__, packet); in htc_try_send()
388 action = ep->ep_cb.tx_full(ep->target, packet); in htc_try_send()
399 list_move_tail(&packet->list, in htc_try_send()
502 static void destroy_htc_txctrl_packet(struct htc_packet *packet) in destroy_htc_txctrl_packet() argument
505 skb = packet->skb; in destroy_htc_txctrl_packet()
507 kfree(packet); in destroy_htc_txctrl_packet()
512 struct htc_packet *packet = NULL; in build_htc_txctrl_packet() local
515 packet = kzalloc(sizeof(struct htc_packet), GFP_KERNEL); in build_htc_txctrl_packet()
516 if (packet == NULL) in build_htc_txctrl_packet()
522 kfree(packet); in build_htc_txctrl_packet()
525 packet->skb = skb; in build_htc_txctrl_packet()
527 return packet; in build_htc_txctrl_packet()
531 struct htc_packet *packet) in htc_free_txctrl_packet() argument
533 destroy_htc_txctrl_packet(packet); in htc_free_txctrl_packet()
542 struct htc_packet *packet) in htc_txctrl_complete() argument
544 htc_free_txctrl_packet(target, packet); in htc_txctrl_complete()
695 struct htc_packet *packet; in htc_flush_tx_endpoint() local
699 packet = list_first_entry(&ep->txq, struct htc_packet, list); in htc_flush_tx_endpoint()
700 list_del(&packet->list); in htc_flush_tx_endpoint()
701 packet->status = 0; in htc_flush_tx_endpoint()
702 send_packet_completion(target, packet); in htc_flush_tx_endpoint()
718 struct htc_packet *packet, *tmp_pkt, *found_packet = NULL; in htc_lookup_tx_packet() local
727 list_for_each_entry_safe(packet, tmp_pkt, &ep->pipe.tx_lookup_queue, in htc_lookup_tx_packet()
730 if (skb == packet->skb) { in htc_lookup_tx_packet()
732 list_del(&packet->list); in htc_lookup_tx_packet()
733 found_packet = packet; in htc_lookup_tx_packet()
748 struct htc_packet *packet; in ath6kl_htc_pipe_tx_complete() local
760 packet = htc_lookup_tx_packet(target, ep, skb); in ath6kl_htc_pipe_tx_complete()
761 if (packet == NULL) { in ath6kl_htc_pipe_tx_complete()
766 packet->status = 0; in ath6kl_htc_pipe_tx_complete()
767 send_packet_completion(target, packet); in ath6kl_htc_pipe_tx_complete()
787 struct htc_packet *packet, *tmp_pkt; in htc_send_packets_multiple() local
793 packet = list_first_entry(pkt_queue, struct htc_packet, list); in htc_send_packets_multiple()
795 if (packet->endpoint >= ENDPOINT_MAX) { in htc_send_packets_multiple()
799 ep = &target->endpoint[packet->endpoint]; in htc_send_packets_multiple()
805 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { in htc_send_packets_multiple()
806 packet->status = -ENOMEM; in htc_send_packets_multiple()
818 struct htc_packet *packet; in alloc_htc_packet_container() local
826 packet = target->pipe.htc_packet_pool; in alloc_htc_packet_container()
827 target->pipe.htc_packet_pool = (struct htc_packet *) packet->list.next; in alloc_htc_packet_container()
831 packet->list.next = NULL; in alloc_htc_packet_container()
832 return packet; in alloc_htc_packet_container()
836 struct htc_packet *packet) in free_htc_packet_container() argument
843 target->pipe.htc_packet_pool = packet; in free_htc_packet_container()
844 packet->list.next = NULL; in free_htc_packet_container()
847 packet->list.next = lh; in free_htc_packet_container()
848 target->pipe.htc_packet_pool = packet; in free_htc_packet_container()
922 struct htc_packet *packet; in do_recv_completion() local
931 packet = list_first_entry(queue_to_indicate, in do_recv_completion()
933 list_del(&packet->list); in do_recv_completion()
934 ep->ep_cb.rx(ep->target, packet); in do_recv_completion()
942 struct htc_packet *packet) in recv_packet_completion() argument
946 list_add_tail(&packet->list, &container); in recv_packet_completion()
959 struct htc_packet *packet; in ath6kl_htc_pipe_rx_complete() local
1073 packet = alloc_htc_packet_container(target); in ath6kl_htc_pipe_rx_complete()
1074 if (packet == NULL) { in ath6kl_htc_pipe_rx_complete()
1079 packet->status = 0; in ath6kl_htc_pipe_rx_complete()
1080 packet->endpoint = htc_hdr->eid; in ath6kl_htc_pipe_rx_complete()
1081 packet->pkt_cntxt = skb; in ath6kl_htc_pipe_rx_complete()
1084 packet->buf = skb_push(skb, 0) + HTC_HDR_LENGTH; in ath6kl_htc_pipe_rx_complete()
1085 packet->act_len = netlen - HTC_HDR_LENGTH - trailerlen; in ath6kl_htc_pipe_rx_complete()
1093 recv_packet_completion(target, ep, packet); in ath6kl_htc_pipe_rx_complete()
1096 free_htc_packet_container(target, packet); in ath6kl_htc_pipe_rx_complete()
1109 struct htc_packet *packet; in htc_flush_rx_queue() local
1117 packet = list_first_entry(&ep->rx_bufq, in htc_flush_rx_queue()
1119 list_del(&packet->list); in htc_flush_rx_queue()
1122 packet->status = -ECANCELED; in htc_flush_rx_queue()
1123 packet->act_len = 0; in htc_flush_rx_queue()
1127 packet, packet->buf_len, in htc_flush_rx_queue()
1128 packet->endpoint); in htc_flush_rx_queue()
1131 list_add_tail(&packet->list, &container); in htc_flush_rx_queue()
1171 struct htc_packet *packet) in htc_rxctrl_complete() argument
1173 struct sk_buff *skb = packet->skb; in htc_rxctrl_complete()
1175 if (packet->endpoint == ENDPOINT_0 && in htc_rxctrl_complete()
1176 packet->status == -ECANCELED && in htc_rxctrl_complete()
1233 struct htc_packet *packet = NULL; in ath6kl_htc_pipe_conn_service() local
1265 packet = htc_alloc_txctrl_packet(target); in ath6kl_htc_pipe_conn_service()
1267 if (packet == NULL) { in ath6kl_htc_pipe_conn_service()
1273 skb = packet->skb; in ath6kl_htc_pipe_conn_service()
1301 set_htc_pkt_info(packet, NULL, (u8 *) conn_msg, in ath6kl_htc_pipe_conn_service()
1305 status = ath6kl_htc_pipe_tx(target, packet); in ath6kl_htc_pipe_conn_service()
1308 packet = NULL; in ath6kl_htc_pipe_conn_service()
1410 if (packet != NULL) in ath6kl_htc_pipe_conn_service()
1411 htc_free_txctrl_packet(target, packet); in ath6kl_htc_pipe_conn_service()
1421 struct htc_packet *packet; in ath6kl_htc_pipe_create() local
1438 packet = kzalloc(sizeof(struct htc_packet), GFP_KERNEL); in ath6kl_htc_pipe_create()
1440 if (packet != NULL) in ath6kl_htc_pipe_create()
1441 free_htc_packet_container(target, packet); in ath6kl_htc_pipe_create()
1474 struct htc_packet *packet; in ath6kl_htc_pipe_cleanup() local
1477 packet = alloc_htc_packet_container(target); in ath6kl_htc_pipe_cleanup()
1478 if (packet == NULL) in ath6kl_htc_pipe_cleanup()
1480 kfree(packet); in ath6kl_htc_pipe_cleanup()
1493 struct htc_packet *packet; in ath6kl_htc_pipe_start() local
1498 packet = htc_alloc_txctrl_packet(target); in ath6kl_htc_pipe_start()
1499 if (packet == NULL) { in ath6kl_htc_pipe_start()
1504 skb = packet->skb; in ath6kl_htc_pipe_start()
1514 set_htc_pkt_info(packet, NULL, (u8 *) setup, in ath6kl_htc_pipe_start()
1520 return ath6kl_htc_pipe_tx(target, packet); in ath6kl_htc_pipe_start()
1552 struct htc_packet *packet) in ath6kl_htc_pipe_tx() argument
1558 __func__, packet->endpoint, packet->buf, in ath6kl_htc_pipe_tx()
1559 packet->act_len); in ath6kl_htc_pipe_tx()
1562 list_add_tail(&packet->list, &queue); in ath6kl_htc_pipe_tx()
1637 struct htc_packet *packet, *tmp_pkt, *first; in ath6kl_htc_pipe_add_rxbuf_multiple() local
1666 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { in ath6kl_htc_pipe_add_rxbuf_multiple()
1667 packet->status = -ECANCELED; in ath6kl_htc_pipe_add_rxbuf_multiple()
1686 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_pipe_flush_rx_buf() local
1694 list_for_each_entry_safe(packet, tmp_pkt, in ath6kl_htc_pipe_flush_rx_buf()
1696 list_del(&packet->list); in ath6kl_htc_pipe_flush_rx_buf()
1700 packet, packet->buf_len, in ath6kl_htc_pipe_flush_rx_buf()
1701 packet->endpoint); in ath6kl_htc_pipe_flush_rx_buf()
1702 dev_kfree_skb(packet->pkt_cntxt); in ath6kl_htc_pipe_flush_rx_buf()