qcacmn: [2/2] Support both qca8074v1 and qca8074v2 from hal
Pass hal_soc handle to hal function calls to invoke appropriate target specific hal APIs Change-Id: I1d646875508cab9b2ec2af55441cbece36a020cd
This commit is contained in:

committed by
nshrivas

parent
5d80641550
commit
3715aa4dd6
@@ -1780,7 +1780,7 @@ static int dp_hw_link_desc_pool_setup(struct dp_soc *soc)
|
||||
|
||||
fail:
|
||||
if (soc->wbm_idle_link_ring.hal_srng) {
|
||||
dp_srng_cleanup(soc->hal_soc, &soc->wbm_idle_link_ring,
|
||||
dp_srng_cleanup(soc, &soc->wbm_idle_link_ring,
|
||||
WBM_IDLE_LINK, 0);
|
||||
}
|
||||
|
||||
|
@@ -105,17 +105,20 @@ void dp_reo_status_ring_handler(struct dp_soc *soc)
|
||||
switch (tlv) {
|
||||
case HAL_REO_QUEUE_STATS_STATUS_TLV:
|
||||
hal_reo_queue_stats_status(reo_desc,
|
||||
&reo_status.queue_status);
|
||||
&reo_status.queue_status,
|
||||
soc->hal_soc);
|
||||
num = reo_status.queue_status.header.cmd_num;
|
||||
break;
|
||||
case HAL_REO_FLUSH_QUEUE_STATUS_TLV:
|
||||
hal_reo_flush_queue_status(reo_desc,
|
||||
&reo_status.fl_queue_status);
|
||||
&reo_status.fl_queue_status,
|
||||
soc->hal_soc);
|
||||
num = reo_status.fl_queue_status.header.cmd_num;
|
||||
break;
|
||||
case HAL_REO_FLUSH_CACHE_STATUS_TLV:
|
||||
hal_reo_flush_cache_status(reo_desc, soc->hal_soc,
|
||||
&reo_status.fl_cache_status);
|
||||
&reo_status.fl_cache_status,
|
||||
soc->hal_soc);
|
||||
num = reo_status.fl_cache_status.header.cmd_num;
|
||||
break;
|
||||
case HAL_REO_UNBLK_CACHE_STATUS_TLV:
|
||||
@@ -125,17 +128,20 @@ void dp_reo_status_ring_handler(struct dp_soc *soc)
|
||||
break;
|
||||
case HAL_REO_TIMOUT_LIST_STATUS_TLV:
|
||||
hal_reo_flush_timeout_list_status(reo_desc,
|
||||
&reo_status.fl_timeout_status);
|
||||
&reo_status.fl_timeout_status,
|
||||
soc->hal_soc);
|
||||
num = reo_status.fl_timeout_status.header.cmd_num;
|
||||
break;
|
||||
case HAL_REO_DESC_THRES_STATUS_TLV:
|
||||
hal_reo_desc_thres_reached_status(reo_desc,
|
||||
&reo_status.thres_status);
|
||||
&reo_status.thres_status,
|
||||
soc->hal_soc);
|
||||
num = reo_status.thres_status.header.cmd_num;
|
||||
break;
|
||||
case HAL_REO_UPDATE_RX_QUEUE_STATUS_TLV:
|
||||
hal_reo_rx_update_queue_status(reo_desc,
|
||||
&reo_status.rx_queue_status);
|
||||
&reo_status.rx_queue_status,
|
||||
soc->hal_soc);
|
||||
num = reo_status.rx_queue_status.header.cmd_num;
|
||||
break;
|
||||
default:
|
||||
|
@@ -996,7 +996,7 @@ dp_rx_defrag_nwifi_to_8023(qdf_nbuf_t nbuf, uint16_t hdrsize)
|
||||
msdu_desc_info = (uint8_t *)msdu0 +
|
||||
RX_MSDU_DETAILS_2_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_OFFSET;
|
||||
|
||||
dst_ind = hal_rx_msdu_reo_dst_ind_get(link_desc_va);
|
||||
dst_ind = hal_rx_msdu_reo_dst_ind_get(soc->hal_soc, link_desc_va);
|
||||
|
||||
qdf_mem_zero(msdu_desc_info, sizeof(struct rx_msdu_desc_info));
|
||||
|
||||
@@ -1630,7 +1630,7 @@ uint32_t dp_rx_frag_handle(struct dp_soc *soc, void *ring_desc,
|
||||
}
|
||||
|
||||
/* Get msdu_list for the given MPDU */
|
||||
hal_rx_msdu_list_get(link_desc_va, &msdu_list,
|
||||
hal_rx_msdu_list_get(soc->hal_soc, link_desc_va, &msdu_list,
|
||||
&mpdu_desc_info->msdu_count);
|
||||
|
||||
/* Process all MSDUs in the current MPDU */
|
||||
|
@@ -271,7 +271,7 @@ static uint32_t dp_rx_msdus_drop(struct dp_soc *soc, void *ring_desc,
|
||||
link_desc_va = dp_rx_cookie_2_link_desc_va(soc, &buf_info);
|
||||
|
||||
/* No UNMAP required -- this is "malloc_consistent" memory */
|
||||
hal_rx_msdu_list_get(link_desc_va, &msdu_list,
|
||||
hal_rx_msdu_list_get(soc->hal_soc, link_desc_va, &msdu_list,
|
||||
&mpdu_desc_info->msdu_count);
|
||||
|
||||
for (i = 0; (i < mpdu_desc_info->msdu_count) && quota--; i++) {
|
||||
@@ -1013,7 +1013,8 @@ dp_rx_err_process(struct dp_soc *soc, void *hal_ring, uint32_t quota)
|
||||
|
||||
hal_rx_reo_buf_paddr_get(ring_desc, &hbi);
|
||||
link_desc_va = dp_rx_cookie_2_link_desc_va(soc, &hbi);
|
||||
hal_rx_msdu_list_get(link_desc_va, &msdu_list, &num_msdus);
|
||||
hal_rx_msdu_list_get(soc->hal_soc, link_desc_va, &msdu_list,
|
||||
&num_msdus);
|
||||
|
||||
if (qdf_unlikely((msdu_list.rbm[0] != DP_WBM2SW_RBM) &&
|
||||
(msdu_list.rbm[0] !=
|
||||
@@ -1394,7 +1395,8 @@ dp_rx_err_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
|
||||
|
||||
qdf_assert(rx_msdu_link_desc);
|
||||
|
||||
hal_rx_msdu_list_get(rx_msdu_link_desc, &msdu_list, &num_msdus);
|
||||
hal_rx_msdu_list_get(soc->hal_soc, rx_msdu_link_desc,
|
||||
&msdu_list, &num_msdus);
|
||||
|
||||
if (msdu_list.sw_cookie[0] != HAL_RX_COOKIE_SPECIAL) {
|
||||
/* if the msdus belongs to NSS offloaded radio &&
|
||||
|
@@ -188,7 +188,8 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
|
||||
|
||||
qdf_assert(rx_msdu_link_desc);
|
||||
|
||||
hal_rx_msdu_list_get(rx_msdu_link_desc, &msdu_list, &num_msdus);
|
||||
hal_rx_msdu_list_get(soc->hal_soc, rx_msdu_link_desc,
|
||||
&msdu_list, &num_msdus);
|
||||
|
||||
for (i = 0; i < num_msdus; i++) {
|
||||
uint32_t l2_hdr_offset;
|
||||
|
@@ -912,7 +912,8 @@ static QDF_STATUS dp_tx_hw_enqueue(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
|
||||
hal_tx_desc_set_fw_metadata(hal_tx_desc_cached, fw_metadata);
|
||||
hal_tx_desc_set_buf_addr(hal_tx_desc_cached,
|
||||
dma_addr , bm_id, tx_desc->id, type);
|
||||
dma_addr, bm_id, tx_desc->id,
|
||||
type, soc->hal_soc);
|
||||
|
||||
if (!dp_tx_is_desc_id_valid(soc, tx_desc->id))
|
||||
return QDF_STATUS_E_RESOURCES;
|
||||
@@ -1244,7 +1245,7 @@ static void dp_non_std_tx_comp_free_buff(struct dp_tx_desc_s *tx_desc,
|
||||
struct hal_tx_completion_status ts = {0};
|
||||
qdf_nbuf_t nbuf = tx_desc->nbuf;
|
||||
|
||||
hal_tx_comp_get_status(&tx_desc->comp, &ts);
|
||||
hal_tx_comp_get_status(&tx_desc->comp, &ts, vdev->pdev->soc->hal_soc);
|
||||
if (vdev->tx_non_std_data_callback.func) {
|
||||
qdf_nbuf_set_next(tx_desc->nbuf, NULL);
|
||||
vdev->tx_non_std_data_callback.func(
|
||||
@@ -2858,7 +2859,7 @@ static inline void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc,
|
||||
struct ether_header *eh =
|
||||
(struct ether_header *)qdf_nbuf_data(tx_desc->nbuf);
|
||||
|
||||
hal_tx_comp_get_status(&tx_desc->comp, &ts);
|
||||
hal_tx_comp_get_status(&tx_desc->comp, &ts, vdev->pdev->soc->hal_soc);
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"-------------------- \n"
|
||||
@@ -2953,7 +2954,7 @@ static void dp_tx_comp_process_desc(struct dp_soc *soc,
|
||||
desc = comp_head;
|
||||
|
||||
while (desc) {
|
||||
hal_tx_comp_get_status(&desc->comp, &ts);
|
||||
hal_tx_comp_get_status(&desc->comp, &ts, soc->hal_soc);
|
||||
peer = dp_peer_find_by_id(soc, ts.peer_id);
|
||||
length = qdf_nbuf_len(desc->nbuf);
|
||||
|
||||
|
Reference in New Issue
Block a user