Lines Matching full:packet

359 static void ath6kl_htc_tx_prep_pkt(struct htc_packet *packet, u8 flags,  in ath6kl_htc_tx_prep_pkt()  argument
364 packet->buf -= HTC_HDR_LENGTH; in ath6kl_htc_tx_prep_pkt()
365 hdr = (struct htc_frame_hdr *)packet->buf; in ath6kl_htc_tx_prep_pkt()
367 put_unaligned_le16(packet->act_len, &hdr->payld_len); in ath6kl_htc_tx_prep_pkt()
369 hdr->eid = packet->endpoint; in ath6kl_htc_tx_prep_pkt()
385 struct htc_packet *packet = NULL; in htc_get_control_buf() local
397 packet = list_first_entry(buf_list, struct htc_packet, list); in htc_get_control_buf()
398 list_del(&packet->list); in htc_get_control_buf()
402 packet->buf = packet->buf_start + HTC_HDR_LENGTH; in htc_get_control_buf()
404 return packet; in htc_get_control_buf()
409 struct htc_packet *packet) in htc_tx_comp_update() argument
411 packet->completion = NULL; in htc_tx_comp_update()
412 packet->buf += HTC_HDR_LENGTH; in htc_tx_comp_update()
414 if (!packet->status) in htc_tx_comp_update()
418 packet->status, packet->endpoint, packet->act_len, in htc_tx_comp_update()
419 packet->info.tx.cred_used); in htc_tx_comp_update()
421 /* on failure to submit, reclaim credits for this packet */ in htc_tx_comp_update()
424 packet->info.tx.cred_used; in htc_tx_comp_update()
451 struct htc_packet *packet) in htc_tx_comp_handler() argument
453 struct htc_endpoint *endpoint = &target->endpoint[packet->endpoint]; in htc_tx_comp_handler()
457 packet->info.tx.seqno); in htc_tx_comp_handler()
459 htc_tx_comp_update(target, endpoint, packet); in htc_tx_comp_handler()
461 list_add_tail(&packet->list, &container); in htc_tx_comp_handler()
470 struct htc_packet *packet; in htc_async_tx_scat_complete() local
483 packet = scat_req->scat_list[0].packet; in htc_async_tx_scat_complete()
484 endpoint = &target->endpoint[packet->endpoint]; in htc_async_tx_scat_complete()
488 packet = scat_req->scat_list[i].packet; in htc_async_tx_scat_complete()
489 if (!packet) { in htc_async_tx_scat_complete()
494 packet->status = scat_req->status; in htc_async_tx_scat_complete()
495 htc_tx_comp_update(target, endpoint, packet); in htc_async_tx_scat_complete()
496 list_add_tail(&packet->list, &tx_compq); in htc_async_tx_scat_complete()
507 struct htc_packet *packet) in ath6kl_htc_tx_issue() argument
513 if (!packet->completion) in ath6kl_htc_tx_issue()
516 send_len = packet->act_len + HTC_HDR_LENGTH; in ath6kl_htc_tx_issue()
522 send_len, packet->info.tx.seqno, padded_len, in ath6kl_htc_tx_issue()
529 packet->buf, padded_len, in ath6kl_htc_tx_issue()
532 packet->status = status; in ath6kl_htc_tx_issue()
533 packet->buf += HTC_HDR_LENGTH; in ath6kl_htc_tx_issue()
537 packet->buf, padded_len, in ath6kl_htc_tx_issue()
538 HIF_WR_ASYNC_BLOCK_INC, packet); in ath6kl_htc_tx_issue()
540 trace_ath6kl_htc_tx(status, packet->endpoint, packet->buf, send_len); in ath6kl_htc_tx_issue()
604 struct htc_packet *packet; in ath6kl_htc_tx_pkts_get() local
612 packet = list_first_entry(&endpoint->txq, struct htc_packet, in ath6kl_htc_tx_pkts_get()
616 "htc tx got packet 0x%p queue depth %d\n", in ath6kl_htc_tx_pkts_get()
617 packet, get_queue_depth(&endpoint->txq)); in ath6kl_htc_tx_pkts_get()
620 packet->act_len + HTC_HDR_LENGTH); in ath6kl_htc_tx_pkts_get()
623 packet->endpoint, len, &req_cred)) in ath6kl_htc_tx_pkts_get()
627 packet = list_first_entry(&endpoint->txq, struct htc_packet, in ath6kl_htc_tx_pkts_get()
629 list_move_tail(&packet->list, queue); in ath6kl_htc_tx_pkts_get()
631 /* save the number of credits this packet consumed */ in ath6kl_htc_tx_pkts_get()
632 packet->info.tx.cred_used = req_cred; in ath6kl_htc_tx_pkts_get()
635 packet->completion = htc_tx_comp_handler; in ath6kl_htc_tx_pkts_get()
636 packet->context = target; in ath6kl_htc_tx_pkts_get()
640 packet->info.tx.flags = flags; in ath6kl_htc_tx_pkts_get()
641 packet->info.tx.seqno = endpoint->seqno; in ath6kl_htc_tx_pkts_get()
663 * packet cannot be bundled unless we add in htc_get_credit_padding()
684 struct htc_packet *packet; in ath6kl_htc_tx_setup_scat_list() local
692 scat_req->scat_list[i].packet = NULL; in ath6kl_htc_tx_setup_scat_list()
697 packet = list_first_entry(queue, struct htc_packet, list); in ath6kl_htc_tx_setup_scat_list()
699 packet->act_len + HTC_HDR_LENGTH); in ath6kl_htc_tx_setup_scat_list()
710 list_del(&packet->list); in ath6kl_htc_tx_setup_scat_list()
712 scat_req->scat_list[i].packet = packet; in ath6kl_htc_tx_setup_scat_list()
713 /* prepare packet and flag message as part of a send bundle */ in ath6kl_htc_tx_setup_scat_list()
714 flags = packet->info.tx.flags | HTC_FLAGS_SEND_BUNDLE; in ath6kl_htc_tx_setup_scat_list()
715 ath6kl_htc_tx_prep_pkt(packet, flags, in ath6kl_htc_tx_setup_scat_list()
716 cred_pad, packet->info.tx.seqno); in ath6kl_htc_tx_setup_scat_list()
718 ath6kl_htc_tx_buf_align(&packet->buf, in ath6kl_htc_tx_setup_scat_list()
719 packet->act_len + HTC_HDR_LENGTH); in ath6kl_htc_tx_setup_scat_list()
720 scat_req->scat_list[i].buf = packet->buf; in ath6kl_htc_tx_setup_scat_list()
727 i, packet, packet->info.tx.seqno, len, rem_scat); in ath6kl_htc_tx_setup_scat_list()
733 packet = scat_req->scat_list[i].packet; in ath6kl_htc_tx_setup_scat_list()
734 if (packet) { in ath6kl_htc_tx_setup_scat_list()
735 packet->buf += HTC_HDR_LENGTH; in ath6kl_htc_tx_setup_scat_list()
736 list_add(&packet->list, queue); in ath6kl_htc_tx_setup_scat_list()
761 struct htc_packet *packet; in ath6kl_htc_tx_bundle() local
838 packet = scat_req->scat_list[i].packet; in ath6kl_htc_tx_bundle()
839 trace_ath6kl_htc_tx(packet->status, packet->endpoint, in ath6kl_htc_tx_bundle()
840 packet->buf, packet->act_len); in ath6kl_htc_tx_bundle()
861 struct htc_packet *packet; in ath6kl_htc_tx_from_queue() local
920 packet = list_first_entry(&txq, struct htc_packet, in ath6kl_htc_tx_from_queue()
922 list_del(&packet->list); in ath6kl_htc_tx_from_queue()
924 ath6kl_htc_tx_prep_pkt(packet, packet->info.tx.flags, in ath6kl_htc_tx_from_queue()
925 0, packet->info.tx.seqno); in ath6kl_htc_tx_from_queue()
926 status = ath6kl_htc_tx_issue(target, packet); in ath6kl_htc_tx_from_queue()
929 packet->status = status; in ath6kl_htc_tx_from_queue()
930 packet->completion(packet->context, packet); in ath6kl_htc_tx_from_queue()
1121 struct htc_packet *packet) in ath6kl_htc_mbox_tx() argument
1128 packet->endpoint, packet->buf, packet->act_len); in ath6kl_htc_mbox_tx()
1130 if (packet->endpoint >= ENDPOINT_MAX) { in ath6kl_htc_mbox_tx()
1135 endpoint = &target->endpoint[packet->endpoint]; in ath6kl_htc_mbox_tx()
1137 if (!ath6kl_htc_tx_try(target, endpoint, packet)) { in ath6kl_htc_mbox_tx()
1138 packet->status = (target->htc_flags & HTC_OP_STATE_STOPPING) ? in ath6kl_htc_mbox_tx()
1141 list_add(&packet->list, &queue); in ath6kl_htc_mbox_tx()
1152 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_mbox_flush_txep() local
1166 list_for_each_entry_safe(packet, tmp_pkt, &endpoint->txq, list) { in ath6kl_htc_mbox_flush_txep()
1168 (tag == packet->info.tx.tag)) in ath6kl_htc_mbox_flush_txep()
1169 list_move_tail(&packet->list, &discard_q); in ath6kl_htc_mbox_flush_txep()
1174 list_for_each_entry_safe(packet, tmp_pkt, &discard_q, list) { in ath6kl_htc_mbox_flush_txep()
1175 packet->status = -ECANCELED; in ath6kl_htc_mbox_flush_txep()
1176 list_del(&packet->list); in ath6kl_htc_mbox_flush_txep()
1179 packet, packet->act_len, in ath6kl_htc_mbox_flush_txep()
1180 packet->endpoint, packet->info.tx.tag); in ath6kl_htc_mbox_flush_txep()
1183 list_add_tail(&packet->list, &container); in ath6kl_htc_mbox_flush_txep()
1268 static int htc_add_rxbuf(struct htc_target *target, struct htc_packet *packet) in htc_add_rxbuf() argument
1273 list_add_tail(&packet->list, &queue); in htc_add_rxbuf()
1278 struct htc_packet *packet, in htc_reclaim_rxbuf() argument
1281 if (packet->info.rx.rx_flags & HTC_RX_PKT_NO_RECYCLE) { in htc_reclaim_rxbuf()
1282 htc_rxpkt_reset(packet); in htc_reclaim_rxbuf()
1283 packet->status = -ECANCELED; in htc_reclaim_rxbuf()
1284 ep->ep_cb.rx(ep->target, packet); in htc_reclaim_rxbuf()
1286 htc_rxpkt_reset(packet); in htc_reclaim_rxbuf()
1287 htc_add_rxbuf((void *)(target), packet); in htc_reclaim_rxbuf()
1292 struct htc_packet *packet) in reclaim_rx_ctrl_buf() argument
1295 list_add_tail(&packet->list, &target->free_ctrl_rxbuf); in reclaim_rx_ctrl_buf()
1300 struct htc_packet *packet, in ath6kl_htc_rx_packet() argument
1309 if (padded_len > packet->buf_len) { in ath6kl_htc_rx_packet()
1310 ath6kl_err("not enough receive space for packet - padlen %d recvlen %d bufferlen %d\n", in ath6kl_htc_rx_packet()
1311 padded_len, rx_len, packet->buf_len); in ath6kl_htc_rx_packet()
1317 packet, packet->info.rx.exp_hdr, in ath6kl_htc_rx_packet()
1322 packet->buf, padded_len, in ath6kl_htc_rx_packet()
1325 packet->status = status; in ath6kl_htc_rx_packet()
1337 struct htc_packet *packet) in ath6kl_htc_rx_set_indicate() argument
1341 if (htc_hdr->eid == packet->endpoint) { in ath6kl_htc_rx_set_indicate()
1343 packet->info.rx.indicat_flags |= in ath6kl_htc_rx_set_indicate()
1369 struct htc_packet *packet; in ath6kl_htc_rx_setup() local
1405 packet = ep_cb.rx_allocthresh(ep->target, ep->eid, in ath6kl_htc_rx_setup()
1419 packet = NULL; in ath6kl_htc_rx_setup()
1421 packet = list_first_entry(&ep->rx_bufq, in ath6kl_htc_rx_setup()
1423 list_del(&packet->list); in ath6kl_htc_rx_setup()
1427 if (!packet) { in ath6kl_htc_rx_setup()
1434 packet->info.rx.rx_flags = 0; in ath6kl_htc_rx_setup()
1435 packet->info.rx.indicat_flags = 0; in ath6kl_htc_rx_setup()
1436 packet->status = 0; in ath6kl_htc_rx_setup()
1444 packet->info.rx.rx_flags |= HTC_RX_PKT_NO_RECYCLE; in ath6kl_htc_rx_setup()
1447 list_add_tail(&packet->list, queue); in ath6kl_htc_rx_setup()
1455 packet->info.rx.rx_flags |= HTC_RX_PKT_REFRESH_HDR; in ath6kl_htc_rx_setup()
1456 packet->info.rx.exp_hdr = 0xFFFFFFFF; in ath6kl_htc_rx_setup()
1459 packet->info.rx.exp_hdr = *lk_ahds; in ath6kl_htc_rx_setup()
1461 packet->act_len = le16_to_cpu(htc_hdr->payld_len) + in ath6kl_htc_rx_setup()
1474 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_rx_alloc() local
1513 * HTC header indicates that every packet to follow in ath6kl_htc_rx_alloc()
1535 /* Setup packet buffers for each message */ in ath6kl_htc_rx_alloc()
1556 list_for_each_entry_safe(packet, tmp_pkt, queue, list) { in ath6kl_htc_rx_alloc()
1557 list_del(&packet->list); in ath6kl_htc_rx_alloc()
1558 htc_reclaim_rxbuf(target, packet, in ath6kl_htc_rx_alloc()
1559 &target->endpoint[packet->endpoint]); in ath6kl_htc_rx_alloc()
1621 * indicating it arrived in an RX packet. in htc_proc_cred_rpt()
1803 struct htc_packet *packet, in ath6kl_htc_rx_process_hdr() argument
1809 struct htc_frame_hdr *htc_hdr = (struct htc_frame_hdr *)packet->buf; in ath6kl_htc_rx_process_hdr()
1820 memcpy((u8 *)&lk_ahd, packet->buf, sizeof(lk_ahd)); in ath6kl_htc_rx_process_hdr()
1822 if (packet->info.rx.rx_flags & HTC_RX_PKT_REFRESH_HDR) { in ath6kl_htc_rx_process_hdr()
1825 * was unknown when this packet was grabbed as part of the in ath6kl_htc_rx_process_hdr()
1828 packet->info.rx.exp_hdr = lk_ahd; in ath6kl_htc_rx_process_hdr()
1829 packet->act_len = payload_len + HTC_HDR_LENGTH; in ath6kl_htc_rx_process_hdr()
1832 if (packet->act_len > packet->buf_len) { in ath6kl_htc_rx_process_hdr()
1839 packet->act_len = min(packet->act_len, packet->buf_len); in ath6kl_htc_rx_process_hdr()
1844 if (packet->endpoint != htc_hdr->eid) { in ath6kl_htc_rx_process_hdr()
1846 htc_hdr->eid, packet->endpoint); in ath6kl_htc_rx_process_hdr()
1852 if (lk_ahd != packet->info.rx.exp_hdr) { in ath6kl_htc_rx_process_hdr()
1854 __func__, packet, packet->info.rx.rx_flags); in ath6kl_htc_rx_process_hdr()
1856 "", &packet->info.rx.exp_hdr, 4); in ath6kl_htc_rx_process_hdr()
1872 if (packet->info.rx.rx_flags & HTC_RX_PKT_IGNORE_LOOKAHEAD) { in ath6kl_htc_rx_process_hdr()
1877 status = htc_proc_trailer(target, packet->buf + HTC_HDR_LENGTH in ath6kl_htc_rx_process_hdr()
1880 n_lkahds, packet->endpoint); in ath6kl_htc_rx_process_hdr()
1885 packet->act_len -= htc_hdr->ctrl[0]; in ath6kl_htc_rx_process_hdr()
1888 packet->buf += HTC_HDR_LENGTH; in ath6kl_htc_rx_process_hdr()
1889 packet->act_len -= HTC_HDR_LENGTH; in ath6kl_htc_rx_process_hdr()
1893 ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad packet", in ath6kl_htc_rx_process_hdr()
1894 "", packet->buf, packet->act_len); in ath6kl_htc_rx_process_hdr()
1900 struct htc_packet *packet) in ath6kl_htc_rx_complete() argument
1903 "htc rx complete ep %d packet 0x%p\n", in ath6kl_htc_rx_complete()
1904 endpoint->eid, packet); in ath6kl_htc_rx_complete()
1906 endpoint->ep_cb.rx(endpoint->target, packet); in ath6kl_htc_rx_complete()
1915 struct htc_packet *packet; in ath6kl_htc_rx_bundle() local
1952 packet = list_first_entry(rxq, struct htc_packet, list); in ath6kl_htc_rx_bundle()
1953 list_del(&packet->list); in ath6kl_htc_rx_bundle()
1956 packet->act_len); in ath6kl_htc_rx_bundle()
1959 list_add(&packet->list, rxq); in ath6kl_htc_rx_bundle()
1967 * Packet 0..n-1 cannot be checked for look-aheads in ath6kl_htc_rx_bundle()
1968 * since we are fetching a bundle the last packet in ath6kl_htc_rx_bundle()
1971 packet->info.rx.rx_flags |= in ath6kl_htc_rx_bundle()
1974 /* NOTE: 1 HTC packet per scatter entry */ in ath6kl_htc_rx_bundle()
1975 scat_req->scat_list[i].buf = packet->buf; in ath6kl_htc_rx_bundle()
1978 packet->info.rx.rx_flags |= HTC_RX_PKT_PART_OF_BUNDLE; in ath6kl_htc_rx_bundle()
1980 list_add_tail(&packet->list, sync_compq); in ath6kl_htc_rx_bundle()
2007 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_rx_process_packets() local
2011 list_for_each_entry_safe(packet, tmp_pkt, comp_pktq, list) { in ath6kl_htc_rx_process_packets()
2012 ep = &target->endpoint[packet->endpoint]; in ath6kl_htc_rx_process_packets()
2014 trace_ath6kl_htc_rx(packet->status, packet->endpoint, in ath6kl_htc_rx_process_packets()
2015 packet->buf, packet->act_len); in ath6kl_htc_rx_process_packets()
2017 /* process header for each of the recv packet */ in ath6kl_htc_rx_process_packets()
2018 status = ath6kl_htc_rx_process_hdr(target, packet, lk_ahds, in ath6kl_htc_rx_process_packets()
2023 list_del(&packet->list); in ath6kl_htc_rx_process_packets()
2027 * Last packet's more packet flag is set in ath6kl_htc_rx_process_packets()
2032 ep, packet); in ath6kl_htc_rx_process_packets()
2038 packet->info.rx.indicat_flags |= in ath6kl_htc_rx_process_packets()
2043 if (packet->info.rx.rx_flags & HTC_RX_PKT_PART_OF_BUNDLE) in ath6kl_htc_rx_process_packets()
2046 ath6kl_htc_rx_complete(ep, packet); in ath6kl_htc_rx_process_packets()
2060 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_rx_fetch() local
2088 packet = list_first_entry(rx_pktq, struct htc_packet, in ath6kl_htc_rx_fetch()
2092 packet->completion = NULL; in ath6kl_htc_rx_fetch()
2096 * look_aheads in all packet in ath6kl_htc_rx_fetch()
2100 packet->info.rx.rx_flags |= in ath6kl_htc_rx_fetch()
2103 /* go fetch the packet */ in ath6kl_htc_rx_fetch()
2104 status = ath6kl_htc_rx_packet(target, packet, in ath6kl_htc_rx_fetch()
2105 packet->act_len); in ath6kl_htc_rx_fetch()
2107 list_move_tail(&packet->list, &tmp_rxq); in ath6kl_htc_rx_fetch()
2125 list_for_each_entry_safe(packet, tmp_pkt, rx_pktq, list) { in ath6kl_htc_rx_fetch()
2126 list_del(&packet->list); in ath6kl_htc_rx_fetch()
2127 htc_reclaim_rxbuf(target, packet, in ath6kl_htc_rx_fetch()
2128 &target->endpoint[packet->endpoint]); in ath6kl_htc_rx_fetch()
2131 list_for_each_entry_safe(packet, tmp_pkt, &tmp_rxq, list) { in ath6kl_htc_rx_fetch()
2132 list_del(&packet->list); in ath6kl_htc_rx_fetch()
2133 htc_reclaim_rxbuf(target, packet, in ath6kl_htc_rx_fetch()
2134 &target->endpoint[packet->endpoint]); in ath6kl_htc_rx_fetch()
2261 struct htc_packet *packet = NULL; in htc_wait_for_ctrl_msg() local
2274 packet = htc_get_control_buf(target, false); in htc_wait_for_ctrl_msg()
2276 if (!packet) in htc_wait_for_ctrl_msg()
2279 packet->info.rx.rx_flags = 0; in htc_wait_for_ctrl_msg()
2280 packet->info.rx.exp_hdr = look_ahead.word; in htc_wait_for_ctrl_msg()
2281 packet->act_len = le16_to_cpu(look_ahead.payld_len) + HTC_HDR_LENGTH; in htc_wait_for_ctrl_msg()
2283 if (packet->act_len > packet->buf_len) in htc_wait_for_ctrl_msg()
2287 packet->completion = NULL; in htc_wait_for_ctrl_msg()
2290 if (ath6kl_htc_rx_packet(target, packet, packet->act_len)) in htc_wait_for_ctrl_msg()
2293 trace_ath6kl_htc_rx(packet->status, packet->endpoint, in htc_wait_for_ctrl_msg()
2294 packet->buf, packet->act_len); in htc_wait_for_ctrl_msg()
2297 packet->status = ath6kl_htc_rx_process_hdr(target, packet, NULL, NULL); in htc_wait_for_ctrl_msg()
2299 if (packet->status) { in htc_wait_for_ctrl_msg()
2301 packet->status); in htc_wait_for_ctrl_msg()
2305 return packet; in htc_wait_for_ctrl_msg()
2308 if (packet != NULL) { in htc_wait_for_ctrl_msg()
2309 htc_rxpkt_reset(packet); in htc_wait_for_ctrl_msg()
2310 reclaim_rx_ctrl_buf(target, packet); in htc_wait_for_ctrl_msg()
2341 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_mbox_add_rxbuf_multiple() local
2344 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { in ath6kl_htc_mbox_add_rxbuf_multiple()
2345 packet->status = -ECANCELED; in ath6kl_htc_mbox_add_rxbuf_multiple()
2346 list_del(&packet->list); in ath6kl_htc_mbox_add_rxbuf_multiple()
2347 ath6kl_htc_rx_complete(endpoint, packet); in ath6kl_htc_mbox_add_rxbuf_multiple()
2381 struct htc_packet *packet, *tmp_pkt; in ath6kl_htc_mbox_flush_rx_buf() local
2391 list_for_each_entry_safe(packet, tmp_pkt, in ath6kl_htc_mbox_flush_rx_buf()
2393 list_del(&packet->list); in ath6kl_htc_mbox_flush_rx_buf()
2397 packet, packet->buf_len, in ath6kl_htc_mbox_flush_rx_buf()
2398 packet->endpoint); in ath6kl_htc_mbox_flush_rx_buf()
2402 * packet and packet->buf_start are allocated in ath6kl_htc_mbox_flush_rx_buf()
2404 * rx_bufq, it is allocated as skb where packet is in ath6kl_htc_mbox_flush_rx_buf()
2408 if (packet->endpoint == ENDPOINT_0) { in ath6kl_htc_mbox_flush_rx_buf()
2409 kfree(packet->buf_start); in ath6kl_htc_mbox_flush_rx_buf()
2410 kfree(packet); in ath6kl_htc_mbox_flush_rx_buf()
2412 dev_kfree_skb(packet->pkt_cntxt); in ath6kl_htc_mbox_flush_rx_buf()
2443 /* allocate a packet to send to the target */ in ath6kl_htc_mbox_conn_service()
2655 struct htc_packet *packet = NULL; in ath6kl_htc_mbox_wait_target() local
2662 packet = htc_wait_for_ctrl_msg(target); in ath6kl_htc_mbox_wait_target()
2664 if (!packet) in ath6kl_htc_mbox_wait_target()
2668 rdy_msg = (struct htc_ready_ext_msg *)packet->buf; in ath6kl_htc_mbox_wait_target()
2671 (packet->act_len < sizeof(struct htc_ready_msg))) { in ath6kl_htc_mbox_wait_target()
2689 if (packet->act_len >= sizeof(struct htc_ready_ext_msg)) { in ath6kl_htc_mbox_wait_target()
2726 if (packet) { in ath6kl_htc_mbox_wait_target()
2727 htc_rxpkt_reset(packet); in ath6kl_htc_mbox_wait_target()
2728 reclaim_rx_ctrl_buf(target, packet); in ath6kl_htc_mbox_wait_target()
2740 struct htc_packet *packet; in ath6kl_htc_mbox_start() local
2753 while ((packet = htc_get_control_buf(target, false)) != NULL) { in ath6kl_htc_mbox_start()
2754 status = htc_add_rxbuf(target, packet); in ath6kl_htc_mbox_start()
2783 struct htc_packet *packet; in ath6kl_htc_reset() local
2795 packet = kzalloc(sizeof(*packet), GFP_KERNEL); in ath6kl_htc_reset()
2796 if (!packet) in ath6kl_htc_reset()
2799 packet->buf_start = kzalloc(ctrl_bufsz, GFP_KERNEL); in ath6kl_htc_reset()
2800 if (!packet->buf_start) { in ath6kl_htc_reset()
2801 kfree(packet); in ath6kl_htc_reset()
2805 packet->buf_len = ctrl_bufsz; in ath6kl_htc_reset()
2807 packet->act_len = 0; in ath6kl_htc_reset()
2808 packet->buf = packet->buf_start; in ath6kl_htc_reset()
2809 packet->endpoint = ENDPOINT_0; in ath6kl_htc_reset()
2810 list_add_tail(&packet->list, &target->free_ctrl_rxbuf); in ath6kl_htc_reset()
2812 list_add_tail(&packet->list, &target->free_ctrl_txbuf); in ath6kl_htc_reset()
2889 struct htc_packet *packet, *tmp_packet; in ath6kl_htc_mbox_cleanup() local
2893 list_for_each_entry_safe(packet, tmp_packet, in ath6kl_htc_mbox_cleanup()
2895 list_del(&packet->list); in ath6kl_htc_mbox_cleanup()
2896 kfree(packet->buf_start); in ath6kl_htc_mbox_cleanup()
2897 kfree(packet); in ath6kl_htc_mbox_cleanup()
2900 list_for_each_entry_safe(packet, tmp_packet, in ath6kl_htc_mbox_cleanup()
2902 list_del(&packet->list); in ath6kl_htc_mbox_cleanup()
2903 kfree(packet->buf_start); in ath6kl_htc_mbox_cleanup()
2904 kfree(packet); in ath6kl_htc_mbox_cleanup()