diff --git a/hif/src/ce/ce_api.h b/hif/src/ce/ce_api.h index 2dd2de0cc6..ee1610455e 100644 --- a/hif/src/ce/ce_api.h +++ b/hif/src/ce/ce_api.h @@ -149,7 +149,7 @@ int ce_send(struct CE_handle *copyeng, unsigned int user_flags); #ifdef WLAN_FEATURE_FASTPATH -int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus, +int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t *msdus, unsigned int num_msdus, unsigned int transfer_id); #endif diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 3320d8c475..3648a3ad86 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -556,7 +556,7 @@ void hif_detach_htc(struct hif_opaque_softc *hif_ctx) QDF_STATUS hif_send_head(struct hif_opaque_softc *hif_ctx, uint8_t pipe, unsigned int transfer_id, unsigned int nbytes, - cdf_nbuf_t nbuf, unsigned int data_attr) + qdf_nbuf_t nbuf, unsigned int data_attr) { struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_ctx); @@ -567,7 +567,7 @@ hif_send_head(struct hif_opaque_softc *hif_ctx, int status, i = 0; unsigned int mux_id = 0; - QDF_ASSERT(nbytes <= cdf_nbuf_len(nbuf)); + QDF_ASSERT(nbytes <= qdf_nbuf_len(nbuf)); transfer_id = (mux_id & MUX_ID_MASK) | @@ -586,8 +586,8 @@ hif_send_head(struct hif_opaque_softc *hif_ctx, qdf_dma_addr_t frag_paddr; int frag_bytes; - frag_paddr = cdf_nbuf_get_frag_paddr(nbuf, nfrags); - frag_bytes = cdf_nbuf_get_frag_len(nbuf, nfrags); + frag_paddr = qdf_nbuf_get_frag_paddr(nbuf, nfrags); + frag_bytes = qdf_nbuf_get_frag_len(nbuf, nfrags); /* * Clear the packet offset for all but the first CE desc. */ @@ -597,7 +597,7 @@ hif_send_head(struct hif_opaque_softc *hif_ctx, status = ce_sendlist_buf_add(&sendlist, frag_paddr, frag_bytes > bytes ? bytes : frag_bytes, - cdf_nbuf_get_frag_is_wordstream + qdf_nbuf_get_frag_is_wordstream (nbuf, nfrags) ? 0 : CE_SEND_FLAG_SWAP_DISABLE, @@ -626,10 +626,10 @@ hif_send_head(struct hif_opaque_softc *hif_ctx, return A_ERROR; } - NBUF_UPDATE_TX_PKT_COUNT(nbuf, NBUF_TX_PKT_HIF); + QDF_NBUF_UPDATE_TX_PKT_COUNT(nbuf, QDF_NBUF_TX_PKT_HIF); DPTRACE(qdf_dp_trace(nbuf, QDF_DP_TRACE_HIF_PACKET_PTR_RECORD, - (uint8_t *)(cdf_nbuf_data(nbuf)), - sizeof(cdf_nbuf_data(nbuf)))); + (uint8_t *)(qdf_nbuf_data(nbuf)), + sizeof(qdf_nbuf_data(nbuf)))); status = ce_sendlist_send(ce_hdl, nbuf, &sendlist, transfer_id); QDF_ASSERT(status == QDF_STATUS_SUCCESS); @@ -703,7 +703,7 @@ hif_pci_ce_send_done(struct CE_handle *copyeng, void *ce_context, if (transfer_context != CE_SENDLIST_ITEM_CTXT) { if (scn->target_status == OL_TRGET_STATUS_RESET) - cdf_nbuf_free(transfer_context); + qdf_nbuf_free(transfer_context); else msg_callbacks->txCompletionHandler( msg_callbacks->Context, @@ -734,17 +734,17 @@ hif_pci_ce_send_done(struct CE_handle *copyeng, void *ce_context, * return: None */ static inline void hif_ce_do_recv(struct hif_msg_callbacks *msg_callbacks, - cdf_nbuf_t netbuf, int nbytes, + qdf_nbuf_t netbuf, int nbytes, struct HIF_CE_pipe_info *pipe_info) { if (nbytes <= pipe_info->buf_sz) { - cdf_nbuf_set_pktlen(netbuf, nbytes); + qdf_nbuf_set_pktlen(netbuf, nbytes); msg_callbacks-> rxCompletionHandler(msg_callbacks->Context, netbuf, pipe_info->pipe_num); } else { HIF_ERROR("%s: Invalid Rx msg buf:%p nbytes:%d", __func__, netbuf, nbytes); - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); } } @@ -767,14 +767,14 @@ hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context, do { hif_pm_runtime_mark_last_busy(hif_sc->dev); - cdf_nbuf_unmap_single(scn->qdf_dev, - (cdf_nbuf_t) transfer_context, + qdf_nbuf_unmap_single(scn->qdf_dev, + (qdf_nbuf_t) transfer_context, QDF_DMA_FROM_DEVICE); atomic_inc(&pipe_info->recv_bufs_needed); hif_post_recv_buffers_for_pipe(pipe_info); if (scn->target_status == OL_TRGET_STATUS_RESET) - cdf_nbuf_free(transfer_context); + qdf_nbuf_free(transfer_context); else hif_ce_do_recv(msg_callbacks, transfer_context, nbytes, pipe_info); @@ -946,13 +946,13 @@ static int hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info) qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock); while (atomic_read(&pipe_info->recv_bufs_needed) > 0) { qdf_dma_addr_t CE_data; /* CE space buffer address */ - cdf_nbuf_t nbuf; + qdf_nbuf_t nbuf; int status; atomic_dec(&pipe_info->recv_bufs_needed); qdf_spin_unlock_bh(&pipe_info->recv_bufs_needed_lock); - nbuf = cdf_nbuf_alloc(scn->qdf_dev, buf_sz, 0, 4, false); + nbuf = qdf_nbuf_alloc(scn->qdf_dev, buf_sz, 0, 4, false); if (!nbuf) { qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock); pipe_info->nbuf_alloc_err_count++; @@ -968,12 +968,12 @@ static int hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info) } /* - * cdf_nbuf_peek_header(nbuf, &data, &unused); + * qdf_nbuf_peek_header(nbuf, &data, &unused); * CE_data = dma_map_single(dev, data, buf_sz, ); * DMA_FROM_DEVICE); */ ret = - cdf_nbuf_map_single(scn->qdf_dev, nbuf, + qdf_nbuf_map_single(scn->qdf_dev, nbuf, QDF_DMA_FROM_DEVICE); if (unlikely(ret != QDF_STATUS_SUCCESS)) { @@ -985,12 +985,12 @@ static int hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info) __func__, pipe_info->pipe_num, atomic_read(&pipe_info->recv_bufs_needed), pipe_info->nbuf_dma_err_count); - cdf_nbuf_free(nbuf); + qdf_nbuf_free(nbuf); atomic_inc(&pipe_info->recv_bufs_needed); return 1; } - CE_data = cdf_nbuf_get_frag_paddr(nbuf, 0); + CE_data = qdf_nbuf_get_frag_paddr(nbuf, 0); qdf_mem_dma_sync_single_for_device(scn->qdf_dev, CE_data, buf_sz, DMA_FROM_DEVICE); @@ -1006,7 +1006,7 @@ static int hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info) atomic_read(&pipe_info->recv_bufs_needed), pipe_info->nbuf_ce_enqueue_err_count); atomic_inc(&pipe_info->recv_bufs_needed); - cdf_nbuf_free(nbuf); + qdf_nbuf_free(nbuf); return 1; } @@ -1129,7 +1129,7 @@ void hif_recv_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info) struct CE_handle *ce_hdl; uint32_t buf_sz; struct HIF_CE_state *hif_state; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; qdf_dma_addr_t CE_data; void *per_CE_context; @@ -1153,9 +1153,9 @@ void hif_recv_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info) while (ce_revoke_recv_next (ce_hdl, &per_CE_context, (void **)&netbuf, &CE_data) == QDF_STATUS_SUCCESS) { - cdf_nbuf_unmap_single(scn->qdf_dev, netbuf, + qdf_nbuf_unmap_single(scn->qdf_dev, netbuf, QDF_DMA_FROM_DEVICE); - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); } } @@ -1164,7 +1164,7 @@ void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info) struct CE_handle *ce_hdl; struct HIF_CE_state *hif_state; struct hif_softc *scn; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; void *per_CE_context; qdf_dma_addr_t CE_data; unsigned int nbytes; diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c index 3c3457591b..bcc9a44636 100644 --- a/hif/src/ce/ce_service.c +++ b/hif/src/ce/ce_service.c @@ -468,12 +468,12 @@ ce_sendlist_send(struct CE_handle *copyeng, transfer_id, item->flags, item->user_flags); QDF_ASSERT(status == QDF_STATUS_SUCCESS); - NBUF_UPDATE_TX_PKT_COUNT((cdf_nbuf_t)per_transfer_context, - NBUF_TX_PKT_CE); - DPTRACE(qdf_dp_trace((cdf_nbuf_t)per_transfer_context, + QDF_NBUF_UPDATE_TX_PKT_COUNT((qdf_nbuf_t)per_transfer_context, + QDF_NBUF_TX_PKT_CE); + DPTRACE(qdf_dp_trace((qdf_nbuf_t)per_transfer_context, QDF_DP_TRACE_CE_PACKET_PTR_RECORD, - (uint8_t *)(((cdf_nbuf_t)per_transfer_context)->data), - sizeof(((cdf_nbuf_t)per_transfer_context)->data))); + (uint8_t *)(((qdf_nbuf_t)per_transfer_context)->data), + sizeof(((qdf_nbuf_t)per_transfer_context)->data))); } else { /* * Probably not worth the additional complexity to support @@ -526,7 +526,7 @@ ce_buffer_addr_hi_set(struct CE_src_desc *shadow_src_desc, * Return: No. of packets that could be sent */ -int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus, +int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t *msdus, unsigned int num_msdus, unsigned int transfer_id) { struct CE_state *ce_state = (struct CE_state *)copyeng; @@ -538,7 +538,7 @@ int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus, unsigned int write_index; unsigned int sw_index; unsigned int frag_len; - cdf_nbuf_t msdu; + qdf_nbuf_t msdu; int i; uint64_t dma_addr; uint32_t user_flags = 0; @@ -567,14 +567,14 @@ int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus, * structure instead? */ /* HTT/HTC header can be passed as a argument */ - dma_addr = cdf_nbuf_get_frag_paddr(msdu, 0); + dma_addr = qdf_nbuf_get_frag_paddr(msdu, 0); shadow_src_desc->buffer_addr = (uint32_t)(dma_addr & 0xFFFFFFFF); - user_flags = cdf_nbuf_data_attr_get(msdu) & DESC_DATA_FLAG_MASK; + user_flags = qdf_nbuf_data_attr_get(msdu) & DESC_DATA_FLAG_MASK; ce_buffer_addr_hi_set(shadow_src_desc, dma_addr, user_flags); shadow_src_desc->meta_data = transfer_id; - shadow_src_desc->nbytes = cdf_nbuf_get_frag_len(msdu, 0); + shadow_src_desc->nbytes = qdf_nbuf_get_frag_len(msdu, 0); /* * HTC HTT header is a word stream, so byte swap if CE byte @@ -600,7 +600,7 @@ int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus, * Now fill out the ring descriptor for the actual data * packet */ - dma_addr = cdf_nbuf_get_frag_paddr(msdu, 1); + dma_addr = qdf_nbuf_get_frag_paddr(msdu, 1); shadow_src_desc->buffer_addr = (uint32_t)(dma_addr & 0xFFFFFFFF); /* @@ -611,7 +611,7 @@ int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus, shadow_src_desc->meta_data = transfer_id; /* get actual packet length */ - frag_len = cdf_nbuf_get_frag_len(msdu, 1); + frag_len = qdf_nbuf_get_frag_len(msdu, 1); /* only read download_len once */ shadow_src_desc->nbytes = ce_state->download_len; diff --git a/htc/htc.c b/htc/htc.c index 46b0aa420f..07fe5e10ab 100644 --- a/htc/htc.c +++ b/htc/htc.c @@ -28,7 +28,7 @@ #include "ol_if_athvar.h" #include "htc_debug.h" #include "htc_internal.h" -#include /* cdf_nbuf_t */ +#include /* qdf_nbuf_t */ #include /* qdf_print */ #include #include "epping_main.h" @@ -62,11 +62,11 @@ static void reset_endpoint_states(HTC_TARGET *target); static void destroy_htc_tx_ctrl_packet(HTC_PACKET *pPacket) { - cdf_nbuf_t netbuf; - netbuf = (cdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); - AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("free ctrl netbuf :0x%p \n", netbuf)); + qdf_nbuf_t netbuf; + netbuf = (qdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); + AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("free ctrl netbuf :0x%p\n", netbuf)); if (netbuf != NULL) { - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); } qdf_mem_free(pPacket); @@ -75,7 +75,7 @@ static void destroy_htc_tx_ctrl_packet(HTC_PACKET *pPacket) static HTC_PACKET *build_htc_tx_ctrl_packet(qdf_device_t osdev) { HTC_PACKET *pPacket = NULL; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; do { pPacket = (HTC_PACKET *) qdf_mem_malloc(sizeof(HTC_PACKET)); @@ -83,8 +83,8 @@ static HTC_PACKET *build_htc_tx_ctrl_packet(qdf_device_t osdev) break; } A_MEMZERO(pPacket, sizeof(HTC_PACKET)); - netbuf = - cdf_nbuf_alloc(osdev, HTC_CONTROL_BUFFER_SIZE, 20, 4, true); + netbuf = qdf_nbuf_alloc(osdev, + HTC_CONTROL_BUFFER_SIZE, 20, 4, true); if (NULL == netbuf) { qdf_mem_free(pPacket); pPacket = NULL; @@ -146,7 +146,7 @@ void htc_dump(HTC_HANDLE HTCHandle, uint8_t CmdId, bool start) static void htc_cleanup(HTC_TARGET *target) { HTC_PACKET *pPacket; - /* cdf_nbuf_t netbuf; */ + /* qdf_nbuf_t netbuf; */ if (target->hif_dev != NULL) { hif_detach_htc(target->hif_dev); @@ -173,9 +173,9 @@ static void htc_cleanup(HTC_TARGET *target) if (NULL == pPacket) { break; } - netbuf = (cdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); + netbuf = (qdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); if (netbuf != NULL) { - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); } qdf_mem_free(pPacket); @@ -535,7 +535,7 @@ static void reset_endpoint_states(HTC_TARGET *target) A_STATUS htc_start(HTC_HANDLE HTCHandle) { - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; A_STATUS status = A_OK; HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_SETUP_COMPLETE_EX_MSG *pSetupComp; @@ -558,11 +558,11 @@ A_STATUS htc_start(HTC_HANDLE HTCHandle) } netbuf = - (cdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pSendPacket); + (qdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pSendPacket); /* assemble setup complete message */ - cdf_nbuf_put_tail(netbuf, sizeof(HTC_SETUP_COMPLETE_EX_MSG)); + qdf_nbuf_put_tail(netbuf, sizeof(HTC_SETUP_COMPLETE_EX_MSG)); pSetupComp = - (HTC_SETUP_COMPLETE_EX_MSG *) cdf_nbuf_data(netbuf); + (HTC_SETUP_COMPLETE_EX_MSG *) qdf_nbuf_data(netbuf); A_MEMZERO(pSetupComp, sizeof(HTC_SETUP_COMPLETE_EX_MSG)); HTC_SET_FIELD(pSetupComp, HTC_SETUP_COMPLETE_EX_MSG, @@ -610,11 +610,11 @@ void htc_flush_surprise_remove(HTC_HANDLE HTCHandle) int i; HTC_ENDPOINT *pEndpoint; #ifdef RX_SG_SUPPORT - cdf_nbuf_t netbuf; - cdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue; + qdf_nbuf_t netbuf; + qdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue; #endif - AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+htc_flush_surprise_remove \n")); + AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+htc_flush_surprise_remove\n")); /* cleanup endpoints */ for (i = 0; i < ENDPOINT_MAX; i++) { @@ -627,9 +627,8 @@ void htc_flush_surprise_remove(HTC_HANDLE HTCHandle) #ifdef RX_SG_SUPPORT LOCK_HTC_RX(target); - while ((netbuf = cdf_nbuf_queue_remove(rx_sg_queue)) != NULL) { - cdf_nbuf_free(netbuf); - } + while ((netbuf = qdf_nbuf_queue_remove(rx_sg_queue)) != NULL) + qdf_nbuf_free(netbuf); RESET_RX_SG_CONFIG(target); UNLOCK_HTC_RX(target); #endif @@ -646,11 +645,11 @@ void htc_stop(HTC_HANDLE HTCHandle) int i; HTC_ENDPOINT *pEndpoint; #ifdef RX_SG_SUPPORT - cdf_nbuf_t netbuf; - cdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue; + qdf_nbuf_t netbuf; + qdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue; #endif - AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+htc_stop \n")); + AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+htc_stop\n")); /* cleanup endpoints */ for (i = 0; i < ENDPOINT_MAX; i++) { @@ -674,9 +673,8 @@ void htc_stop(HTC_HANDLE HTCHandle) #ifdef RX_SG_SUPPORT LOCK_HTC_RX(target); - while ((netbuf = cdf_nbuf_queue_remove(rx_sg_queue)) != NULL) { - cdf_nbuf_free(netbuf); - } + while ((netbuf = qdf_nbuf_queue_remove(rx_sg_queue)) != NULL) + qdf_nbuf_free(netbuf); RESET_RX_SG_CONFIG(target); UNLOCK_HTC_RX(target); #endif diff --git a/htc/htc_api.h b/htc/htc_api.h index 446aec328b..4db32982c5 100644 --- a/htc/htc_api.h +++ b/htc/htc_api.h @@ -443,7 +443,7 @@ A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); @see also: htc_send_pkt +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ #ifdef ATH_11AC_TXCOMPACT -A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, cdf_nbuf_t netbuf, +A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf, int Epid, int ActualLength); #else /*ATH_11AC_TXCOMPACT */ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, diff --git a/htc/htc_internal.h b/htc/htc_internal.h index 638d03b27e..0a78e634a9 100644 --- a/htc/htc_internal.h +++ b/htc/htc_internal.h @@ -35,7 +35,7 @@ extern "C" { #include #include "a_types.h" #include "osapi_linux.h" -#include +#include #include #include #include @@ -173,7 +173,7 @@ typedef struct _HTC_TARGET { ServiceTxAllocTable[HTC_MAX_SERVICE_ALLOC_ENTRIES]; int TargetCreditSize; #ifdef RX_SG_SUPPORT - cdf_nbuf_queue_t RxSgQueue; + qdf_nbuf_queue_t RxSgQueue; A_BOOL IsRxSgInprogress; A_UINT32 CurRxSgTotalLen; /* current total length */ A_UINT32 ExpRxSgTotalLen; /* expected total length */ @@ -227,9 +227,9 @@ typedef struct _HTC_TARGET { } while (0); /* internal HTC functions */ -QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, +QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf, uint8_t pipeID); -QDF_STATUS htc_tx_completion_handler(void *Context, cdf_nbuf_t netbuf, +QDF_STATUS htc_tx_completion_handler(void *Context, qdf_nbuf_t netbuf, unsigned int transferID, uint32_t toeplitz_hash_result); HTC_PACKET *allocate_htc_bundle_packet(HTC_TARGET *target); diff --git a/htc/htc_recv.c b/htc/htc_recv.c index cdd4e18e2c..f05d69fd1d 100644 --- a/htc/htc_recv.c +++ b/htc/htc_recv.c @@ -28,7 +28,7 @@ #include "htc_debug.h" #include "htc_internal.h" #include "cds_api.h" -#include /* cdf_nbuf_t */ +#include /* qdf_nbuf_t */ #include "epping_main.h" /* HTC Control message receive timeout msec */ @@ -209,17 +209,17 @@ void free_htc_packet_container(HTC_TARGET *target, HTC_PACKET *pPacket) } #ifdef RX_SG_SUPPORT -cdf_nbuf_t rx_sg_to_single_netbuf(HTC_TARGET *target) +qdf_nbuf_t rx_sg_to_single_netbuf(HTC_TARGET *target) { - cdf_nbuf_t skb; + qdf_nbuf_t skb; uint8_t *anbdata; uint8_t *anbdata_new; uint32_t anblen; - cdf_nbuf_t new_skb = NULL; + qdf_nbuf_t new_skb = NULL; uint32_t sg_queue_len; - cdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue; + qdf_nbuf_queue_t *rx_sg_queue = &target->RxSgQueue; - sg_queue_len = cdf_nbuf_queue_len(rx_sg_queue); + sg_queue_len = qdf_nbuf_queue_len(rx_sg_queue); if (sg_queue_len <= 1) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, @@ -227,7 +227,7 @@ cdf_nbuf_t rx_sg_to_single_netbuf(HTC_TARGET *target) goto _failed; } - new_skb = cdf_nbuf_alloc(target->ExpRxSgTotalLen, 0, 4, false); + new_skb = qdf_nbuf_alloc(target->ExpRxSgTotalLen, 0, 4, false); if (new_skb == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("rx_sg_to_single_netbuf: can't allocate %u size netbuf\n", @@ -235,16 +235,16 @@ cdf_nbuf_t rx_sg_to_single_netbuf(HTC_TARGET *target) goto _failed; } - cdf_nbuf_peek_header(new_skb, &anbdata_new, &anblen); + qdf_nbuf_peek_header(new_skb, &anbdata_new, &anblen); - skb = cdf_nbuf_queue_remove(rx_sg_queue); + skb = qdf_nbuf_queue_remove(rx_sg_queue); do { - cdf_nbuf_peek_header(skb, &anbdata, &anblen); - qdf_mem_copy(anbdata_new, anbdata, cdf_nbuf_len(skb)); - cdf_nbuf_put_tail(new_skb, cdf_nbuf_len(skb)); - anbdata_new += cdf_nbuf_len(skb); - cdf_nbuf_free(skb); - skb = cdf_nbuf_queue_remove(rx_sg_queue); + qdf_nbuf_peek_header(skb, &anbdata, &anblen); + qdf_mem_copy(anbdata_new, anbdata, qdf_nbuf_len(skb)); + qdf_nbuf_put_tail(new_skb, qdf_nbuf_len(skb)); + anbdata_new += qdf_nbuf_len(skb); + qdf_nbuf_free(skb); + skb = qdf_nbuf_queue_remove(rx_sg_queue); } while (skb != NULL); RESET_RX_SG_CONFIG(target); @@ -252,16 +252,15 @@ cdf_nbuf_t rx_sg_to_single_netbuf(HTC_TARGET *target) _failed: - while ((skb = cdf_nbuf_queue_remove(rx_sg_queue)) != NULL) { - cdf_nbuf_free(skb); - } + while ((skb = qdf_nbuf_queue_remove(rx_sg_queue)) != NULL) + qdf_nbuf_free(skb); RESET_RX_SG_CONFIG(target); return NULL; } #endif -QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, +QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf, uint8_t pipeID) { QDF_STATUS status = QDF_STATUS_SUCCESS; @@ -278,8 +277,8 @@ QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, #ifdef RX_SG_SUPPORT LOCK_HTC_RX(target); if (target->IsRxSgInprogress) { - target->CurRxSgTotalLen += cdf_nbuf_len(netbuf); - cdf_nbuf_queue_add(&target->RxSgQueue, netbuf); + target->CurRxSgTotalLen += qdf_nbuf_len(netbuf); + qdf_nbuf_queue_add(&target->RxSgQueue, netbuf); if (target->CurRxSgTotalLen == target->ExpRxSgTotalLen) { netbuf = rx_sg_to_single_netbuf(target); if (netbuf == NULL) { @@ -295,8 +294,8 @@ QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, UNLOCK_HTC_RX(target); #endif - netdata = cdf_nbuf_data(netbuf); - netlen = cdf_nbuf_len(netbuf); + netdata = qdf_nbuf_data(netbuf); + netlen = qdf_nbuf_len(netbuf); HtcHdr = (HTC_FRAME_HDR *) netdata; @@ -333,8 +332,8 @@ QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, #ifdef RX_SG_SUPPORT LOCK_HTC_RX(target); target->IsRxSgInprogress = true; - cdf_nbuf_queue_init(&target->RxSgQueue); - cdf_nbuf_queue_add(&target->RxSgQueue, netbuf); + qdf_nbuf_queue_init(&target->RxSgQueue); + qdf_nbuf_queue_add(&target->RxSgQueue, netbuf); target->ExpRxSgTotalLen = (payloadLen + HTC_HDR_LENGTH); target->CurRxSgTotalLen += netlen; UNLOCK_HTC_RX(target); @@ -404,9 +403,9 @@ QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, int wow_nack = 0; /* remove HTC header */ - cdf_nbuf_pull_head(netbuf, HTC_HDR_LENGTH); - netdata = cdf_nbuf_data(netbuf); - netlen = cdf_nbuf_len(netbuf); + qdf_nbuf_pull_head(netbuf, HTC_HDR_LENGTH); + netdata = qdf_nbuf_data(netbuf); + netlen = qdf_nbuf_len(netbuf); htc_msg = (HTC_UNKNOWN_MSG *) netdata; message_id = @@ -465,7 +464,7 @@ QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, break; } - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); netbuf = NULL; break; } @@ -482,11 +481,11 @@ QDF_STATUS htc_rx_completion_handler(void *Context, cdf_nbuf_t netbuf, pPacket->Status = QDF_STATUS_SUCCESS; pPacket->Endpoint = htc_ep_id; pPacket->pPktContext = netbuf; - pPacket->pBuffer = cdf_nbuf_data(netbuf) + HTC_HDR_LENGTH; + pPacket->pBuffer = qdf_nbuf_data(netbuf) + HTC_HDR_LENGTH; pPacket->ActualLength = netlen - HTC_HEADER_LEN - trailerlen; - cdf_nbuf_pull_head(netbuf, HTC_HEADER_LEN); - cdf_nbuf_set_pktlen(netbuf, pPacket->ActualLength); + qdf_nbuf_pull_head(netbuf, HTC_HEADER_LEN); + qdf_nbuf_set_pktlen(netbuf, pPacket->ActualLength); recv_packet_completion(target, pEndpoint, pPacket); /* recover the packet container */ @@ -500,7 +499,7 @@ _out: #endif if (netbuf != NULL) { - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); } return status; diff --git a/htc/htc_send.c b/htc/htc_send.c index b2a1b701e4..6a57416877 100644 --- a/htc/htc_send.c +++ b/htc/htc_send.c @@ -27,7 +27,7 @@ #include "htc_debug.h" #include "htc_internal.h" -#include /* cdf_nbuf_t */ +#include /* qdf_nbuf_t */ #include /* qdf_mem_malloc */ #include "epping_main.h" @@ -133,9 +133,9 @@ void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credits static inline void restore_tx_packet(HTC_TARGET *target, HTC_PACKET *pPacket) { if (pPacket->PktInfo.AsTx.Flags & HTC_TX_PACKET_FLAG_FIXUP_NETBUF) { - cdf_nbuf_t netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); - cdf_nbuf_unmap(target->osdev, netbuf, QDF_DMA_TO_DEVICE); - cdf_nbuf_pull_head(netbuf, sizeof(HTC_FRAME_HDR)); + qdf_nbuf_t netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); + qdf_nbuf_unmap(target->osdev, netbuf, QDF_DMA_TO_DEVICE); + qdf_nbuf_pull_head(netbuf, sizeof(HTC_FRAME_HDR)); pPacket->PktInfo.AsTx.Flags &= ~HTC_TX_PACKET_FLAG_FIXUP_NETBUF; } @@ -205,11 +205,11 @@ HTC_PACKET *allocate_htc_bundle_packet(HTC_TARGET *target) { HTC_PACKET *pPacket; HTC_PACKET_QUEUE *pQueueSave; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; LOCK_HTC_TX(target); if (NULL == target->pBundleFreeList) { UNLOCK_HTC_TX(target); - netbuf = cdf_nbuf_alloc(NULL, + netbuf = qdf_nbuf_alloc(NULL, target->MaxMsgsPerHTCBundle * target->TargetCreditSize, 0, 4, false); AR_DEBUG_ASSERT(netbuf); @@ -219,25 +219,25 @@ HTC_PACKET *allocate_htc_bundle_packet(HTC_TARGET *target) pPacket = qdf_mem_malloc(sizeof(HTC_PACKET)); AR_DEBUG_ASSERT(pPacket); if (!pPacket) { - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); return NULL; } pQueueSave = qdf_mem_malloc(sizeof(HTC_PACKET_QUEUE)); AR_DEBUG_ASSERT(pQueueSave); if (!pQueueSave) { - cdf_nbuf_free(netbuf); + qdf_nbuf_free(netbuf); qdf_mem_free(pPacket); return NULL; } INIT_HTC_PACKET_QUEUE(pQueueSave); pPacket->pContext = pQueueSave; SET_HTC_PACKET_NET_BUF_CONTEXT(pPacket, netbuf); - pPacket->pBuffer = cdf_nbuf_data(netbuf); - pPacket->BufferLength = cdf_nbuf_len(netbuf); + pPacket->pBuffer = qdf_nbuf_data(netbuf); + pPacket->BufferLength = qdf_nbuf_len(netbuf); /* store the original head room so that we can restore this when we "free" the packet */ /* free packet puts the packet back on the free list */ - pPacket->netbufOrigHeadRoom = cdf_nbuf_headroom(netbuf); + pPacket->netbufOrigHeadRoom = qdf_nbuf_headroom(netbuf); return pPacket; } /* already done malloc - restore from free list */ @@ -257,7 +257,7 @@ HTC_PACKET *allocate_htc_bundle_packet(HTC_TARGET *target) void free_htc_bundle_packet(HTC_TARGET *target, HTC_PACKET *pPacket) { A_UINT32 curentHeadRoom; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; HTC_PACKET_QUEUE *pQueueSave; netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); @@ -272,14 +272,14 @@ void free_htc_bundle_packet(HTC_TARGET *target, HTC_PACKET *pPacket) /* and eventually HIF ends up doing another malloc big enough to store the */ /* data + its header */ - curentHeadRoom = cdf_nbuf_headroom(netbuf); - cdf_nbuf_pull_head(netbuf, + curentHeadRoom = qdf_nbuf_headroom(netbuf); + qdf_nbuf_pull_head(netbuf, pPacket->netbufOrigHeadRoom - curentHeadRoom); - cdf_nbuf_trim_tail(netbuf, cdf_nbuf_len(netbuf)); + qdf_nbuf_trim_tail(netbuf, qdf_nbuf_len(netbuf)); /* restore the pBuffer pointer. HIF changes this */ - pPacket->pBuffer = cdf_nbuf_data(netbuf); - pPacket->BufferLength = cdf_nbuf_len(netbuf); + pPacket->pBuffer = qdf_nbuf_data(netbuf); + pPacket->BufferLength = qdf_nbuf_len(netbuf); /* restore queue */ pQueueSave = (HTC_PACKET_QUEUE *) pPacket->pContext; @@ -307,12 +307,12 @@ static A_STATUS htc_send_bundled_netbuf(HTC_TARGET *target, { qdf_size_t data_len; A_STATUS status; - cdf_nbuf_t bundleBuf; + qdf_nbuf_t bundleBuf; uint32_t data_attr = 0; bundleBuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacketTx); - data_len = pBundleBuffer - cdf_nbuf_data(bundleBuf); - cdf_nbuf_put_tail(bundleBuf, data_len); + data_len = pBundleBuffer - qdf_nbuf_data(bundleBuf); + qdf_nbuf_put_tail(bundleBuf, data_len); SET_HTC_PACKET_INFO_TX(pPacketTx, target, pBundleBuffer, @@ -342,7 +342,7 @@ static void htc_issue_packets_bundle(HTC_TARGET *target, HTC_PACKET_QUEUE *pPktQueue) { int i, frag_count, nbytes; - cdf_nbuf_t netbuf, bundleBuf; + qdf_nbuf_t netbuf, bundleBuf; unsigned char *pBundleBuffer = NULL; HTC_PACKET *pPacket = NULL, *pPacketTx = NULL; HTC_FRAME_HDR *pHtcHdr; @@ -361,7 +361,7 @@ static void htc_issue_packets_bundle(HTC_TARGET *target, return; } bundleBuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacketTx); - pBundleBuffer = cdf_nbuf_data(bundleBuf); + pBundleBuffer = qdf_nbuf_data(bundleBuf); pQueueSave = (HTC_PACKET_QUEUE *) pPacketTx->pContext; while (1) { pPacket = htc_packet_dequeue(pPktQueue); @@ -401,13 +401,13 @@ static void htc_issue_packets_bundle(HTC_TARGET *target, return; } bundleBuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacketTx); - pBundleBuffer = cdf_nbuf_data(bundleBuf); + pBundleBuffer = qdf_nbuf_data(bundleBuf); pQueueSave = (HTC_PACKET_QUEUE *) pPacketTx->pContext; } bundlesSpaceRemaining -= transferLength; netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); - pHtcHdr = (HTC_FRAME_HDR *) cdf_nbuf_get_frag_vaddr(netbuf, 0); + pHtcHdr = (HTC_FRAME_HDR *) qdf_nbuf_get_frag_vaddr(netbuf, 0); HTC_WRITE32(pHtcHdr, SM(pPacket->ActualLength, HTC_FRAME_HDR_PAYLOADLEN) | SM(pPacket->PktInfo. @@ -421,12 +421,12 @@ static void htc_issue_packets_bundle(HTC_TARGET *target, HTC_FRAME_HDR_CONTROLBYTES1) | SM(creditPad, HTC_FRAME_HDR_RESERVED)); pHtcHdr->reserved = creditPad; - frag_count = cdf_nbuf_get_num_frags(netbuf); + frag_count = qdf_nbuf_get_num_frags(netbuf); nbytes = pPacket->ActualLength + HTC_HDR_LENGTH; for (i = 0; i < frag_count && nbytes > 0; i++) { - int frag_len = cdf_nbuf_get_frag_len(netbuf, i); + int frag_len = qdf_nbuf_get_frag_len(netbuf, i); unsigned char *frag_addr = - cdf_nbuf_get_frag_vaddr(netbuf, i); + qdf_nbuf_get_frag_vaddr(netbuf, i); if (frag_len > nbytes) { frag_len = nbytes; } @@ -437,7 +437,7 @@ static void htc_issue_packets_bundle(HTC_TARGET *target, HTC_PACKET_ENQUEUE(pQueueSave, pPacket); pBundleBuffer += creditPad; } - if (pBundleBuffer != cdf_nbuf_data(bundleBuf)) { + if (pBundleBuffer != qdf_nbuf_data(bundleBuf)) { /* send out remaining buffer */ htc_send_bundled_netbuf(target, pEndpoint, pBundleBuffer, pPacketTx); @@ -453,7 +453,7 @@ static A_STATUS htc_issue_packets(HTC_TARGET *target, HTC_PACKET_QUEUE *pPktQueue) { A_STATUS status = A_OK; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; HTC_PACKET *pPacket = NULL; uint16_t payloadLen; HTC_FRAME_HDR *pHtcHdr; @@ -492,9 +492,8 @@ static A_STATUS htc_issue_packets(HTC_TARGET *target, payloadLen = pPacket->ActualLength; /* setup HTC frame header */ - pHtcHdr = - (HTC_FRAME_HDR *) cdf_nbuf_get_frag_vaddr(netbuf, - 0); + pHtcHdr = (HTC_FRAME_HDR *) + qdf_nbuf_get_frag_vaddr(netbuf, 0); AR_DEBUG_ASSERT(pHtcHdr); HTC_WRITE32(pHtcHdr, @@ -520,7 +519,7 @@ static A_STATUS htc_issue_packets(HTC_TARGET *target, */ if (pPacket->PktInfo.AsTx. Flags & HTC_TX_PACKET_FLAG_FIXUP_NETBUF) { - cdf_nbuf_map(target->osdev, + qdf_nbuf_map(target->osdev, GET_HTC_PACKET_NET_BUF_CONTEXT (pPacket), QDF_DMA_TO_DEVICE); } @@ -868,9 +867,9 @@ void get_htc_send_packets(HTC_TARGET *target, /* * FIX THIS: - * For now, avoid calling cdf_nbuf_get_num_frags before calling - * cdf_nbuf_map, because the MacOS version of cdf_nbuf_t doesn't - * support cdf_nbuf_get_num_frags until after cdf_nbuf_map has + * For now, avoid calling qdf_nbuf_get_num_frags before calling + * qdf_nbuf_map, because the MacOS version of qdf_nbuf_t doesn't + * support qdf_nbuf_get_num_frags until after qdf_nbuf_map has * been done. * Assume that the non-data netbufs, i.e. the WMI message netbufs, * consist of a single fragment. @@ -879,7 +878,7 @@ void get_htc_send_packets(HTC_TARGET *target, (pPacket->PktInfo.AsTx. Flags & HTC_TX_PACKET_FLAG_FIXUP_NETBUF) ? 1 /* WMI messages are in a single-fragment network buffer */ : - cdf_nbuf_get_num_frags(GET_HTC_PACKET_NET_BUF_CONTEXT + qdf_nbuf_get_num_frags(GET_HTC_PACKET_NET_BUF_CONTEXT (pPacket)); Resources -= num_frags; } @@ -998,7 +997,7 @@ static HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target, pPacket); /* put it in the send queue */ /* add HTC_FRAME_HDR space reservation again */ - cdf_nbuf_push_head + qdf_nbuf_push_head (GET_HTC_PACKET_NET_BUF_CONTEXT (pPacket), sizeof(HTC_FRAME_HDR)); @@ -1230,7 +1229,7 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_ENDPOINT *pEndpoint; HTC_PACKET *pPacket; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; HTC_FRAME_HDR *pHtcHdr; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, @@ -1265,9 +1264,9 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); AR_DEBUG_ASSERT(netbuf); - cdf_nbuf_push_head(netbuf, sizeof(HTC_FRAME_HDR)); + qdf_nbuf_push_head(netbuf, sizeof(HTC_FRAME_HDR)); /* setup HTC frame header */ - pHtcHdr = (HTC_FRAME_HDR *) cdf_nbuf_get_frag_vaddr(netbuf, 0); + pHtcHdr = (HTC_FRAME_HDR *) qdf_nbuf_get_frag_vaddr(netbuf, 0); AR_DEBUG_ASSERT(pHtcHdr); HTC_WRITE32(pHtcHdr, SM(pPacket->ActualLength, @@ -1289,7 +1288,7 @@ A_STATUS htc_send_pkts_multiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu * mapped. This only applies to non-data frames, since data frames * were already mapped as they entered into the driver. */ - cdf_nbuf_map(target->osdev, + qdf_nbuf_map(target->osdev, GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket), QDF_DMA_TO_DEVICE); @@ -1349,7 +1348,7 @@ A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) #ifdef ATH_11AC_TXCOMPACT -A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, cdf_nbuf_t netbuf, int Epid, +A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, qdf_nbuf_t netbuf, int Epid, int ActualLength) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); @@ -1380,10 +1379,10 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, cdf_nbuf_t netbuf, int Epid, if (hif_pm_runtime_get(target->hif_dev)) return A_ERROR; - pHtcHdr = (HTC_FRAME_HDR *) cdf_nbuf_get_frag_vaddr(netbuf, 0); + pHtcHdr = (HTC_FRAME_HDR *) qdf_nbuf_get_frag_vaddr(netbuf, 0); AR_DEBUG_ASSERT(pHtcHdr); - data_attr = cdf_nbuf_data_attr_get(netbuf); + data_attr = qdf_nbuf_data_attr_get(netbuf); HTC_WRITE32(pHtcHdr, SM(ActualLength, HTC_FRAME_HDR_PAYLOADLEN) | SM(Epid, HTC_FRAME_HDR_ENDPOINTID)); @@ -1409,10 +1408,10 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, cdf_nbuf_t netbuf, int Epid, pEndpoint->SeqNo++; - NBUF_UPDATE_TX_PKT_COUNT(netbuf, NBUF_TX_PKT_HTC); + QDF_NBUF_UPDATE_TX_PKT_COUNT(netbuf, QDF_NBUF_TX_PKT_HTC); DPTRACE(qdf_dp_trace(netbuf, QDF_DP_TRACE_HTC_PACKET_PTR_RECORD, - (uint8_t *)(cdf_nbuf_data(netbuf)), - sizeof(cdf_nbuf_data(netbuf)))); + (uint8_t *)(qdf_nbuf_data(netbuf)), + sizeof(qdf_nbuf_data(netbuf)))); status = hif_send_head(target->hif_dev, pEndpoint->UL_PipeID, pEndpoint->Id, ActualLength, netbuf, data_attr); @@ -1429,7 +1428,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, HTC_ENDPOINT *pEndpoint; HTC_FRAME_HDR *pHtcHdr; HTC_PACKET_QUEUE sendQueue; - cdf_nbuf_t netbuf = NULL; + qdf_nbuf_t netbuf = NULL; int tx_resources; A_STATUS status = A_OK; uint32_t data_attr = 0; @@ -1440,7 +1439,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, /* add HTC_FRAME_HDR in the initial fragment */ netbuf = GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket); - pHtcHdr = (HTC_FRAME_HDR *) cdf_nbuf_get_frag_vaddr(netbuf, 0); + pHtcHdr = (HTC_FRAME_HDR *) qdf_nbuf_get_frag_vaddr(netbuf, 0); AR_DEBUG_ASSERT(pHtcHdr); HTC_WRITE32(pHtcHdr, @@ -1544,10 +1543,10 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, get_htc_send_packets(target, pEndpoint, &sendQueue, tx_resources); UNLOCK_HTC_TX(target); } - NBUF_UPDATE_TX_PKT_COUNT(netbuf, NBUF_TX_PKT_HTC); + QDF_NBUF_UPDATE_TX_PKT_COUNT(netbuf, QDF_NBUF_TX_PKT_HTC); DPTRACE(qdf_dp_trace(netbuf, QDF_DP_TRACE_HTC_PACKET_PTR_RECORD, - (uint8_t *)(cdf_nbuf_data(netbuf)), - sizeof(cdf_nbuf_data(netbuf)))); + (uint8_t *)(qdf_nbuf_data(netbuf)), + sizeof(qdf_nbuf_data(netbuf)))); /* send what we can */ while (true) { @@ -1629,15 +1628,16 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, #endif /*ATH_11AC_TXCOMPACT */ /* - * In the adapted HIF layer, cdf_nbuf_t are passed between HIF and HTC, since upper layers expects - * HTC_PACKET containers we use the completed netbuf and lookup its corresponding HTC packet buffer - * from a lookup list. - * This is extra overhead that can be fixed by re-aligning HIF interfaces with HTC. + * In the adapted HIF layer, qdf_nbuf_t are passed between HIF and HTC, + * since upper layers expects HTC_PACKET containers we use the completed netbuf + * and lookup its corresponding HTC packet buffer from a lookup list. + * This is extra overhead that can be fixed by re-aligning HIF interfaces + * with HTC. * */ static HTC_PACKET *htc_lookup_tx_packet(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, - cdf_nbuf_t netbuf) + qdf_nbuf_t netbuf) { HTC_PACKET *pPacket = NULL; HTC_PACKET *pFoundPacket = NULL; @@ -1655,7 +1655,7 @@ static HTC_PACKET *htc_lookup_tx_packet(HTC_TARGET *target, UNLOCK_HTC_TX(target); return NULL; } - if (netbuf == (cdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket)) { + if (netbuf == (qdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket)) { UNLOCK_HTC_TX(target); return pPacket; } else { @@ -1679,7 +1679,7 @@ static HTC_PACKET *htc_lookup_tx_packet(HTC_TARGET *target, } /* check for removal */ if (netbuf == - (cdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket)) { + (qdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket)) { /* found it */ HTC_PACKET_REMOVE(&lookupQueue, pPacket); pFoundPacket = pPacket; @@ -1698,7 +1698,7 @@ static HTC_PACKET *htc_lookup_tx_packet(HTC_TARGET *target, } QDF_STATUS htc_tx_completion_handler(void *Context, - cdf_nbuf_t netbuf, unsigned int EpID, + qdf_nbuf_t netbuf, unsigned int EpID, uint32_t toeplitz_hash_result) { HTC_TARGET *target = (HTC_TARGET *) Context; diff --git a/htc/htc_services.c b/htc/htc_services.c index 99fc20e254..a6cdeaa60d 100644 --- a/htc/htc_services.c +++ b/htc/htc_services.c @@ -27,7 +27,7 @@ #include "htc_debug.h" #include "htc_internal.h" -#include /* cdf_nbuf_t */ +#include /* qdf_nbuf_t */ #include "hif.h" /* use credit flow control over HTC */ @@ -66,7 +66,7 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX; HTC_ENDPOINT *pEndpoint; unsigned int maxMsgSize = 0; - cdf_nbuf_t netbuf; + qdf_nbuf_t netbuf; A_UINT8 txAlloc; int length; A_BOOL disableCreditFlowCtrl = false; @@ -109,16 +109,16 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle, } netbuf = - (cdf_nbuf_t) + (qdf_nbuf_t) GET_HTC_PACKET_NET_BUF_CONTEXT(pSendPacket); length = sizeof(HTC_CONNECT_SERVICE_MSG) + pConnectReq->MetaDataLength; /* assemble connect service message */ - cdf_nbuf_put_tail(netbuf, length); + qdf_nbuf_put_tail(netbuf, length); pConnectMsg = - (HTC_CONNECT_SERVICE_MSG *) cdf_nbuf_data(netbuf); + (HTC_CONNECT_SERVICE_MSG *) qdf_nbuf_data(netbuf); if (NULL == pConnectMsg) { AR_DEBUG_ASSERT(0);