Lines Matching refs:soc
70 static inline bool dp_rx_mec_check_wrapper(struct dp_soc *soc, in dp_rx_mec_check_wrapper() argument
75 return dp_rx_mcast_echo_check(soc, txrx_peer, rx_tlv_hdr, nbuf); in dp_rx_mec_check_wrapper()
78 static inline bool dp_rx_mec_check_wrapper(struct dp_soc *soc, in dp_rx_mec_check_wrapper() argument
90 dp_rx_intrabss_ucast_check_li(struct dp_soc *soc, qdf_nbuf_t nbuf, in dp_rx_intrabss_ucast_check_li() argument
103 ast_entry = soc->ast_table[msdu_metadata->da_idx]; in dp_rx_intrabss_ucast_check_li()
121 da_peer = dp_txrx_peer_get_ref_by_id(soc, da_peer_id, in dp_rx_intrabss_ucast_check_li()
157 dp_rx_intrabss_fwd_li(struct dp_soc *soc, in dp_rx_intrabss_fwd_li() argument
175 return dp_rx_intrabss_mcbc_fwd(soc, ta_txrx_peer, rx_tlv_hdr, in dp_rx_intrabss_fwd_li()
178 if (dp_rx_intrabss_eapol_drop_check(soc, ta_txrx_peer, rx_tlv_hdr, in dp_rx_intrabss_fwd_li()
182 if (dp_rx_intrabss_ucast_check_li(soc, nbuf, ta_txrx_peer, in dp_rx_intrabss_fwd_li()
184 return dp_rx_intrabss_ucast_fwd(soc, ta_txrx_peer, tx_vdev_id, in dp_rx_intrabss_fwd_li()
224 struct dp_soc *soc = int_ctx->soc; in dp_rx_process_li() local
252 qdf_assert_always(soc && hal_ring_hdl); in dp_rx_process_li()
253 hal_soc = soc->hal_soc; in dp_rx_process_li()
256 buf_size = wlan_cfg_rx_buffer_size(soc->wlan_cfg_ctx); in dp_rx_process_li()
258 scn = soc->hif_handle; in dp_rx_process_li()
261 dp_runtime_pm_mark_last_busy(soc); in dp_rx_process_li()
274 max_reap_limit = dp_rx_get_loop_pkt_limit(soc); in dp_rx_process_li()
290 if (qdf_unlikely(dp_rx_srng_access_start(int_ctx, soc, hal_ring_hdl))) { in dp_rx_process_li()
295 DP_STATS_INC(soc, rx.err.hal_ring_access_fail, 1); in dp_rx_process_li()
304 dp_srng_dst_inv_cached_descs(soc, hal_ring_hdl, num_pending); in dp_rx_process_li()
312 peer_ext_stats = wlan_cfg_is_peer_ext_stats_enabled(soc->wlan_cfg_ctx); in dp_rx_process_li()
313 max_ast = wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx); in dp_rx_process_li()
320 ring_desc = dp_srng_dst_get_next(soc, hal_ring_hdl); in dp_rx_process_li()
328 soc, hal_ring_hdl, error); in dp_rx_process_li()
329 DP_STATS_INC(soc, rx.err.hal_reo_error[reo_ring_num], in dp_rx_process_li()
335 dp_rx_ring_record_entry(soc, reo_ring_num, ring_desc); in dp_rx_process_li()
339 DP_STATS_INC(soc, rx.err.stale_cookie, 1); in dp_rx_process_li()
343 rx_desc = dp_rx_cookie_2_va_rxdma_buf(soc, rx_buf_cookie); in dp_rx_process_li()
344 status = dp_rx_desc_sanity(soc, hal_soc, hal_ring_hdl, in dp_rx_process_li()
349 dp_rx_nbuf_unmap(soc, rx_desc, reo_ring_num); in dp_rx_process_li()
350 dp_rx_buffer_pool_nbuf_free(soc, rx_desc->nbuf, in dp_rx_process_li()
369 DP_STATS_INC(soc, rx.err.hal_reo_dest_dup, 1); in dp_rx_process_li()
371 dp_rx_dump_info_and_assert(soc, hal_ring_hdl, in dp_rx_process_li()
378 status = dp_rx_desc_nbuf_sanity_check(soc, ring_desc, rx_desc); in dp_rx_process_li()
380 DP_STATS_INC(soc, rx.err.nbuf_sanity_fail, 1); in dp_rx_process_li()
382 dp_rx_dump_info_and_assert(soc, hal_ring_hdl, in dp_rx_process_li()
390 DP_STATS_INC(soc, rx.err.rx_desc_invalid_magic, 1); in dp_rx_process_li()
391 dp_rx_dump_info_and_assert(soc, hal_ring_hdl, in dp_rx_process_li()
414 soc->rx_pkt_tlv_size) + 1) > in dp_rx_process_li()
416 DP_STATS_INC(soc, in dp_rx_process_li()
449 dp_rx_peer_metadata_peer_id_get_li(soc, peer_mdata); in dp_rx_process_li()
499 dp_rx_nbuf_unmap(soc, rx_desc, reo_ring_num); in dp_rx_process_li()
500 DP_RX_PROCESS_NBUF(soc, nbuf_head, nbuf_tail, ebuf_head, in dp_rx_process_li()
510 dp_rx_prefetch_hw_sw_nbuf_desc(soc, hal_soc, num_pending, in dp_rx_process_li()
520 dp_rx_reap_loop_pkt_limit_hit(soc, num_rx_bufs_reaped, in dp_rx_process_li()
525 dp_rx_srng_access_end(int_ctx, soc, hal_ring_hdl); in dp_rx_process_li()
527 dp_rx_per_core_stats_update(soc, reo_ring_num, num_rx_bufs_reaped); in dp_rx_process_li()
537 dp_rxdma_srng = &soc->rx_refill_buf_ring[mac_id]; in dp_rx_process_li()
539 rx_desc_pool = &soc->rx_desc_buf[mac_id]; in dp_rx_process_li()
541 dp_rx_buffers_replenish_simple(soc, mac_id, dp_rxdma_srng, in dp_rx_process_li()
566 DP_STATS_INC(soc, rx.err.raw_frm_drop, 1); in dp_rx_process_li()
576 dp_rx_deliver_to_stack(soc, vdev, txrx_peer, in dp_rx_process_li()
588 DP_STATS_INC(soc, rx.err.rx_invalid_tid_err, 1); in dp_rx_process_li()
596 dp_rx_get_txrx_peer_and_vdev(soc, nbuf, peer_id, in dp_rx_process_li()
611 dp_rx_get_txrx_peer_and_vdev(soc, nbuf, peer_id, in dp_rx_process_li()
659 DP_STATS_INC(soc, rx.err.msdu_done_fail, 1); in dp_rx_process_li()
669 DP_STATS_INC(soc, rx.err.msdu_len_err, 1); in dp_rx_process_li()
706 is_mcbc = hal_rx_msdu_end_da_is_mcbc_get(soc->hal_soc, in dp_rx_process_li()
709 hal_rx_msdu_end_sa_is_valid_get(soc->hal_soc, in dp_rx_process_li()
712 hal_rx_msdu_end_da_is_valid_get(soc->hal_soc, in dp_rx_process_li()
719 qdf_nbuf_pull_head(nbuf, soc->rx_pkt_tlv_size); in dp_rx_process_li()
722 nbuf = dp_rx_sg_create(soc, nbuf); in dp_rx_process_li()
732 DP_STATS_INC(soc, rx.err.scatter_msdu, 1); in dp_rx_process_li()
746 soc->rx_pkt_tlv_size; in dp_rx_process_li()
749 dp_rx_skip_tlvs(soc, nbuf, msdu_metadata.l3_hdr_pad); in dp_rx_process_li()
752 dp_rx_send_pktlog(soc, rx_pdev, nbuf, QDF_TX_RX_STATUS_OK); in dp_rx_process_li()
770 dp_rx_err("%pK: Policy Check Drop pkt", soc); in dp_rx_process_li()
784 (hal_rx_get_mpdu_mac_ad4_valid(soc->hal_soc, in dp_rx_process_li()
815 if (soc->process_rx_status) in dp_rx_process_li()
819 dp_rx_update_protocol_tag(soc, vdev, nbuf, rx_tlv_hdr, in dp_rx_process_li()
823 dp_rx_update_flow_tag(soc, vdev, nbuf, rx_tlv_hdr, true); in dp_rx_process_li()
825 dp_rx_msdu_stats_update(soc, nbuf, rx_tlv_hdr, txrx_peer, in dp_rx_process_li()
831 dp_rx_info("%pK: mesh pkt filtered", soc); in dp_rx_process_li()
861 DP_STATS_INC(soc, rx.err.invalid_sa_da_idx, 1); in dp_rx_process_li()
864 if (qdf_unlikely(dp_rx_mec_check_wrapper(soc, in dp_rx_process_li()
879 dp_rx_wds_srcport_learn(soc, in dp_rx_process_li()
887 if (dp_rx_intrabss_fwd_li(soc, txrx_peer, in dp_rx_process_li()
898 dp_rx_fill_gro_info(soc, rx_tlv_hdr, nbuf, &rx_ol_pkt_cnt); in dp_rx_process_li()
903 dp_rx_update_stats(soc, nbuf); in dp_rx_process_li()
926 DP_RX_DELIVER_TO_STACK(soc, vdev, txrx_peer, peer_id, in dp_rx_process_li()
934 if (dp_rx_enable_eol_data_check(soc) && rx_bufs_used) { in dp_rx_process_li()
942 DP_STATS_INC(soc, rx.hp_oos2, 1); in dp_rx_process_li()
948 DP_STATS_INC(soc, rx.near_full, 1); in dp_rx_process_li()
955 vdev->osif_fisa_flush(soc, reo_ring_num); in dp_rx_process_li()
969 QDF_STATUS dp_rx_desc_pool_init_li(struct dp_soc *soc, in dp_rx_desc_pool_init_li() argument
973 return dp_rx_desc_pool_init_generic(soc, rx_desc_pool, pool_id); in dp_rx_desc_pool_init_li()
977 void dp_rx_desc_pool_deinit_li(struct dp_soc *soc, in dp_rx_desc_pool_deinit_li() argument
984 struct dp_soc *soc, in dp_wbm_get_rx_desc_from_hal_desc_li() argument
989 hal_soc_handle_t hal_soc = soc->hal_soc; in dp_wbm_get_rx_desc_from_hal_desc_li()
996 HAL_RX_BUF_RBM_SW3_BM(soc->wbm_sw0_bm_id))) { in dp_wbm_get_rx_desc_from_hal_desc_li()
999 DP_STATS_INC(soc, rx.err.invalid_rbm, 1); in dp_wbm_get_rx_desc_from_hal_desc_li()
1000 dp_rx_err("%pK: Invalid RBM %d", soc, buf_info.rbm); in dp_wbm_get_rx_desc_from_hal_desc_li()
1004 if (!dp_rx_is_sw_cookie_valid(soc, buf_info.sw_cookie)) { in dp_wbm_get_rx_desc_from_hal_desc_li()
1009 *r_rx_desc = dp_rx_cookie_2_va_rxdma_buf(soc, buf_info.sw_cookie); in dp_wbm_get_rx_desc_from_hal_desc_li()
1014 bool dp_rx_chain_msdus_li(struct dp_soc *soc, qdf_nbuf_t nbuf, in dp_rx_chain_msdus_li() argument
1024 struct dp_pdev *dp_pdev = dp_get_pdev_for_lmac_id(soc, mac_id); in dp_rx_chain_msdus_li()
1027 dp_rx_debug("%pK: pdev is null for mac_id = %d", soc, mac_id); in dp_rx_chain_msdus_li()
1042 dp_pdev->ppdu_id = hal_rx_get_ppdu_id(soc->hal_soc, in dp_rx_chain_msdus_li()
1064 dp_monitor_get_mpdu_status(dp_pdev, soc, rx_tlv_hdr); in dp_rx_chain_msdus_li()
1067 if (dp_pdev->ppdu_id == hal_rx_attn_phy_ppdu_id_get(soc->hal_soc, in dp_rx_chain_msdus_li()
1069 hal_rx_attn_msdu_done_get(soc->hal_soc, rx_tlv_hdr)) { in dp_rx_chain_msdus_li()
1090 static struct dp_soc *dp_rx_replensih_soc_get_li(struct dp_soc *soc, in dp_rx_replensih_soc_get_li() argument
1093 return soc; in dp_rx_replensih_soc_get_li()
1097 dp_rx_wbm_err_reap_desc_li(struct dp_intr *int_ctx, struct dp_soc *soc, in dp_rx_wbm_err_reap_desc_li() argument
1125 qdf_assert(soc && hal_ring_hdl); in dp_rx_wbm_err_reap_desc_li()
1126 hal_soc = soc->hal_soc; in dp_rx_wbm_err_reap_desc_li()
1129 if (qdf_unlikely(dp_srng_access_start(int_ctx, soc, hal_ring_hdl))) { in dp_rx_wbm_err_reap_desc_li()
1136 soc, hal_ring_hdl); in dp_rx_wbm_err_reap_desc_li()
1150 soc, rx.err.wbm_err_buf_rel_type)) in dp_rx_wbm_err_reap_desc_li()
1157 if (soc->arch_ops.dp_wbm_get_rx_desc_from_hal_desc(soc, in dp_rx_wbm_err_reap_desc_li()
1164 if (dp_assert_always_internal_stat(rx_desc, soc, in dp_rx_wbm_err_reap_desc_li()
1170 soc, rx_desc); in dp_rx_wbm_err_reap_desc_li()
1182 DP_STATS_INC(soc, rx.err.hal_wbm_rel_dup, 1); in dp_rx_wbm_err_reap_desc_li()
1183 dp_rx_dump_info_and_assert(soc, hal_ring_hdl, in dp_rx_wbm_err_reap_desc_li()
1192 status = dp_rx_wbm_desc_nbuf_sanity_check(soc, hal_ring_hdl, in dp_rx_wbm_err_reap_desc_li()
1195 DP_STATS_INC(soc, rx.err.nbuf_sanity_fail, 1); in dp_rx_wbm_err_reap_desc_li()
1204 peer_mdata = hal_rx_tlv_peer_meta_data_get(soc->hal_soc, in dp_rx_wbm_err_reap_desc_li()
1207 dp_rx_peer_metadata_peer_id_get(soc, peer_mdata); in dp_rx_wbm_err_reap_desc_li()
1216 rx_desc_pool = &soc->rx_desc_buf[rx_desc->pool_id]; in dp_rx_wbm_err_reap_desc_li()
1217 dp_ipa_rx_buf_smmu_mapping_lock(soc); in dp_rx_wbm_err_reap_desc_li()
1218 dp_rx_nbuf_unmap_pool(soc, rx_desc_pool, nbuf); in dp_rx_wbm_err_reap_desc_li()
1220 dp_ipa_rx_buf_smmu_mapping_unlock(soc); in dp_rx_wbm_err_reap_desc_li()
1223 soc->wbm_release_desc_rx_sg_support && in dp_rx_wbm_err_reap_desc_li()
1230 !(soc->wbm_sg_param.wbm_is_first_msdu_in_sg)) { in dp_rx_wbm_err_reap_desc_li()
1232 soc->wbm_sg_param.wbm_sg_desc_msdu_len = in dp_rx_wbm_err_reap_desc_li()
1234 soc->hal_soc, in dp_rx_wbm_err_reap_desc_li()
1236 soc->wbm_sg_param.wbm_is_first_msdu_in_sg = in dp_rx_wbm_err_reap_desc_li()
1244 soc->wbm_sg_param.wbm_sg_desc_msdu_len; in dp_rx_wbm_err_reap_desc_li()
1250 soc->wbm_sg_param.wbm_sg_desc_msdu_len; in dp_rx_wbm_err_reap_desc_li()
1260 dp_rx_set_wbm_err_info_in_nbuf(soc, nbuf, wbm_err_info); in dp_rx_wbm_err_reap_desc_li()
1265 DP_RX_LIST_APPEND(soc->wbm_sg_param.wbm_sg_nbuf_head, in dp_rx_wbm_err_reap_desc_li()
1266 soc->wbm_sg_param.wbm_sg_nbuf_tail, in dp_rx_wbm_err_reap_desc_li()
1270 soc, in dp_rx_wbm_err_reap_desc_li()
1271 soc->wbm_sg_param.wbm_sg_nbuf_head, in dp_rx_wbm_err_reap_desc_li()
1275 soc->wbm_sg_param.wbm_sg_nbuf_head, in dp_rx_wbm_err_reap_desc_li()
1276 soc->wbm_sg_param.wbm_sg_nbuf_tail); in dp_rx_wbm_err_reap_desc_li()
1277 dp_rx_wbm_sg_list_last_msdu_war(soc); in dp_rx_wbm_err_reap_desc_li()
1278 dp_rx_wbm_sg_list_reset(soc); in dp_rx_wbm_err_reap_desc_li()
1281 } else if (!dp_rx_buffer_pool_refill(soc, nbuf, in dp_rx_wbm_err_reap_desc_li()
1299 dp_srng_access_end(int_ctx, soc, hal_ring_hdl); in dp_rx_wbm_err_reap_desc_li()
1310 dp_rx_replensih_soc_get_li(soc, chip_id); in dp_rx_wbm_err_reap_desc_li()
1329 dp_rx_null_q_desc_handle_li(struct dp_soc *soc, qdf_nbuf_t nbuf, in dp_rx_null_q_desc_handle_li() argument
1346 buf_size = wlan_cfg_rx_buffer_size(soc->wlan_cfg_ctx); in dp_rx_null_q_desc_handle_li()
1350 hal_rx_msdu_end_first_msdu_get(soc->hal_soc, in dp_rx_null_q_desc_handle_li()
1353 hal_rx_msdu_end_last_msdu_get(soc->hal_soc, in dp_rx_null_q_desc_handle_li()
1355 qdf_nbuf_set_da_mcbc(nbuf, hal_rx_msdu_end_da_is_mcbc_get(soc->hal_soc, in dp_rx_null_q_desc_handle_li()
1358 hal_rx_msdu_end_da_is_valid_get(soc->hal_soc, in dp_rx_null_q_desc_handle_li()
1361 hal_rx_msdu_end_sa_is_valid_get(soc->hal_soc, in dp_rx_null_q_desc_handle_li()
1364 tid = hal_rx_tid_get(soc->hal_soc, rx_tlv_hdr); in dp_rx_null_q_desc_handle_li()
1365 hal_rx_msdu_metadata_get(soc->hal_soc, rx_tlv_hdr, &msdu_metadata); in dp_rx_null_q_desc_handle_li()
1366 msdu_len = hal_rx_msdu_start_msdu_len_get(soc->hal_soc, rx_tlv_hdr); in dp_rx_null_q_desc_handle_li()
1367 pkt_len = msdu_len + msdu_metadata.l3_hdr_pad + soc->rx_pkt_tlv_size; in dp_rx_null_q_desc_handle_li()
1370 if (dp_rx_check_pkt_len(soc, pkt_len)) in dp_rx_null_q_desc_handle_li()
1381 if (!hal_rx_attn_msdu_done_get(soc->hal_soc, rx_tlv_hdr)) { in dp_rx_null_q_desc_handle_li()
1383 hal_rx_dump_pkt_tlvs(soc->hal_soc, rx_tlv_hdr, in dp_rx_null_q_desc_handle_li()
1389 dp_rx_null_q_handle_invalid_peer_id_exception(soc, pool_id, in dp_rx_null_q_desc_handle_li()
1395 struct dp_pdev *pdev = dp_get_pdev_for_lmac_id(soc, pool_id); in dp_rx_null_q_desc_handle_li()
1403 DP_STATS_INC_PKT(soc, rx.err.rx_invalid_peer, 1, in dp_rx_null_q_desc_handle_li()
1407 if (qdf_unlikely(soc->wbm_release_desc_rx_sg_support)) { in dp_rx_null_q_desc_handle_li()
1411 dp_rx_process_invalid_peer_wrapper(soc, in dp_rx_null_q_desc_handle_li()
1416 mpdu_done = soc->arch_ops.dp_rx_chain_msdus(soc, nbuf, in dp_rx_null_q_desc_handle_li()
1421 soc, in dp_rx_null_q_desc_handle_li()
1437 DP_STATS_INC(soc, rx.err.invalid_vdev, 1); in dp_rx_null_q_desc_handle_li()
1446 qdf_nbuf_pull_head(nbuf, soc->rx_pkt_tlv_size); in dp_rx_null_q_desc_handle_li()
1449 soc->rx_pkt_tlv_size)); in dp_rx_null_q_desc_handle_li()
1461 if (hal_rx_msdu_end_sa_is_valid_get(soc->hal_soc, rx_tlv_hdr)) { in dp_rx_null_q_desc_handle_li()
1462 sa_idx = hal_rx_msdu_end_sa_idx_get(soc->hal_soc, rx_tlv_hdr); in dp_rx_null_q_desc_handle_li()
1465 (sa_idx >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx))) { in dp_rx_null_q_desc_handle_li()
1466 DP_STATS_INC(soc, rx.err.invalid_sa_da_idx, 1); in dp_rx_null_q_desc_handle_li()
1471 if ((!soc->mec_fw_offload) && in dp_rx_null_q_desc_handle_li()
1472 dp_rx_mcast_echo_check(soc, txrx_peer, rx_tlv_hdr, nbuf)) { in dp_rx_null_q_desc_handle_li()
1491 hal_rx_msdu_end_da_is_mcbc_get(soc->hal_soc, in dp_rx_null_q_desc_handle_li()
1506 if (!soc->ast_offload_support && in dp_rx_null_q_desc_handle_li()
1509 dp_rx_wds_srcport_learn(soc, rx_tlv_hdr, txrx_peer, nbuf, in dp_rx_null_q_desc_handle_li()
1512 if (hal_rx_is_unicast(soc->hal_soc, rx_tlv_hdr)) { in dp_rx_null_q_desc_handle_li()
1516 peer = dp_peer_get_ref_by_id(soc, txrx_peer->peer_id, in dp_rx_null_q_desc_handle_li()
1532 hal_get_rx_max_ba_window(soc->hal_soc,tid), in dp_rx_null_q_desc_handle_li()
1569 if (qdf_unlikely(dp_rx_err_cce_drop(soc, vdev, nbuf, rx_tlv_hdr))) in dp_rx_null_q_desc_handle_li()
1589 dp_rx_update_protocol_tag(soc, vdev, nbuf, rx_tlv_hdr, in dp_rx_null_q_desc_handle_li()
1594 dp_rx_update_flow_tag(soc, vdev, nbuf, in dp_rx_null_q_desc_handle_li()
1598 soc->hal_soc, rx_tlv_hdr) && in dp_rx_null_q_desc_handle_li()
1628 dp_rx_deliver_to_osif_stack(soc, vdev, txrx_peer, nbuf, NULL, in dp_rx_null_q_desc_handle_li()