xx

SRNG PDEV 相关内存
/* Ring used to replenish rx buffers (maybe to the firmware of MAC) /
struct dp_srng rx_refill_buf_ring[MAX_PDEV_CNT];
struct dp_srng rxdma_mon_desc_ring[MAX_NUM_LMAC_HW];
/
RXDMA error destination ring /
struct dp_srng rxdma_err_dst_ring[MAX_NUM_LMAC_HW];
/
RXDMA monitor buffer replenish ring /
struct dp_srng rxdma_mon_buf_ring[MAX_NUM_LMAC_HW];
/
RXDMA monitor destination ring /
struct dp_srng rxdma_mon_dst_ring[MAX_NUM_LMAC_HW];
/
RXDMA monitor status ring. TBD: Check format of this ring */
struct dp_srng rxdma_mon_status_ring[MAX_NUM_LMAC_HW];

SRNG 数据路径 相关内存
/* Common WBM link descriptor release ring (SW to WBM) /
struct dp_srng wbm_desc_rel_ring;
/
It is used as credit based ring on QCN9000 else command ring /
struct dp_srng tcl_cmd_credit_ring;
/
TCL command status ring /
struct dp_srng tcl_status_ring;
/
REO reinjection ring /
struct dp_srng reo_reinject_ring;
/
WBM Rx release ring /
struct dp_srng rx_rel_ring;
/
REO exception ring - See if should combine this with reo_dest_ring /
struct dp_srng reo_exception_ring;
/
REO command ring /
struct dp_srng reo_cmd_ring;
/
REO command status ring /
struct dp_srng reo_status_ring;
/
TCL data ring /
struct dp_srng tcl_data_ring[MAX_TCL_DATA_RINGS];
/
WBM Tx completion rings /
struct dp_srng tx_comp_ring[MAX_TCL_DATA_RINGS];
/
REO destination rings */
struct dp_srng reo_dest_ring[MAX_REO_DEST_RINGS];

SRNG IPA 相关内存
/* TCL data ring /
struct dp_srng tcl_data_ring[MAX_TCL_DATA_RINGS];
/
WBM Tx completion rings /
struct dp_srng tx_comp_ring[MAX_TCL_DATA_RINGS];
/
REO destination rings /
struct dp_srng reo_dest_ring[MAX_REO_DEST_RINGS];
/
Second ring used to replenish rx buffers */
struct dp_srng rx_refill_buf_ring2;

-1-2-3-4-5->cdp_txrx_intr_attach / dp_soc_interrupt_attach_wrapper
-1-2-3-4-5->dp_txrx_init
-1-2-3-4->cds_pre_enable
-1-2-3-4-5->wma_pre_start
-1-2-3-4-5-6->wmi_unified_connect_htc_service
-1-2-3-4-5-6-7->wmi_connect_pdev_htc_service / htc_connect_service //CB: wmi_control_rx
-1-2-3-4-5-6->wmi_diag_connect_pdev_htc_service /htc_connect_service //CB: wmi_control_diag_rx
-1-2-3-4-5->htc_start
-1-2-3-4-5->cdp_pdev_post_attach
-1-2-3-4->hdd_configure_cds
-1-2-3-4-5-> ipa_register_ipa_ready_cb / ipa_register_ipa_ready_cb / ipa3_register_ipa_ready_cb //CB: ipa_register_ready_cb
-1-2-3-4-5-6->ipa_obj_setup / wlan_ipa_setup
-1-2-3-4-5-6-7>wlan_ipa_wdi_setup_rm
-1-2-3-4-5-6-7>wlan_ipa_wdi_init / qdf_ipa_wdi_init / ipa_wdi_init // 网络事件循环 __wlan_ipa_wlan_evt
-1-2-3-4-5-6-7>wlan_ipa_setup_sys_pipe / wlan_ipa_setup_tx_sys_pipe
-1-2-3-4-5-6->ipa_uc_ol_init / wlan_ipa_uc_ol_init
-1-2-3-4-5-6-7->cdp_ipa_get_resource / dp_ipa_get_resource //IPA CB: wlan_ipa_uc_op_event_handler
-1-2-3-4-5-6-7->wlan_ipa_wdi_setup / dp_ipa_setup / qdf_ipa_wdi_conn_pipes / ipa_wdi_conn_pipes / ipa3_conn_wdi3_pipes // IPA CB: wlan_ipa_uc_op_event_handler,如WLAN_IPA_UC_OPCODE_UC_READY
-1-2-3-4-5-6-7->cdp_ipa_tx_buf_smmu_mapping
-1-2-3-4-5-6-7->cdp_ipa_set_doorbell_paddr
-1-2-3-4-5->cds_enable
-1-2-3-4-5-6>wma_start
-1-2-3-4-5-6>mac_start
-1-2-3-4-5-6>sme_start
-1-2->hdd_psoc_create_vdevs

ipa_generic_plat_drv_probe / ipa3_plat_drv_probe
-1->ipa3_bind_api_controller
-1->ipa3_pre_init
-1-2->分配ipa3_ctx
-1-2->ipa3_controller_static_bind
-1-2->ipa3_init_mem_partition
-1-2->gsi_map_base //映射GSI物理地址
-1-2->ipahal_init
-1-2->分配内存池
-1-2->/dev/ipa //ipa3_drv_fops
-1->ipa3_attach_to_smmu
-1->ipa3_post_init
-1-2->ipahal_init
-1-2->ipa3_init_hw
-1-2->ipa3_init_interrupts
-1-2->gsi_register_device
-1-2->ipa3_setup_apps_pipes
-1-2->ipa3_uc_interface_init
-1-2->ipa3_wdi_init

== TX 管理帧 ==
void lim_populate_mac_header(
struct mac_context *mac_ctx, uint8_t *buf,
uint8_t type,
uint8_t sub_type,
tSirMacAddr peer_addr,tSirMacAddr self_mac_addr);

QDF_STATUS wma_tx_packet(
void *wma_context, void *tx_frame, uint16_t frmLen,
eFrameType frmType, eFrameTxDir txDir, uint8_t tid,
wma_tx_dwnld_comp_callback tx_frm_download_comp_cb,
void *pData,
wma_tx_ota_comp_callback tx_frm_ota_comp_cb,
uint8_t tx_flag, uint8_t vdev_id, bool tdls_flag,
uint16_t channel_freq, enum rateid rid);

== RX 管理帧==
void __wmi_control_rx(
struct wmi_unified *wmi_handle,
wmi_buf_t evt_buf);

static QDF_STATUS pe_handle_mgmt_frame(
struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_peer *peer, qdf_nbuf_t buf,
struct mgmt_rx_event_params *mgmt_rx_params,
enum mgmt_frame_type frm_type);

QDF_STATUS wmi_unified_register_event(
wmi_unified_t wmi_handle,
uint32_t event_id,
wmi_unified_event_handler handler_func);

QDF_STATUS wmi_unified_register_event_handler(
wmi_unified_t wmi_handle,
wmi_conv_event_id event_id,
wmi_unified_event_handler handler_func,
uint8_t rx_ctx);

== TX 数据帧 ==
AP网卡
__hdd_softap_hard_start_xmit
dp_tx_send
dp_tx_hw_enqueue //写入数据RING

STA网卡
__hdd_hard_start_xmit
dp_tx_send
dp_tx_hw_enqueue //写入数据RING

== RX 数据帧(开启IPA) ==
IPA RX中断
gsi_isr
wlan_ipa_w2i_cb
wlan_ipa_send_skb_to_network
hdd_ipa_send_nbuf_to_network
netif_rx
AP网卡/STA网卡

== RX 数据帧(关闭IPA) ==

== cfg802.11 调用HDD ==
wlan_hdd_cfg80211_ops
高通扩展hdd_wiphy_vendor_commands / wlan_hdd_cfg80211_vendor_events

== HDD 调用 cfg802.11 ==
调用cfg80211.h函数,如wiphy_register

//
wma_open
-1->wma_target_if_open
-1->wlan_global_lmac_if_open
-1->wlan_global_lmac_if_rx_ops_register
-1-2->wlan_lmac_if_umac_rx_ops_register //CB:tgt_mgmt_txrx_rx_frame_handler mgmt_rx_comp_cb pe_handle_mgmt_frame
-1-2->wlan_spectral_register_rx_ops

//模块入口
gsi_init
ipa_module_init
ipa3_wwan_init
ipa3_usb_init
ipa_mpm_init

//HDD 三类中断
CE:hif_ce_interrupt_handler

WAKE: hif_wake_interrupt_handler
DP: hif_ext_group_interrupt_handler

//IPA交互 start
wlan_ipa_wdi_init / qdf_ipa_wdi_init / ipa_wdi_init
wlan_ipa_setup_sys_pipe / wlan_ipa_setup_tx_sys_pipe
wlan_ipa_uc_ol_init /wlan_ipa_wdi_setup / dp_ipa_setup/ qdf_ipa_wdi_conn_pipes / ipa_wdi_conn_pipes // CB: wlan_ipa_w2i_cb
ipa_wdi_set_perf_profile
//EVT: 2
wlan_ipa_setup_iface / dp_ipa_setup_iface / ipa_wdi_reg_intf
ipa_wdi_commit_partial_hdr
ipa3_add_hdr_usr
//EVT: 6
wlan_ipa_uc_handle_first_con / wlan_ipa_uc_enable_pipes/ qdf_ipa_wdi_enable_pipes / ipa_wdi_enable_pipes
//IPA交互 end

IPACM调试
systemctl stop ipacm.service
systemctl status ipacm.service
systemctl start ipacm.service

IPACM_Neighbor
IPACM_IfaceManager
IPACM_LanToLan
IPACM_ConntrackClient
-1-> nfct_filter_create
-1-> nfct_filter_create
IPACM_ConntrackListener
-1-> NatApp
-1-> NatApp::Init
-1-> Ipv6ct
pthread_create(&cmd_queue_thread, NULL, MessageQueue::Process, NULL);
pthread_create(&netlink_thread, NULL, netlink_start, NULL);
pthread_create(&monitor_thread, NULL, firewall_monitor, NULL);
pthread_create(&ipa_driver_thread, NULL, ipa_driver_msg_notifier, NULL);

CreateConnTrackThreads
-1-> pthread_create(&tcp_thread, NULL, IPACM_ConntrackClient::TCPRegisterWithConnTrack, NULL);
-1-> pthread_create(&udp_thread, NULL, IPACM_ConntrackClient::UDPRegisterWithConnTrack, NULL);

线程TCPConnTrack
-1-> nfct_open
-1-> IPA_Conntrack_TCP_Filter_Init
-1-> nfct_filter_attach
-1-> nfct_callback_register //CB: IPAConntrackEventCB
-1-> nfct_catch

线程UDPConnTrack
-1-> nfct_open
-1-> IPA_Conntrack_UDP_Filter_Init
-1-> nfct_filter_attach
-1-> nfct_callback_register //CB: IPAConntrackEventCB
-1-> nfct_catch

class Ipv6Nat : public NatBase
class Ipv6ct : public NatBase

rmnet_ipa 与IPA RX交互:
ipa3_setup_sys_pipe //CB: apps_ipa_packet_receive_notify
rmnet_ipa 与IPA tx交互:
ipa3_tx_dp

ipa_wdi_init 取出参数

HDD 与IPA RX交互:
ipa_wdi_conn_pipes / ipa_setup_sys_pipe /ipa3_setup_sys_pipe //CB: wlan_ipa_w2i_cb
HDD 与IPA TX交互:
无数据发送?

向IPA发送数据:
ipa3_send_cmd
-1->gsi_queue_xfer
-1-2->gsi_ring_chan_doorbell

IPA中断:
gsi_isr
-1->gsi_handle_irq
-1-2->gsi_handle_ieob
-1-2-3->gsi_process_chan
-1-2-3-4->ipa_gsi_irq_rx_notify_cb

i_qdf_ipa_wdi3.h & i_qdf_ipa.h 文件
ipa_register_intf
ipa_register_intf_ext

ipa_setup_sys_pipe
ipa_teardown_sys_pipe

ipa_enable_wdi_pipe
ipa_disable_wdi_pipe

ipa_connect_wdi_pipe
ipa_disconnect_wdi_pipe

WWAN
rmnet_ipa.c

WWAN -> ipa3_setup_sys_pipe IPA
HDD -> ipa3_setup_sys_pipe IPA
USB/ECM ->
mhi_dev ->
RNDIS_IPA ->

WMI RX
Rx:
hif_ce_interrupt_handler
-1->ce_dispatch_interrupt
-1-2->ce_tasklet
-1-2-3->ce_per_engine_service
-1-2-3-4->ce_engine_service_reg //CE_state->service
-1-2-3-4-5->CE_state->recv_cb //ce_recv_cb_register
-1-2-3-4-5-6->hif_pci_ce_send_done
-1-2-3-4-5-6-7->htc_tx_completion_handler
-1-2-3-4-5->CE_state->send_cb //ce_send_cb_register

posted on 2023-07-26 10:04  huangguanyuan  阅读(85)  评论(0编辑  收藏  举报

导航