qcacmn: Fix hif/src documentation
The kernel-doc script identified a large number of kernel-doc issues in the hif/src folder, so fix them. Change-Id: Ia944c6c9f1bcb6a8f5f0ff07ca0afa7bf3a40ad0 CRs-Fixed: 3375493
This commit is contained in:

committed by
Madan Koyyalamudi

parent
db349c2678
commit
7cbbd39379
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2014, 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -50,7 +50,7 @@
|
||||
#define PROCFS_DIR "cld"
|
||||
#endif
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get op_type, mem_type and offset fields from pos of procfs
|
||||
* It will reuse pos, which is long long type
|
||||
*
|
||||
@@ -70,7 +70,7 @@
|
||||
#define ATH_DIAG_EXT_OFFSET_BITS 32
|
||||
#define ATH_DIAG_EXT_OFFSET_INDEX 0
|
||||
|
||||
/**
|
||||
/*
|
||||
* This structure hold information about the /proc file
|
||||
*
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -425,6 +425,9 @@ bool ce_get_rx_pending(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* war_ce_src_ring_write_idx_set() - Set write index for CE source ring
|
||||
* @scn: HIF context
|
||||
* @ctrl_addr: address
|
||||
* @write_index: write index
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -35,7 +35,7 @@
|
||||
#if defined(QCA_LOWMEM_CONFIG) || defined(QCA_512M_CONFIG)
|
||||
#define WMI_CE_BUF_SIZE 2048
|
||||
#else
|
||||
/**
|
||||
/*
|
||||
* WMI_CE_BUF_SIZE = (SKB_SIZE - 64BIT_SH_INFO -
|
||||
* NETBUF_FIXED_MIN_HEADROOM - WMI_HEADROOM)
|
||||
* 3520 = (4096 - 384 - 128 - 64)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -289,7 +290,7 @@ qdf_export_symbol(hif_exchange_bmi_msg);
|
||||
|
||||
/**
|
||||
* hif_register_bmi_callbacks() - register bmi callbacks
|
||||
* @hif_sc: hif context
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Bmi phase uses different copy complete callbacks than mission mode.
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -383,6 +383,8 @@ struct ce_srng_dest_status_desc {
|
||||
|
||||
/**
|
||||
* union ce_desc - unified data type for ce descriptors
|
||||
* @src_desc: source descriptor
|
||||
* @dest_desc: destination descriptor
|
||||
*
|
||||
* Both src and destination descriptors follow the same format.
|
||||
* They use different data structures for different access semantics.
|
||||
@@ -424,6 +426,7 @@ union ce_srng_desc {
|
||||
* the write index in fastpath
|
||||
* @FAST_TX_SOFTWARE_INDEX_UPDATE: event recorded before updating the software
|
||||
* index of the RX ring in fastpath
|
||||
* @RESUME_WRITE_INDEX_UPDATE:
|
||||
* @HIF_IRQ_EVENT: event recorded in the irq before scheduling the bh
|
||||
* @HIF_CE_TASKLET_ENTRY: records the start of the ce_tasklet
|
||||
* @HIF_CE_TASKLET_RESCHEDULE: records the rescheduling of the wlan_tasklet
|
||||
@@ -444,6 +447,7 @@ union ce_srng_desc {
|
||||
* @HIF_RX_DESC_PRE_NBUF_ALLOC: record the packet before nbuf allocation
|
||||
* @HIF_RX_DESC_PRE_NBUF_MAP: record the packet before nbuf map
|
||||
* @HIF_RX_DESC_POST_NBUF_MAP: record the packet after nbuf map
|
||||
* @HIF_EVENT_TYPE_MAX: max event
|
||||
*/
|
||||
enum hif_ce_event_type {
|
||||
HIF_RX_DESC_POST,
|
||||
@@ -582,6 +586,7 @@ int hif_get_fw_diag_ce_id(struct hif_softc *scn, uint8_t *ce_id);
|
||||
* @index: location of the descriptor in the ce ring;
|
||||
* @type: what the event was
|
||||
* @time: when it happened
|
||||
* @cpu_id:
|
||||
* @current_hp: holds the current ring hp value
|
||||
* @current_tp: holds the current ring tp value
|
||||
* @descriptor: descriptor enqueued or dequeued
|
||||
@@ -715,7 +720,7 @@ void hif_ce_desc_data_record(struct hif_ce_desc_event *event, int len)
|
||||
* ce_validate_nbytes() - validate nbytes for slub builds on tx descriptors
|
||||
* @nbytes: nbytes value being written into a send descriptor
|
||||
* @ce_state: context of the copy engine
|
||||
|
||||
*
|
||||
* nbytes should be non-zero and less than max configured for the copy engine
|
||||
*
|
||||
* Return: none
|
||||
@@ -738,6 +743,7 @@ static inline void ce_validate_nbytes(uint32_t nbytes,
|
||||
* hif_ce_desc_record_rx_paddr() - record physical address for IOMMU
|
||||
* IOVA addr and MMU virtual addr for Rx
|
||||
* @scn: hif_softc
|
||||
* @event: event details
|
||||
* @nbuf: buffer posted to fw
|
||||
*
|
||||
* record physical address for ce_event_type HIF_RX_DESC_POST and
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -1368,6 +1368,8 @@ void hif_select_ce_map_qcn9224(struct service_to_pipe **tgt_svc_map_to_use,
|
||||
* hif_select_service_to_pipe_map_kiwi() - Select service to CE map
|
||||
* configuration for Kiwi
|
||||
* @scn: HIF context
|
||||
* @tgt_svc_map_to_use: returned service map
|
||||
* @sz_tgt_svc_map_to_use: returned length of the service map
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
@@ -1607,7 +1609,7 @@ static void ce_ring_test_initial_indexes(int ce_id, struct CE_ring_state *ring,
|
||||
/**
|
||||
* ce_alloc_desc_ring() - Allocate copyengine descriptor ring
|
||||
* @scn: softc instance
|
||||
* @ce_id: ce in question
|
||||
* @CE_id: ce in question
|
||||
* @base_addr: pointer to copyengine ring base address
|
||||
* @ce_ring: copyengine instance
|
||||
* @nentries: number of entries should be allocated
|
||||
@@ -1658,7 +1660,7 @@ static QDF_STATUS ce_alloc_desc_ring(struct hif_softc *scn, unsigned int CE_id,
|
||||
/**
|
||||
* ce_free_desc_ring() - Frees copyengine descriptor ring
|
||||
* @scn: softc instance
|
||||
* @ce_id: ce in question
|
||||
* @CE_id: ce in question
|
||||
* @ce_ring: copyengine instance
|
||||
* @desc_size: ce desc size
|
||||
*
|
||||
@@ -1738,7 +1740,7 @@ qdf_export_symbol(ce_service_register_module);
|
||||
|
||||
/**
|
||||
* ce_srng_based() - Does this target use srng
|
||||
* @ce_state : pointer to the state context of the CE
|
||||
* @scn: pointer to the state context of the CE
|
||||
*
|
||||
* Description:
|
||||
* returns true if the target is SRNG based
|
||||
@@ -2041,7 +2043,7 @@ static void ce_oom_recovery(void *context)
|
||||
* the CE descriptors.
|
||||
* Allocate HIF_CE_HISTORY_MAX records by CE_DEBUG_MAX_DATA_BUF_SIZE
|
||||
* @scn: hif scn handle
|
||||
* ce_id: Copy Engine Id
|
||||
* @ce_id: Copy Engine Id
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
@@ -2075,7 +2077,7 @@ QDF_STATUS alloc_mem_ce_debug_hist_data(struct hif_softc *scn, uint32_t ce_id)
|
||||
* free_mem_ce_debug_hist_data() - Free mem of the data pointed by
|
||||
* the CE descriptors.
|
||||
* @scn: hif scn handle
|
||||
* ce_id: Copy Engine Id
|
||||
* @ce_id: Copy Engine Id
|
||||
*
|
||||
* Return:
|
||||
*/
|
||||
@@ -2109,7 +2111,7 @@ void free_mem_ce_debug_hist_data(struct hif_softc *scn, uint32_t ce_id)
|
||||
struct hif_ce_desc_event *hif_ce_desc_history[CE_COUNT_MAX];
|
||||
uint32_t hif_ce_history_max = HIF_CE_HISTORY_MAX;
|
||||
|
||||
/**
|
||||
/*
|
||||
* for debug build, it will enable ce history for all ce, but for
|
||||
* perf build(if CONFIG_SLUB_DEBUG_ON is N), it only enable for
|
||||
* ce2(wmi event) & ce3(wmi cmd) history.
|
||||
@@ -2569,7 +2571,7 @@ static int hif_get_pktlog_ce_num(struct hif_softc *scn)
|
||||
|
||||
#ifdef WLAN_FEATURE_FASTPATH
|
||||
/**
|
||||
* hif_enable_fastpath() Update that we have enabled fastpath mode
|
||||
* hif_enable_fastpath() - Update that we have enabled fastpath mode
|
||||
* @hif_ctx: HIF context
|
||||
*
|
||||
* For use in data path
|
||||
@@ -2621,7 +2623,7 @@ void *hif_get_ce_handle(struct hif_opaque_softc *hif_ctx, int id)
|
||||
qdf_export_symbol(hif_get_ce_handle);
|
||||
|
||||
/**
|
||||
* ce_h2t_tx_ce_cleanup() Place holder function for H2T CE cleanup.
|
||||
* ce_h2t_tx_ce_cleanup() - Place holder function for H2T CE cleanup.
|
||||
* No processing is required inside this function.
|
||||
* @ce_hdl: Cope engine handle
|
||||
* Using an assert, this function makes sure that,
|
||||
@@ -3035,7 +3037,7 @@ hif_pci_ce_send_done(struct CE_handle *copyeng, void *ce_context,
|
||||
/**
|
||||
* hif_ce_do_recv(): send message from copy engine to upper layers
|
||||
* @msg_callbacks: structure containing callback and callback context
|
||||
* @netbuff: skb containing message
|
||||
* @netbuf: skb containing message
|
||||
* @nbytes: number of bytes in the message
|
||||
* @pipe_info: used for the pipe_number info
|
||||
*
|
||||
@@ -3677,6 +3679,7 @@ static void hif_get_shadow_reg_cfg(struct hif_softc *scn,
|
||||
|
||||
/**
|
||||
* hif_get_target_ce_config() - get copy engine configuration
|
||||
* @scn: HIF context
|
||||
* @target_ce_config_ret: basic copy engine configuration
|
||||
* @target_ce_config_sz_ret: size of the basic configuration in bytes
|
||||
* @target_service_to_ce_map_ret: service mapping for the copy engines
|
||||
@@ -4645,7 +4648,7 @@ err:
|
||||
|
||||
/**
|
||||
* hif_config_ce_pktlog() - configure copy engines
|
||||
* @scn: hif context
|
||||
* @hif_hdl: hif context
|
||||
*
|
||||
* Prepares fw, copy engine hardware and host sw according
|
||||
* to the attributes selected by hif_ce_prepare_config.
|
||||
@@ -4710,7 +4713,7 @@ err:
|
||||
/**
|
||||
* hif_ce_ipa_get_ce_resource() - get uc resource on hif
|
||||
* @scn: bus context
|
||||
* @ce_sr_base_paddr: copyengine source ring base physical address
|
||||
* @ce_sr: copyengine source ring base physical address
|
||||
* @ce_sr_ring_size: copyengine source ring size
|
||||
* @ce_reg_paddr: copyengine register physical address
|
||||
*
|
||||
@@ -4957,7 +4960,7 @@ void *hif_ce_get_lro_ctx(struct hif_opaque_softc *hif_hdl, int ctx_id)
|
||||
/**
|
||||
* hif_map_service_to_pipe() - returns the ce ids pertaining to
|
||||
* this service
|
||||
* @scn: hif_softc pointer.
|
||||
* @hif_hdl: hif_softc pointer.
|
||||
* @svc_id: Service ID for which the mapping is needed.
|
||||
* @ul_pipe: address of the container in which ul pipe is returned.
|
||||
* @dl_pipe: address of the container in which dl pipe is returned.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -51,10 +51,8 @@
|
||||
#define CE_ALL_BITMAP 0xFFFF
|
||||
|
||||
#define HIF_REQUESTED_EVENTS 20
|
||||
/**
|
||||
* enum ce_id_type
|
||||
*
|
||||
* @ce_id_type: Copy engine ID
|
||||
/*
|
||||
* enum ce_id_type - Copy engine ID
|
||||
*/
|
||||
enum ce_id_type {
|
||||
CE_ID_0,
|
||||
@@ -78,10 +76,9 @@ enum ce_id_type {
|
||||
CE_ID_MAX
|
||||
};
|
||||
|
||||
#ifdef CE_TASKLET_DEBUG_ENABLE
|
||||
/**
|
||||
* enum ce_buckets
|
||||
*
|
||||
* @ce_buckets: CE tasklet time buckets
|
||||
* enum ce_buckets - CE tasklet time buckets
|
||||
* @CE_BUCKET_500_US: tasklet bucket to store 0-0.5ms
|
||||
* @CE_BUCKET_1_MS: tasklet bucket to store 0.5-1ms
|
||||
* @CE_BUCKET_2_MS: tasklet bucket to store 1-2ms
|
||||
@@ -90,7 +87,6 @@ enum ce_id_type {
|
||||
* @CE_BUCKET_BEYOND: tasklet bucket to store > 10ms
|
||||
* @CE_BUCKET_MAX: enum max value
|
||||
*/
|
||||
#ifdef CE_TASKLET_DEBUG_ENABLE
|
||||
enum ce_buckets {
|
||||
CE_BUCKET_500_US,
|
||||
CE_BUCKET_1_MS,
|
||||
@@ -147,8 +143,8 @@ struct HIF_CE_pipe_info {
|
||||
* @intr_tq: intr_tq
|
||||
* @ce_id: ce_id
|
||||
* @inited: inited
|
||||
* @hi_tasklet_ce:
|
||||
* @hif_ce_state: hif_ce_state
|
||||
* @from_irq: from_irq
|
||||
*/
|
||||
struct ce_tasklet_entry {
|
||||
struct tasklet_struct intr_tq;
|
||||
@@ -180,6 +176,9 @@ extern struct hif_execution_ops napi_sched_ops;
|
||||
* @ce_tasklet_sched_bucket: Tasklet time in queue buckets
|
||||
* @ce_tasklet_exec_last_update: Latest timestamp when bucket is updated
|
||||
* @ce_tasklet_sched_last_update: Latest timestamp when bucket is updated
|
||||
* @ce_ring_full_count:
|
||||
* @ce_manual_tasklet_schedule_count:
|
||||
* @ce_last_manual_tasklet_schedule_ts:
|
||||
*/
|
||||
struct ce_stats {
|
||||
uint32_t ce_per_cpu[CE_COUNT_MAX][QDF_MAX_AVAILABLE_CPU];
|
||||
@@ -284,6 +283,7 @@ struct ce_info {
|
||||
* struct ce_index
|
||||
*
|
||||
* @id: CE id
|
||||
* @u: union of legacy_info and srng_info
|
||||
* @sw_index: sw index
|
||||
* @write_index: write index
|
||||
* @hp: ring head pointer
|
||||
@@ -313,6 +313,7 @@ struct ce_index {
|
||||
* @tlv_header: tlv header
|
||||
* @active_tasklet_count: active tasklet count
|
||||
* @active_grp_tasklet_cnt: active grp tasklet count
|
||||
* @ce_count:
|
||||
* @ce_info: CE info
|
||||
*/
|
||||
struct hang_event_info {
|
||||
|
@@ -319,7 +319,7 @@ unsigned int hif_get_dst_ring_read_index(struct hif_softc *scn,
|
||||
#define CE_DEST_RING_READ_IDX_GET(scn, CE_ctrl_addr)\
|
||||
CE_DEST_RING_READ_IDX_GET_FROM_REGISTER(scn, CE_ctrl_addr)
|
||||
|
||||
/**
|
||||
/*
|
||||
* if RRI on DDR is not enabled, get idx from ddr defaults to
|
||||
* using the register value & force wake must be used for
|
||||
* non interrupt processing.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -238,6 +238,7 @@ void hif_record_latest_evt(struct ce_desc_hist *ce_hist,
|
||||
* @descriptor: pointer to the descriptor posted/completed
|
||||
* @memory: virtual address of buffer related to the descriptor
|
||||
* @index: index that the descriptor was/will be at.
|
||||
* @len:
|
||||
*/
|
||||
void hif_record_ce_desc_event(struct hif_softc *scn, int ce_id,
|
||||
enum hif_ce_event_type type,
|
||||
@@ -296,6 +297,7 @@ qdf_export_symbol(hif_record_ce_desc_event);
|
||||
|
||||
/**
|
||||
* ce_init_ce_desc_event_log() - initialize the ce event log
|
||||
* @scn: HIF context
|
||||
* @ce_id: copy engine id for which we are initializing the log
|
||||
* @size: size of array to dedicate
|
||||
*
|
||||
@@ -310,6 +312,7 @@ void ce_init_ce_desc_event_log(struct hif_softc *scn, int ce_id, int size)
|
||||
|
||||
/**
|
||||
* ce_deinit_ce_desc_event_log() - deinitialize the ce event log
|
||||
* @scn: HIF context
|
||||
* @ce_id: copy engine id for which we are deinitializing the log
|
||||
*
|
||||
*/
|
||||
@@ -733,7 +736,7 @@ QDF_STATUS ce_send_single(struct CE_handle *ce_tx_hdl, qdf_nbuf_t msdu,
|
||||
|
||||
/**
|
||||
* ce_recv_buf_enqueue() - enqueue a recv buffer into a copy engine
|
||||
* @coyeng: copy engine handle
|
||||
* @copyeng: copy engine handle
|
||||
* @per_recv_context: virtual address of the nbuf
|
||||
* @buffer: physical address of the nbuf
|
||||
*
|
||||
@@ -1377,6 +1380,7 @@ void ce_enable_any_copy_compl_intr_nolock(struct hif_softc *scn)
|
||||
* ce_send_cb_register(): register completion handler
|
||||
* @copyeng: CE_state representing the ce we are adding the behavior to
|
||||
* @fn_ptr: callback that the ce should use when processing tx completions
|
||||
* @ce_send_context: context to pass back in the callback
|
||||
* @disable_interrupts: if the interrupts should be enabled or not.
|
||||
*
|
||||
* Caller should guarantee that no transactions are in progress before
|
||||
@@ -1417,6 +1421,7 @@ qdf_export_symbol(ce_send_cb_register);
|
||||
* ce_recv_cb_register(): register completion handler
|
||||
* @copyeng: CE_state representing the ce we are adding the behavior to
|
||||
* @fn_ptr: callback that the ce should use when processing rx completions
|
||||
* @CE_recv_context: context to pass back in the callback
|
||||
* @disable_interrupts: if the interrupts should be enabled or not.
|
||||
*
|
||||
* Registers the send context before the fn pointer so that if the cb is valid
|
||||
@@ -1455,6 +1460,7 @@ qdf_export_symbol(ce_recv_cb_register);
|
||||
* ce_watermark_cb_register(): register completion handler
|
||||
* @copyeng: CE_state representing the ce we are adding the behavior to
|
||||
* @fn_ptr: callback that the ce should use when processing watermark events
|
||||
* @CE_wm_context: context to pass back in the callback
|
||||
*
|
||||
* Caller should guarantee that no watermark events are being processed before
|
||||
* switching the callback function.
|
||||
@@ -1692,9 +1698,8 @@ static const char *ce_event_type_to_str(enum hif_ce_event_type type)
|
||||
|
||||
/**
|
||||
* hif_dump_desc_event() - record ce descriptor events
|
||||
* @scn: HIF context
|
||||
* @buf: Buffer to which to be copied
|
||||
* @ce_id: which ce is the event occurring on
|
||||
* @index: index that the descriptor was/will be at.
|
||||
*/
|
||||
ssize_t hif_dump_desc_event(struct hif_softc *scn, char *buf)
|
||||
{
|
||||
@@ -2061,7 +2066,14 @@ static uint8_t *hif_log_dest_ce_dump(struct CE_ring_state *dest_ring,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_log_ce_dump() - Copy all the CE DEST ring to buf
|
||||
* hif_log_dump_ce() - Copy all the CE DEST ring to buf
|
||||
* @scn:
|
||||
* @buf_cur:
|
||||
* @buf_init:
|
||||
* @buf_sz:
|
||||
* @ce:
|
||||
* @skb_sz:
|
||||
*
|
||||
* Calls the respective function to dump all the CE SRC/DEST ring descriptors
|
||||
* and buffers pointed by them in to the given buf
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -99,7 +99,7 @@ ce_buffer_addr_hi_set(struct CE_src_desc *shadow_src_desc,
|
||||
#define SLOTS_PER_DATAPATH_TX 2
|
||||
|
||||
/**
|
||||
* ce_send_fast() CE layer Tx buffer posting function
|
||||
* ce_send_fast() - CE layer Tx buffer posting function
|
||||
* @copyeng: copy engine handle
|
||||
* @msdu: msdu to be sent
|
||||
* @transfer_id: transfer_id
|
||||
@@ -699,7 +699,7 @@ ce_sendlist_send_legacy(struct CE_handle *copyeng,
|
||||
|
||||
/**
|
||||
* ce_recv_buf_enqueue_legacy() - enqueue a recv buffer into a copy engine
|
||||
* @coyeng: copy engine handle
|
||||
* @copyeng: copy engine handle
|
||||
* @per_recv_context: virtual address of the nbuf
|
||||
* @buffer: physical address of the nbuf
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -1102,8 +1102,9 @@ int ce_get_index_info_srng(struct hif_softc *scn, void *ce_state,
|
||||
* ce_set_srng_msi_irq_config_by_ceid(): Set srng MSI irq configuration for CE
|
||||
* given by id
|
||||
* @scn: HIF Context
|
||||
* @ce_state: CE opaque handle
|
||||
* @info: CE info
|
||||
* @ce_id:
|
||||
* @addr:
|
||||
* @data:
|
||||
*
|
||||
* Return: 0 for success and non zero for failure
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -40,7 +40,8 @@
|
||||
* struct tasklet_work
|
||||
*
|
||||
* @id: ce_id
|
||||
* @work: work
|
||||
* @data: data
|
||||
* @reg_work: work
|
||||
*/
|
||||
struct tasklet_work {
|
||||
enum ce_id_type id;
|
||||
@@ -109,8 +110,9 @@ static void init_tasklet_work(struct work_struct *work,
|
||||
}
|
||||
|
||||
/**
|
||||
* init_tasklet_workers() - init_tasklet_workers
|
||||
* init_tasklet_worker_by_ceid() - init_tasklet_workers
|
||||
* @scn: HIF Context
|
||||
* @ce_id: copy engine ID
|
||||
*
|
||||
* Return: N/A
|
||||
*/
|
||||
@@ -236,10 +238,8 @@ hif_ce_latency_stats(struct hif_softc *hif_ctx)
|
||||
/**
|
||||
* ce_tasklet_update_bucket() - update ce execution and scehduled time latency
|
||||
* in corresponding time buckets
|
||||
* @stats: struct ce_stats
|
||||
* @hif_ce_state: HIF CE state
|
||||
* @ce_id: ce_id_type
|
||||
* @entry_us: timestamp when tasklet is started to execute
|
||||
* @exit_us: timestamp when tasklet is completed execution
|
||||
*
|
||||
* Return: N/A
|
||||
*/
|
||||
@@ -506,7 +506,7 @@ void ce_tasklet_init(struct HIF_CE_state *hif_ce_state, uint32_t mask)
|
||||
}
|
||||
/**
|
||||
* ce_tasklet_kill() - ce_tasklet_kill
|
||||
* @hif_ce_state: hif_ce_state
|
||||
* @scn: HIF context
|
||||
*
|
||||
* Context: Non-Atomic context
|
||||
* Return: N/A
|
||||
@@ -656,7 +656,7 @@ hif_ce_increment_interrupt_count(struct HIF_CE_state *hif_ce_state, int ce_id)
|
||||
|
||||
/**
|
||||
* hif_display_ce_stats() - display ce stats
|
||||
* @hif_ce_state: ce state
|
||||
* @hif_ctx: HIF context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -933,11 +933,6 @@ irqreturn_t ce_dispatch_interrupt(int ce_id,
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* const char *ce_name
|
||||
*
|
||||
* @ce_name: ce_name
|
||||
*/
|
||||
const char *ce_name[CE_COUNT_MAX] = {
|
||||
"WLAN_CE_0",
|
||||
"WLAN_CE_1",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* hif_dummy_bus_prevent_linkdown() - prevent linkdown
|
||||
* @hif_ctx: hif context
|
||||
* @scn: hif context
|
||||
* @flag: weather to keep the bus alive or not
|
||||
*
|
||||
* Dummy function for busses and platforms that do not support
|
||||
@@ -36,12 +36,11 @@ void hif_dummy_bus_prevent_linkdown(struct hif_softc *scn, bool flag)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_reset_soc(): reset soc
|
||||
* hif_dummy_reset_soc(): reset soc
|
||||
* @hif_ctx: HIF context
|
||||
*
|
||||
* this function resets soc
|
||||
*
|
||||
* @hif_ctx: HIF context
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
/* Function to reset SoC */
|
||||
@@ -50,7 +49,7 @@ void hif_dummy_reset_soc(struct hif_softc *hif_ctx)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_suspend() - suspend the bus
|
||||
* hif_dummy_bus_suspend() - suspend the bus
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* dummy for busses that don't need to suspend.
|
||||
@@ -63,7 +62,8 @@ int hif_dummy_bus_suspend(struct hif_softc *hif_ctx)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_resume() - hif resume API
|
||||
* hif_dummy_bus_resume() - hif resume API
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* This function resumes the bus. but snoc doesn't need to resume.
|
||||
* Therefore do nothing.
|
||||
@@ -76,7 +76,7 @@ int hif_dummy_bus_resume(struct hif_softc *hif_ctx)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_suspend_noirq() - suspend the bus
|
||||
* hif_dummy_bus_suspend_noirq() - suspend the bus
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* dummy for busses that don't need to synchronize
|
||||
@@ -90,7 +90,7 @@ int hif_dummy_bus_suspend_noirq(struct hif_softc *hif_ctx)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_resume_noirq() - resume the bus
|
||||
* hif_dummy_bus_resume_noirq() - resume the bus
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* dummy for busses that don't need to synchronize
|
||||
@@ -116,17 +116,17 @@ int hif_dummy_target_sleep_state_adjust(struct hif_softc *scn,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_enable_power_management - dummy call
|
||||
* hif_ctx: hif context
|
||||
* is_packet_log_enabled: true if packet log is enabled
|
||||
* hif_dummy_enable_power_management() - dummy call
|
||||
* @hif_ctx: hif context
|
||||
* @is_packet_log_enabled: true if packet log is enabled
|
||||
*/
|
||||
void hif_dummy_enable_power_management(struct hif_softc *hif_ctx,
|
||||
bool is_packet_log_enabled)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_disable_power_management - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_disable_power_management() - dummy call
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -134,8 +134,8 @@ void hif_dummy_disable_power_management(struct hif_softc *hif_ctx)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_disable_isr - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_disable_isr() - dummy call
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -143,8 +143,8 @@ void hif_dummy_disable_isr(struct hif_softc *scn)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_nointrs - dummy call
|
||||
* hif_sc: hif context
|
||||
* hif_dummy_nointrs() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -152,8 +152,8 @@ void hif_dummy_nointrs(struct hif_softc *hif_sc)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_bus_configure - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_bus_configure() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: 0 for success
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ int hif_dummy_bus_configure(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_get_config_item - dummy call
|
||||
* hif_dummy_get_config_item() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @opcode: configuration type
|
||||
* @config: configuration value to set
|
||||
@@ -179,7 +179,7 @@ hif_dummy_get_config_item(struct hif_softc *hif_sc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_set_mailbox_swap - dummy call
|
||||
* hif_dummy_set_mailbox_swap() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: None
|
||||
@@ -190,7 +190,7 @@ hif_dummy_set_mailbox_swap(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_claim_device - dummy call
|
||||
* hif_dummy_claim_device() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: None
|
||||
@@ -201,7 +201,7 @@ hif_dummy_claim_device(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_cancel_deferred_target_sleep - dummy call
|
||||
* hif_dummy_cancel_deferred_target_sleep() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: None
|
||||
@@ -212,8 +212,8 @@ hif_dummy_cancel_deferred_target_sleep(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_irq_enable - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_irq_enable() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @irq_id: irq id
|
||||
*
|
||||
* Return: none
|
||||
@@ -222,9 +222,9 @@ void hif_dummy_irq_enable(struct hif_softc *hif_sc, int irq_id)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_grp_irq_enable - dummy call
|
||||
* hif_ctx: hif context
|
||||
* @irq_id: grp id
|
||||
* hif_dummy_grp_irq_enable() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @grp_id: grp id
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -232,8 +232,8 @@ void hif_dummy_grp_irq_enable(struct hif_softc *hif_sc, uint32_t grp_id)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_irq_disable - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_irq_disable() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @irq_id: irq id
|
||||
*
|
||||
* Return: none
|
||||
@@ -242,8 +242,8 @@ void hif_dummy_irq_disable(struct hif_softc *hif_sc, int irq_id)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_grp_irq_disable- dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_grp_irq_disable() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @grp_id: grp id
|
||||
*
|
||||
* Return: none
|
||||
@@ -252,8 +252,9 @@ void hif_dummy_grp_irq_disable(struct hif_softc *hif_sc, uint32_t grp_id)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_grp_irq_configure - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_grp_irq_configure() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @exec:
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -264,8 +265,8 @@ int hif_dummy_grp_irq_configure(struct hif_softc *hif_sc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_grp_irq_deconfigure - dummy call
|
||||
* hif_sc: hif context
|
||||
* hif_dummy_grp_irq_deconfigure() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -274,8 +275,8 @@ void hif_dummy_grp_irq_deconfigure(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_dump_registers - dummy call
|
||||
* hif_sc: hif context
|
||||
* hif_dummy_dump_registers() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: 0 for success
|
||||
*/
|
||||
@@ -285,7 +286,7 @@ int hif_dummy_dump_registers(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_dump_target_memory - dummy call
|
||||
* hif_dummy_dump_target_memory() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @ramdump_base: base
|
||||
* @address: address
|
||||
@@ -311,8 +312,8 @@ void hif_dummy_bus_reg_write32(struct hif_softc *hif_sc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_ipa_get_ce_resource - dummy call
|
||||
* @scn: HIF context
|
||||
* hif_dummy_ipa_get_ce_resource() - dummy call
|
||||
* @hif_sc: HIF context
|
||||
* @ce_sr: copyengine source ring resource info
|
||||
* @sr_ring_size: source ring size
|
||||
* @reg_paddr: bus physical address
|
||||
@@ -327,7 +328,7 @@ void hif_dummy_ipa_get_ce_resource(struct hif_softc *hif_sc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_mask_interrupt_call - dummy call
|
||||
* hif_dummy_mask_interrupt_call() - dummy call
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: None
|
||||
@@ -338,8 +339,8 @@ hif_dummy_mask_interrupt_call(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_display_stats - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_display_stats() - dummy call
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -347,16 +348,18 @@ void hif_dummy_display_stats(struct hif_softc *hif_ctx)
|
||||
{}
|
||||
|
||||
/**
|
||||
* hif_dummy_clear_stats - dummy call
|
||||
* hif_ctx: hif context
|
||||
* hif_dummy_clear_stats() - dummy call
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hif_dummy_clear_stats(struct hif_softc *hif_ctx)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_set_bundle_mode() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @hif_ctx: hif context
|
||||
* @enabled: flag to enable/disable bundling
|
||||
* @rx_bundle_cnt: bundle count to be used for RX
|
||||
*
|
||||
@@ -369,7 +372,7 @@ void hif_dummy_set_bundle_mode(struct hif_softc *hif_ctx,
|
||||
|
||||
/**
|
||||
* hif_dummy_bus_reset_resume() - dummy call
|
||||
* @hif_sc: hif context
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: int 0 for success, non zero for failure
|
||||
*/
|
||||
@@ -391,7 +394,7 @@ int hif_dummy_addr_in_boundary(struct hif_softc *scn, uint32_t offset)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_config_irq_affinity - dummy call
|
||||
* hif_dummy_config_irq_affinity() - dummy call
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: None
|
||||
@@ -401,9 +404,10 @@ void hif_dummy_config_irq_affinity(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_config_irq_by_ceid - dummy call
|
||||
* hif_dummy_config_irq_by_ceid() - dummy call
|
||||
* @scn: hif context
|
||||
* @ce_id : copy engine id
|
||||
*
|
||||
* Return: 0
|
||||
*/
|
||||
int hif_dummy_config_irq_by_ceid(struct hif_softc *scn, int ce_id)
|
||||
@@ -412,7 +416,7 @@ int hif_dummy_config_irq_by_ceid(struct hif_softc *scn, int ce_id)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_config_irq_clear_affinity() - dummy call
|
||||
* hif_dummy_config_irq_clear_cpu_affinity() - dummy call
|
||||
* @scn: HIF handle
|
||||
* @intr_ctxt_id: interrupt group index
|
||||
* @cpu: CPU core to clear
|
||||
@@ -425,7 +429,7 @@ void hif_dummy_config_irq_clear_cpu_affinity(struct hif_softc *scn,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_log_bus_info - dummy call
|
||||
* hif_dummy_log_bus_info() - dummy call
|
||||
* @scn: hif context
|
||||
* @data: hang event data buffer
|
||||
* @offset: offset at which data needs to be written
|
||||
@@ -439,8 +443,9 @@ bool hif_dummy_log_bus_info(struct hif_softc *scn, uint8_t *data,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_enable_grp_irqs - dummy call
|
||||
* hif_dummy_enable_grp_irqs() - dummy call
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: EOPNOTSUPP
|
||||
*/
|
||||
int hif_dummy_enable_grp_irqs(struct hif_softc *scn)
|
||||
@@ -449,8 +454,9 @@ int hif_dummy_enable_grp_irqs(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dummy_disable_grp_irqs - dummy call
|
||||
* hif_dummy_disable_grp_irqs() - dummy call
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: EOPNOTSUPP
|
||||
*/
|
||||
int hif_dummy_disable_grp_irqs(struct hif_softc *scn)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -20,7 +20,7 @@
|
||||
struct hif_exec_context;
|
||||
|
||||
/**
|
||||
* hif_ipci_open(): hif_bus_open
|
||||
* hif_ipci_open() - hif_bus_open
|
||||
* @hif_ctx: hif context
|
||||
* @bus_type: bus type
|
||||
*
|
||||
@@ -30,7 +30,7 @@ QDF_STATUS hif_ipci_open(struct hif_softc *hif_ctx,
|
||||
enum qdf_bus_type bus_type);
|
||||
|
||||
/**
|
||||
* hif_ipci_close(): hif_bus_close
|
||||
* hif_ipci_close() - hif_bus_close
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: n/a
|
||||
@@ -38,7 +38,7 @@ QDF_STATUS hif_ipci_open(struct hif_softc *hif_ctx,
|
||||
void hif_ipci_close(struct hif_softc *hif_ctx);
|
||||
|
||||
/**
|
||||
* hif_bus_prevent_linkdown(): allow or permit linkdown
|
||||
* hif_ipci_prevent_linkdown() - allow or permit linkdown
|
||||
* @scn: struct hif_softc
|
||||
* @flag: true prevents linkdown, false allows
|
||||
*
|
||||
@@ -50,7 +50,7 @@ void hif_ipci_close(struct hif_softc *hif_ctx);
|
||||
void hif_ipci_prevent_linkdown(struct hif_softc *scn, bool flag);
|
||||
|
||||
/**
|
||||
* hif_ipci_bus_suspend(): prepare hif for suspend
|
||||
* hif_ipci_bus_suspend() - prepare hif for suspend
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* Return: Errno
|
||||
@@ -69,7 +69,7 @@ int hif_ipci_bus_suspend(struct hif_softc *scn);
|
||||
int hif_ipci_bus_suspend_noirq(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_ipci_bus_resume(): prepare hif for resume
|
||||
* hif_ipci_bus_resume() - prepare hif for resume
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* Return: Errno
|
||||
@@ -88,7 +88,7 @@ int hif_ipci_bus_resume(struct hif_softc *scn);
|
||||
int hif_ipci_bus_resume_noirq(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_ipci_disable_isr(): disable interrupt
|
||||
* hif_ipci_disable_isr() - disable interrupt
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* Return: n/a
|
||||
@@ -96,7 +96,7 @@ int hif_ipci_bus_resume_noirq(struct hif_softc *scn);
|
||||
void hif_ipci_disable_isr(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_ipci_nointrs(): disable IRQ
|
||||
* hif_ipci_nointrs() - disable IRQ
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function stops interrupt(s)
|
||||
@@ -106,7 +106,7 @@ void hif_ipci_disable_isr(struct hif_softc *scn);
|
||||
void hif_ipci_nointrs(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_ipci_dump_registers(): dump bus debug registers
|
||||
* hif_ipci_dump_registers() - dump bus debug registers
|
||||
* @scn: struct hif_opaque_softc
|
||||
*
|
||||
* This function dumps hif bus debug registers
|
||||
@@ -116,15 +116,15 @@ void hif_ipci_nointrs(struct hif_softc *scn);
|
||||
int hif_ipci_dump_registers(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_ipci_enable_bus(): enable bus
|
||||
* hif_ipci_enable_bus() - enable bus
|
||||
* @scn: soft_sc struct
|
||||
* @dev: device pointer
|
||||
* @bdev: bus dev pointer
|
||||
* @bid: bus id pointer
|
||||
* @type: enum hif_enable_type such as HIF_ENABLE_TYPE_PROBE
|
||||
*
|
||||
* This function enables the bus
|
||||
*
|
||||
* @ol_sc: soft_sc struct
|
||||
* @dev: device pointer
|
||||
* @bdev: bus dev pointer
|
||||
* bid: bus id pointer
|
||||
* type: enum hif_enable_type such as HIF_ENABLE_TYPE_PROBE
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_ipci_enable_bus(
|
||||
@@ -134,19 +134,18 @@ QDF_STATUS hif_ipci_enable_bus(
|
||||
enum hif_enable_type type);
|
||||
|
||||
/**
|
||||
* hif_ipci_disable_bus(): hif_disable_bus
|
||||
* hif_ipci_disable_bus() - hif_disable_bus
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function disables the bus
|
||||
*
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hif_ipci_disable_bus(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_ipci_bus_configure() - configure the pcie bus
|
||||
* @hif_sc: pointer to the hif context.
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
*/
|
||||
@@ -226,7 +225,7 @@ bool hif_ipci_needs_bmi(struct hif_softc *scn);
|
||||
const char *hif_ipci_get_irq_name(int irq_no);
|
||||
|
||||
/**
|
||||
* hif_ipci_enable_grp_irqs(): enable grp IRQs
|
||||
* hif_ipci_enable_grp_irqs() - enable grp IRQs
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function enables grp irqs
|
||||
@@ -236,13 +235,14 @@ const char *hif_ipci_get_irq_name(int irq_no);
|
||||
int hif_ipci_enable_grp_irqs(struct hif_softc *scn);
|
||||
|
||||
#ifdef HIF_CPU_PERF_AFFINE_MASK
|
||||
/** hif_ipci_config_irq_affinity() - set the irq affinity
|
||||
/**
|
||||
* hif_ipci_config_irq_affinity() - set the irq affinity
|
||||
* @scn: hif context
|
||||
*
|
||||
* set irq affinity hint for wlan irqs to gold cores only for
|
||||
* defconfig builds.
|
||||
*
|
||||
* return: none
|
||||
* Return: none
|
||||
*/
|
||||
void hif_ipci_config_irq_affinity(struct hif_softc *scn);
|
||||
#endif
|
||||
@@ -267,7 +267,7 @@ void hif_ipci_config_irq_clear_cpu_affinity(struct hif_softc *scn,
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hif_ipci_disable_grp_irqs(): disable grp IRQs
|
||||
* hif_ipci_disable_grp_irqs() - disable grp IRQs
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function disables grp irqs
|
||||
@@ -277,7 +277,7 @@ void hif_ipci_config_irq_clear_cpu_affinity(struct hif_softc *scn,
|
||||
int hif_ipci_disable_grp_irqs(struct hif_softc *scn);
|
||||
|
||||
#ifdef FEATURE_IRQ_AFFINITY
|
||||
/*
|
||||
/**
|
||||
* hif_ipci_set_grp_intr_affinity() - Set irq affinity hint for grp
|
||||
* intrs based on bitmask
|
||||
* @scn: hif context
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
/**
|
||||
* hif_initialize_default_ops() - initializes default operations values
|
||||
* @hif_sc: hif_context
|
||||
*
|
||||
* bus specific features should assign their dummy implementations here.
|
||||
*/
|
||||
@@ -76,9 +77,10 @@ static void hif_initialize_default_ops(struct hif_softc *hif_sc)
|
||||
|
||||
/**
|
||||
* hif_verify_basic_ops() - ensure required bus apis are defined
|
||||
* @hif_sc: hif_context
|
||||
*
|
||||
* all bus operations must be defined to avoid crashes
|
||||
* itterate over the structure and ensure all function pointers
|
||||
* iterate over the structure and ensure all function pointers
|
||||
* are non null.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if all the operations are defined
|
||||
@@ -101,6 +103,7 @@ static QDF_STATUS hif_verify_basic_ops(struct hif_softc *hif_sc)
|
||||
|
||||
/**
|
||||
* hif_bus_get_context_size - API to return size of the bus specific structure
|
||||
* @bus_type: bus type
|
||||
*
|
||||
* Return: sizeof of hif_pci_softc
|
||||
*/
|
||||
@@ -126,8 +129,8 @@ int hif_bus_get_context_size(enum qdf_bus_type bus_type)
|
||||
|
||||
/**
|
||||
* hif_bus_open() - initialize the bus_ops and call the bus specific open
|
||||
* hif_sc: hif_context
|
||||
* bus_type: type of bus being enumerated
|
||||
* @hif_sc: hif_context
|
||||
* @bus_type: type of bus being enumerated
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or error
|
||||
*/
|
||||
@@ -185,7 +188,7 @@ void hif_bus_close(struct hif_softc *hif_sc)
|
||||
|
||||
/**
|
||||
* hif_bus_prevent_linkdown() - prevent linkdown
|
||||
* @hif_ctx: hif context
|
||||
* @hif_sc: hif context
|
||||
* @flag: true = keep bus alive false = let bus go to sleep
|
||||
*
|
||||
* Keeps the bus awake during suspend.
|
||||
@@ -398,7 +401,7 @@ void hif_clear_bus_stats(struct hif_opaque_softc *scn)
|
||||
/**
|
||||
* hif_enable_power_management() - enable power management after driver load
|
||||
* @hif_hdl: opaque pointer to the hif context
|
||||
* is_packet_log_enabled: true if packet log is enabled
|
||||
* @is_packet_log_enabled: true if packet log is enabled
|
||||
*
|
||||
* Driver load and firmware download are done in a high performance mode.
|
||||
* Enable power management after the driver is loaded.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -188,6 +188,7 @@ int hif_ahb_get_context_size(void);
|
||||
#else
|
||||
/**
|
||||
* hif_initialize_ahb_ops() - dummy for when ahb not supported
|
||||
* @bus_ops: hif_bus_ops table pointer to initialize
|
||||
*
|
||||
* Return: QDF_STATUS_E_NOSUPPORT
|
||||
*/
|
||||
@@ -214,6 +215,7 @@ int hif_sdio_get_context_size(void);
|
||||
#else
|
||||
/**
|
||||
* hif_initialize_sdio_ops() - dummy for when sdio not supported
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: QDF_STATUS_E_NOSUPPORT
|
||||
*/
|
||||
@@ -260,7 +262,7 @@ static inline int hif_usb_get_context_size(void)
|
||||
|
||||
/**
|
||||
* hif_config_irq_affinity() - Set IRQ affinity for WLAN IRQs
|
||||
* @hif_sc - hif context
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Set IRQ affinity hint for WLAN IRQs in order to affine to
|
||||
* gold cores.
|
||||
@@ -271,8 +273,8 @@ void hif_config_irq_affinity(struct hif_softc *hif_sc);
|
||||
|
||||
/**
|
||||
* hif_config_irq_by_ceid() - register irq by CE id
|
||||
* @hif_sc - hif context
|
||||
* @ce_id - Copy Engine id for which the irq need to be configured
|
||||
* @hif_sc: hif context
|
||||
* @ce_id: Copy Engine id for which the irq need to be configured
|
||||
*
|
||||
* Return: 0 on success, negative value on error.
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/**
|
||||
* hif_initialize_ipci_ops() - initialize the pci ops
|
||||
* @bus_ops: hif_bus_ops table pointer to initialize
|
||||
* @hif_sc: hif_context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ QDF_STATUS hif_initialize_ipci_ops(struct hif_softc *hif_sc)
|
||||
/**
|
||||
* hif_ipci_get_context_size() - return the size of the ipci context
|
||||
*
|
||||
* Return the size of the context. (0 for invalid bus)
|
||||
* Return: the size of the context. (0 for invalid bus)
|
||||
*/
|
||||
int hif_ipci_get_context_size(void)
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/**
|
||||
* hif_initialize_pci_ops() - initialize the pci ops
|
||||
* @bus_ops: hif_bus_ops table pointer to initialize
|
||||
* @hif_sc: HIF context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "ce_api.h"
|
||||
|
||||
/**
|
||||
* hif_initialize_pci_ops() - initialize the pci ops
|
||||
* hif_initialize_snoc_ops() - initialize the pci ops
|
||||
* @bus_ops: hif_bus_ops table pointer to initialize
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -499,10 +499,10 @@ static void hif_exec_tasklet_schedule(struct hif_exec_context *ctx)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_exec_tasklet() - grp tasklet
|
||||
* data: context
|
||||
* hif_exec_tasklet_fn() - grp tasklet
|
||||
* @data: context
|
||||
*
|
||||
* return: void
|
||||
* Return: void
|
||||
*/
|
||||
static void hif_exec_tasklet_fn(unsigned long data)
|
||||
{
|
||||
@@ -526,9 +526,9 @@ static void hif_exec_tasklet_fn(unsigned long data)
|
||||
|
||||
/**
|
||||
* hif_latency_profile_measure() - calculate latency and update histogram
|
||||
* hif_ext_group: hif exec context
|
||||
* @hif_ext_group: hif exec context
|
||||
*
|
||||
* return: None
|
||||
* Return: None
|
||||
*/
|
||||
#ifdef HIF_LATENCY_PROFILE_ENABLE
|
||||
static void hif_latency_profile_measure(struct hif_exec_context *hif_ext_group)
|
||||
@@ -571,9 +571,9 @@ void hif_latency_profile_measure(struct hif_exec_context *hif_ext_group)
|
||||
|
||||
/**
|
||||
* hif_latency_profile_start() - Update the start timestamp for HIF ext group
|
||||
* hif_ext_group: hif exec context
|
||||
* @hif_ext_group: hif exec context
|
||||
*
|
||||
* return: None
|
||||
* Return: None
|
||||
*/
|
||||
#ifdef HIF_LATENCY_PROFILE_ENABLE
|
||||
static void hif_latency_profile_start(struct hif_exec_context *hif_ext_group)
|
||||
@@ -630,8 +630,8 @@ hif_irq_disabled_time_limit_reached(struct hif_exec_context *hif_ext_group)
|
||||
|
||||
/**
|
||||
* hif_exec_poll() - napi poll
|
||||
* napi: napi struct
|
||||
* budget: budget for napi
|
||||
* @napi: napi struct
|
||||
* @budget: budget for napi
|
||||
*
|
||||
* Return: mapping of internal budget to napi
|
||||
*/
|
||||
@@ -788,7 +788,7 @@ struct hif_execution_ops tasklet_sched_ops = {
|
||||
};
|
||||
|
||||
/**
|
||||
* hif_exec_tasklet_schedule() - allocate and initialize a tasklet exec context
|
||||
* hif_exec_tasklet_create() - allocate and initialize a tasklet exec context
|
||||
*/
|
||||
static struct hif_exec_context *hif_exec_tasklet_create(void)
|
||||
{
|
||||
@@ -992,7 +992,7 @@ irqreturn_t hif_ext_group_interrupt_handler(int irq, void *context)
|
||||
|
||||
/**
|
||||
* hif_exec_kill() - grp tasklet kill
|
||||
* scn: hif_softc
|
||||
* @hif_ctx: hif_softc
|
||||
*
|
||||
* return: void
|
||||
*/
|
||||
@@ -1029,7 +1029,9 @@ hif_init_force_napi_complete(struct hif_exec_context *hif_ext_group)
|
||||
* @irq: array of irq values
|
||||
* @handler: callback interrupt handler function
|
||||
* @cb_ctx: context to passed in callback
|
||||
* @context_name: context name
|
||||
* @type: napi vs tasklet
|
||||
* @scale:
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
@@ -1084,6 +1086,7 @@ qdf_export_symbol(hif_register_ext_group);
|
||||
/**
|
||||
* hif_exec_create() - create an execution context
|
||||
* @type: the type of execution context to create
|
||||
* @scale:
|
||||
*/
|
||||
struct hif_exec_context *hif_exec_create(enum hif_exec_type type,
|
||||
uint32_t scale)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -55,31 +55,43 @@ struct hif_execution_ops {
|
||||
};
|
||||
|
||||
/**
|
||||
* hif_exec_context: only ever allocated as a subtype eg.
|
||||
* struct hif_exec_context - only ever allocated as a subtype eg.
|
||||
* hif_tasklet_exec_context
|
||||
*
|
||||
* @context: context for the handler function to use.
|
||||
* @sched_ops: HIF executon ops
|
||||
* @hif: HIF context
|
||||
* @numirq: number of IRQs
|
||||
* @irq: irq handle corresponding to hw block
|
||||
* @os_irq: irq handle for irq_affinity
|
||||
* @cpumask:
|
||||
* @grp_id:
|
||||
* @scale_bin_shift:
|
||||
* @context_name: a pointer to a const string for debugging.
|
||||
* this should help whenever there could be ambiguity
|
||||
* in what type of context the void* context points to
|
||||
* @irq: irq handle corresponding to hw block
|
||||
* @os_irq: irq handle for irq_affinity
|
||||
* @cpu: the cpu this context should be affined to
|
||||
* @context: context for the handler function to use.
|
||||
* @handler: interrupt handler
|
||||
* @work_complete: Function call called when leaving the execution context to
|
||||
* determine if this context should reschedule or wait for an interrupt.
|
||||
* This function may be used as a hook for post processing.
|
||||
*
|
||||
* @irq_enable: called when the context leaves polling mode
|
||||
* @irq_disable: called before scheduling the context.
|
||||
* @irq_name: pointer to function to return irq name/string mapped to irq number
|
||||
* @sched_latency_stats: schedule latency stats for different latency buckets
|
||||
* @tstamp: timestamp when napi poll happens
|
||||
* @irq_disable: called before scheduling the context.
|
||||
* @irq_enable: called when the context leaves polling mode
|
||||
* @irq_name: pointer to function to return irq name/string mapped to irq number
|
||||
* @cpu: the cpu this context should be affined to
|
||||
* @stats:
|
||||
* @inited:
|
||||
* @configured:
|
||||
* @irq_requested:
|
||||
* @irq_enabled:
|
||||
* @irq_lock: spinlock used while enabling/disabling IRQs
|
||||
* @type: type of execution context
|
||||
* @poll_start_time: hif napi poll start time in nanoseconds
|
||||
* @force_break: flag to indicate if HIF execution context was forced to return
|
||||
* to HIF. This means there is more work to be done. Hence do not
|
||||
* call napi_complete.
|
||||
* @new_cpu_mask: Stores the affinity hint mask for each WLAN IRQ
|
||||
* @force_napi_complete: do a force napi_complete when this flag is set to -1
|
||||
* @irq_disabled_start_time: irq disabled start time for single MSI
|
||||
*/
|
||||
@@ -115,7 +127,6 @@ struct hif_exec_context {
|
||||
bool force_break;
|
||||
#if defined(FEATURE_IRQ_AFFINITY) || defined(HIF_CPU_PERF_AFFINE_MASK) || \
|
||||
defined(HIF_CPU_CLEAR_AFFINITY)
|
||||
/* Stores the affinity hint mask for each WLAN IRQ */
|
||||
qdf_cpu_mask new_cpu_mask[HIF_MAX_GRP_IRQ];
|
||||
#endif
|
||||
#ifdef FEATURE_IRQ_AFFINITY
|
||||
@@ -197,7 +208,7 @@ void hif_pci_irq_set_affinity_hint(struct hif_exec_context *hif_ext_group,
|
||||
|
||||
/**
|
||||
* hif_pci_ce_irq_set_affinity_hint() - API to set IRQ affinity
|
||||
* @hif_softc: hif_softc to extract the CE irq info
|
||||
* @scn: hif_softc to extract the CE irq info
|
||||
*
|
||||
* This function will set the CE IRQ affinity to the gold cores
|
||||
* only for defconfig builds
|
||||
@@ -228,10 +239,10 @@ static inline void hif_ce_irq_remove_affinity_hint(int irq)
|
||||
#endif /* ifdef HIF_CPU_PERF_AFFINE_MASK */
|
||||
|
||||
#ifdef HIF_CPU_CLEAR_AFFINITY
|
||||
/*
|
||||
* hif_pci_config_irq_clear_affinity() - Remove cpu affinity of IRQ
|
||||
/**
|
||||
* hif_pci_config_irq_clear_cpu_affinity() - Remove cpu affinity of IRQ
|
||||
* @scn: HIF handle
|
||||
* @intr_ctxt: interrupt group index
|
||||
* @intr_ctxt_id: interrupt group index
|
||||
* @cpu: CPU core to clear
|
||||
*
|
||||
* Return: None
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -251,7 +251,7 @@ static inline void hif_unlock_reg_access(struct hif_pci_softc *sc,
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
/*
|
||||
* note1: WINDOW_RANGE_MASK = (1 << WINDOW_SHIFT) -1
|
||||
* note2: 1 << WINDOW_SHIFT = MAX_UNWINDOWED_ADDRESS
|
||||
* note3: WINDOW_VALUE_MASK = big enough that trying to write past that window
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -54,10 +54,9 @@ static void hnc_dump_cpus(struct qca_napi_data *napid) { /* no-op */ };
|
||||
|
||||
#ifdef HIF_IRQ_AFFINITY
|
||||
/**
|
||||
*
|
||||
* hif_exec_event() - reacts to events that impact irq affinity
|
||||
* @hif : pointer to hif context
|
||||
* @evnt: event that has been detected
|
||||
* @hif_ctx: pointer to hif context
|
||||
* @event: event that has been detected
|
||||
* @data: more data regarding the event
|
||||
*
|
||||
* Description:
|
||||
@@ -230,10 +229,10 @@ int hif_exec_event(struct hif_opaque_softc *hif_ctx, enum qca_napi_event event,
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hncm_migrate_to() - migrates a NAPI to a CPU
|
||||
* hncm_exec_migrate_to() - migrates a NAPI to a CPU
|
||||
* @napid: pointer to NAPI block
|
||||
* @ce_id: CE_id of the NAPI instance
|
||||
* @didx : index in the CPU topology table for the CPU to migrate to
|
||||
* @ctx_id: CE_id of the NAPI instance
|
||||
* @didx: index in the CPU topology table for the CPU to migrate to
|
||||
*
|
||||
* Migrates NAPI (identified by the CE_id) to the destination core
|
||||
* Updates the napi_map of the destination entry
|
||||
@@ -351,10 +350,12 @@ retry_disperse:
|
||||
NAPI_DEBUG("<--%s[dest=%d]", __func__, destidx);
|
||||
return destidx;
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_napi_cpu_migrate() - migrate IRQs away
|
||||
* hif_exec_cpu_migrate() - migrate IRQs away
|
||||
* @napid: pointer to qca_napi_data structure
|
||||
* @cpu: -1: all CPUs <n> specific CPU
|
||||
* @act: COLLAPSE | DISPERSE
|
||||
* @action: COLLAPSE | DISPERSE
|
||||
*
|
||||
* Moves IRQs/NAPIs from specific or all CPUs (specified by @cpu) to eligible
|
||||
* cores. Eligible cores are:
|
||||
@@ -465,7 +466,7 @@ static inline void hif_exec_dl_irq(struct qca_napi_data *napid, bool dl_flag)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_napi_cpu_denylist() - en(dis)ables denylisting for NAPI RX interrupts.
|
||||
* hif_exec_cpu_denylist() - en(dis)ables denylisting for NAPI RX interrupts.
|
||||
* @napid: pointer to qca_napi_data structure
|
||||
* @op: denylist operation to perform
|
||||
*
|
||||
|
@@ -63,6 +63,7 @@ void hif_dump(struct hif_opaque_softc *hif_ctx, uint8_t cmd_id, bool start)
|
||||
|
||||
/**
|
||||
* hif_get_target_id(): hif_get_target_id
|
||||
* @scn: scn
|
||||
*
|
||||
* Return the virtual memory base address to the caller
|
||||
*
|
||||
@@ -77,7 +78,7 @@ A_target_id_t hif_get_target_id(struct hif_softc *scn)
|
||||
|
||||
/**
|
||||
* hif_get_targetdef(): hif_get_targetdef
|
||||
* @scn: scn
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: void *
|
||||
*/
|
||||
@@ -110,6 +111,7 @@ void hif_shutdown_notifier_cb(void *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_vote_link_down(): unvote for link up
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Call hif_vote_link_down to release a previous request made using
|
||||
* hif_vote_link_up. A hif_vote_link_down call should only be made
|
||||
@@ -139,6 +141,7 @@ void hif_vote_link_down(struct hif_opaque_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_vote_link_up(): vote to prevent bus from suspending
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Makes hif guarantee that fw can message the host normally
|
||||
* during suspend.
|
||||
@@ -161,6 +164,7 @@ void hif_vote_link_up(struct hif_opaque_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_can_suspend_link(): query if hif is permitted to suspend the link
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Hif will ensure that the link won't be suspended if the upperlayers
|
||||
* don't want it to.
|
||||
@@ -485,6 +489,7 @@ static const char *hif_get_hw_name(struct hif_target_info *info)
|
||||
* @scn: scn
|
||||
* @version: version
|
||||
* @revision: revision
|
||||
* @target_name: target name
|
||||
*
|
||||
* Return: n/a
|
||||
*/
|
||||
@@ -504,11 +509,9 @@ void hif_get_hw_info(struct hif_opaque_softc *scn, u32 *version, u32 *revision,
|
||||
|
||||
/**
|
||||
* hif_get_dev_ba(): API to get device base address.
|
||||
* @scn: scn
|
||||
* @version: version
|
||||
* @revision: revision
|
||||
* @hif_handle: hif handle
|
||||
*
|
||||
* Return: n/a
|
||||
* Return: device base address
|
||||
*/
|
||||
void *hif_get_dev_ba(struct hif_opaque_softc *hif_handle)
|
||||
{
|
||||
@@ -520,7 +523,7 @@ qdf_export_symbol(hif_get_dev_ba);
|
||||
|
||||
/**
|
||||
* hif_get_dev_ba_ce(): API to get device ce base address.
|
||||
* @scn: scn
|
||||
* @hif_handle: hif handle
|
||||
*
|
||||
* Return: dev mem base address for CE
|
||||
*/
|
||||
@@ -535,7 +538,7 @@ qdf_export_symbol(hif_get_dev_ba_ce);
|
||||
|
||||
/**
|
||||
* hif_get_dev_ba_pmm(): API to get device pmm base address.
|
||||
* @scn: scn
|
||||
* @hif_handle: scn
|
||||
*
|
||||
* Return: dev mem base address for PMM
|
||||
*/
|
||||
@@ -560,7 +563,7 @@ qdf_export_symbol(hif_get_soc_version);
|
||||
|
||||
/**
|
||||
* hif_get_dev_ba_cmem(): API to get device ce base address.
|
||||
* @scn: scn
|
||||
* @hif_handle: hif handle
|
||||
*
|
||||
* Return: dev mem base address for CMEM
|
||||
*/
|
||||
@@ -754,6 +757,7 @@ QDF_STATUS hif_unregister_recovery_notifier(struct hif_softc *hif_handle)
|
||||
#ifdef HIF_CPU_PERF_AFFINE_MASK
|
||||
/**
|
||||
* __hif_cpu_hotplug_notify() - CPU hotplug event handler
|
||||
* @context: HIF context
|
||||
* @cpu: CPU Id of the CPU generating the event
|
||||
* @cpu_up: true if the CPU is online
|
||||
*
|
||||
@@ -780,6 +784,7 @@ static void __hif_cpu_hotplug_notify(void *context,
|
||||
/**
|
||||
* hif_cpu_hotplug_notify - cpu core up/down notification
|
||||
* handler
|
||||
* @context: HIF context
|
||||
* @cpu: CPU generating the event
|
||||
* @cpu_up: true if the CPU is online
|
||||
*
|
||||
@@ -1602,7 +1607,6 @@ void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx)
|
||||
/**
|
||||
* hif_check_fw_reg(): hif_check_fw_reg
|
||||
* @scn: scn
|
||||
* @state:
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
@@ -1831,6 +1835,7 @@ end:
|
||||
|
||||
/**
|
||||
* hif_get_bus_type() - return the bus type
|
||||
* @hif_hdl: HIF Context
|
||||
*
|
||||
* Return: enum qdf_bus_type
|
||||
*/
|
||||
@@ -1841,7 +1846,7 @@ enum qdf_bus_type hif_get_bus_type(struct hif_opaque_softc *hif_hdl)
|
||||
return scn->bus_type;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Target info and ini parameters are global to the driver
|
||||
* Hence these structures are exposed to all the modules in
|
||||
* the driver and they don't need to maintains multiple copies
|
||||
@@ -2183,9 +2188,10 @@ void hif_mem_free_consistent_unaligned(struct hif_softc *scn,
|
||||
* hif_batch_send() - API to access hif specific function
|
||||
* ce_batch_send.
|
||||
* @osc: HIF Context
|
||||
* @msdu : list of msdus to be sent
|
||||
* @transfer_id : transfer id
|
||||
* @len : downloaded length
|
||||
* @msdu: list of msdus to be sent
|
||||
* @transfer_id: transfer id
|
||||
* @len: downloaded length
|
||||
* @sendhead:
|
||||
*
|
||||
* Return: list of msds not sent
|
||||
*/
|
||||
@@ -2206,7 +2212,7 @@ qdf_export_symbol(hif_batch_send);
|
||||
* hif_update_tx_ring() - API to access hif specific function
|
||||
* ce_update_tx_ring.
|
||||
* @osc: HIF Context
|
||||
* @num_htt_cmpls : number of htt compl received.
|
||||
* @num_htt_cmpls: number of htt compl received.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
|
@@ -413,7 +413,7 @@ static inline int hif_get_num_active_tasklets(struct hif_softc *scn)
|
||||
return qdf_atomic_read(&scn->active_tasklet_cnt);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Max waiting time during Runtime PM suspend to finish all
|
||||
* the tasks. This is in the multiple of 10ms.
|
||||
*/
|
||||
@@ -510,7 +510,7 @@ bool hif_is_target_ready(struct hif_softc *scn);
|
||||
|
||||
/**
|
||||
* hif_get_bandwidth_level() - API to get the current bandwidth level
|
||||
* @scn: HIF Context
|
||||
* @hif_handle: HIF Context
|
||||
*
|
||||
* Return: PLD bandwidth level
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -28,11 +29,9 @@
|
||||
|
||||
#ifdef WLAN_FEATURE_FASTPATH
|
||||
/**
|
||||
* hif_send_fast() - API to access hif specific function
|
||||
* ce_send_fast.
|
||||
* hif_send_fast() - API to access hif specific function ce_send_fast().
|
||||
* @osc: HIF Context
|
||||
* @msdu : array of msdus to be sent
|
||||
* @num_msdus : number of msdus in an array
|
||||
* @nbuf: netork buffer to send
|
||||
* @transfer_id: transfer id
|
||||
* @download_len: download length
|
||||
*
|
||||
@@ -51,6 +50,7 @@ qdf_export_symbol(hif_send_fast);
|
||||
|
||||
/**
|
||||
* hif_ce_fastpath_cb_register() - Register callback for fastpath msg handler
|
||||
* @hif_ctx: HIF context
|
||||
* @handler: Callback funtcion
|
||||
* @context: handle for callback function
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -110,12 +110,11 @@ static void hif_deinit_rx_thread_napi(struct qca_napi_info *napii)
|
||||
|
||||
/**
|
||||
* hif_napi_create() - creates the NAPI structures for a given CE
|
||||
* @hif : pointer to hif context
|
||||
* @pipe_id: the CE id on which the instance will be created
|
||||
* @poll : poll function to be used for this NAPI instance
|
||||
* @budget : budget to be registered with the NAPI instance
|
||||
* @scale : scale factor on the weight (to scaler budget to 1000)
|
||||
* @flags : feature flags
|
||||
* @hif_ctx: pointer to hif context
|
||||
* @poll: poll function to be used for this NAPI instance
|
||||
* @budget: budget to be registered with the NAPI instance
|
||||
* @scale: scale factor on the weight (to scaler budget to 1000)
|
||||
* @flags: feature flags
|
||||
*
|
||||
* Description:
|
||||
* Creates NAPI instances. This function is called
|
||||
@@ -314,11 +313,10 @@ void hif_napi_rx_offld_flush_cb_deregister(struct hif_opaque_softc *hif_hdl)
|
||||
#endif /* RECEIVE_OFFLOAD */
|
||||
|
||||
/**
|
||||
*
|
||||
* hif_napi_destroy() - destroys the NAPI structures for a given instance
|
||||
* @hif : pointer to hif context
|
||||
* @ce_id : the CE id whose napi instance will be destroyed
|
||||
* @force : if set, will destroy even if entry is active (de-activates)
|
||||
* @hif_ctx: pointer to hif context
|
||||
* @id: the CE id whose napi instance will be destroyed
|
||||
* @force: if set, will destroy even if entry is active (de-activates)
|
||||
*
|
||||
* Description:
|
||||
* Destroy a given NAPI instance. This function is called
|
||||
@@ -430,9 +428,8 @@ void *hif_napi_get_lro_info(struct hif_opaque_softc *hif_hdl, int napi_id)
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* hif_napi_get_all() - returns the address of the whole HIF NAPI structure
|
||||
* @hif: pointer to hif context
|
||||
* @hif_ctx: pointer to hif context
|
||||
*
|
||||
* Description:
|
||||
* Returns the address of the whole structure
|
||||
@@ -455,10 +452,9 @@ struct qca_napi_info *hif_get_napi(int napi_id, struct qca_napi_data *napid)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* hif_napi_event() - reacts to events that impact NAPI
|
||||
* @hif : pointer to hif context
|
||||
* @evnt: event that has been detected
|
||||
* @hif_ctx: pointer to hif context
|
||||
* @event: event that has been detected
|
||||
* @data: more data regarding the event
|
||||
*
|
||||
* Description:
|
||||
@@ -701,8 +697,8 @@ qdf_export_symbol(hif_napi_event);
|
||||
|
||||
/**
|
||||
* hif_napi_enabled() - checks whether NAPI is enabled for given ce or not
|
||||
* @hif: hif context
|
||||
* @ce : CE instance (or -1, to check if any CEs are enabled)
|
||||
* @hif_ctx: hif context
|
||||
* @ce: CE instance (or -1, to check if any CEs are enabled)
|
||||
*
|
||||
* Return: bool
|
||||
*/
|
||||
@@ -722,8 +718,8 @@ qdf_export_symbol(hif_napi_enabled);
|
||||
|
||||
/**
|
||||
* hif_napi_created() - checks whether NAPI is created for given ce or not
|
||||
* @hif: hif context
|
||||
* @ce : CE instance
|
||||
* @hif_ctx: hif context
|
||||
* @ce: CE instance
|
||||
*
|
||||
* Return: bool
|
||||
*/
|
||||
@@ -742,7 +738,7 @@ qdf_export_symbol(hif_napi_created);
|
||||
* hif_napi_enable_irq() - enables bus interrupts after napi_complete
|
||||
*
|
||||
* @hif: hif context
|
||||
* @id : id of NAPI instance calling this (used to determine the CE)
|
||||
* @id: id of NAPI instance calling this (used to determine the CE)
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
@@ -756,7 +752,7 @@ inline void hif_napi_enable_irq(struct hif_opaque_softc *hif, int id)
|
||||
|
||||
/**
|
||||
* hif_napi_schedule() - schedules napi, updates stats
|
||||
* @scn: hif context
|
||||
* @hif_ctx: hif context
|
||||
* @ce_id: index of napi instance
|
||||
*
|
||||
* Return: false if napi didn't enable or already scheduled, otherwise true
|
||||
@@ -858,7 +854,8 @@ static void hif_napi_offld_flush_cb(struct qca_napi_info *napi_info)
|
||||
|
||||
/**
|
||||
* hif_napi_poll() - NAPI poll routine
|
||||
* @napi : pointer to NAPI struct as kernel holds it
|
||||
* @hif_ctx: HIF context
|
||||
* @napi: pointer to NAPI struct as kernel holds it
|
||||
* @budget:
|
||||
*
|
||||
* This is the body of the poll function.
|
||||
@@ -1008,10 +1005,8 @@ qdf_export_symbol(hif_update_napi_max_poll_time);
|
||||
|
||||
#ifdef HIF_IRQ_AFFINITY
|
||||
/**
|
||||
*
|
||||
* hif_napi_update_yield_stats() - update NAPI yield related stats
|
||||
* @cpu_id: CPU ID for which stats needs to be updates
|
||||
* @ce_id: Copy Engine ID for which yield stats needs to be updates
|
||||
* @ce_state: CE state structure
|
||||
* @time_limit_reached: indicates whether the time limit was reached
|
||||
* @rxpkt_thresh_reached: indicates whether rx packet threshold was reached
|
||||
*
|
||||
@@ -1060,7 +1055,6 @@ void hif_napi_update_yield_stats(struct CE_state *ce_state,
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* hif_napi_stats() - display NAPI CPU statistics
|
||||
* @napid: pointer to qca_napi_data
|
||||
*
|
||||
@@ -1107,6 +1101,10 @@ static void hnc_dump_cpus(struct qca_napi_data *napid)
|
||||
#else
|
||||
static void hnc_dump_cpus(struct qca_napi_data *napid) { /* no-op */ };
|
||||
#endif /* FEATURE_NAPI_DEBUG */
|
||||
|
||||
#define HNC_MIN_CLUSTER 0
|
||||
#define HNC_MAX_CLUSTER 1
|
||||
|
||||
/**
|
||||
* hnc_link_clusters() - partitions to cpu table into clusters
|
||||
* @napid: pointer to NAPI data
|
||||
@@ -1127,8 +1125,6 @@ static void hnc_dump_cpus(struct qca_napi_data *napid) { /* no-op */ };
|
||||
* Return: 0 : OK
|
||||
* !0: error (at least one of lil/big clusters could not be found)
|
||||
*/
|
||||
#define HNC_MIN_CLUSTER 0
|
||||
#define HNC_MAX_CLUSTER 1
|
||||
static int hnc_link_clusters(struct qca_napi_data *napid)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -1304,8 +1300,8 @@ static void hnc_hotplug_unregister(struct hif_softc *hif_sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hnc_install_tput() - installs a callback in the throughput detector
|
||||
* @register: !0 => register; =0: unregister
|
||||
* hnc_tput_hook() - installs a callback in the throughput detector
|
||||
* @install: !0 => install; =0: uninstall
|
||||
*
|
||||
* installs a callback to be called when wifi driver throughput (tx+rx)
|
||||
* crosses a threshold. Currently, we are using the same criteria as
|
||||
@@ -1346,7 +1342,7 @@ static inline void record_sibling_cpumask(struct qca_napi_cpu *cpus, int i)
|
||||
|
||||
/**
|
||||
* hif_napi_cpu_init() - initialization of irq affinity block
|
||||
* @ctx: pointer to qca_napi_data
|
||||
* @hif: HIF context
|
||||
*
|
||||
* called by hif_napi_create, after the first instance is called
|
||||
* - builds napi_rss_cpus table from cpu topology
|
||||
@@ -1414,6 +1410,7 @@ lab_rss_init:
|
||||
|
||||
/**
|
||||
* hif_napi_cpu_deinit() - clean-up of irq affinity block
|
||||
* @hif: HIF context
|
||||
*
|
||||
* called by hif_napi_destroy, when the last instance is removed
|
||||
* - uninstalls throughput and hotplug notifiers
|
||||
@@ -1444,8 +1441,8 @@ int hif_napi_cpu_deinit(struct hif_opaque_softc *hif)
|
||||
/**
|
||||
* hncm_migrate_to() - migrates a NAPI to a CPU
|
||||
* @napid: pointer to NAPI block
|
||||
* @ce_id: CE_id of the NAPI instance
|
||||
* @didx : index in the CPU topology table for the CPU to migrate to
|
||||
* @napi_ce: CE_id of the NAPI instance
|
||||
* @didx: index in the CPU topology table for the CPU to migrate to
|
||||
*
|
||||
* Migrates NAPI (identified by the CE_id) to the destination core
|
||||
* Updates the napi_map of the destination entry
|
||||
@@ -1487,7 +1484,7 @@ static int hncm_migrate_to(struct qca_napi_data *napid,
|
||||
/**
|
||||
* hncm_dest_cpu() - finds a destination CPU for NAPI
|
||||
* @napid: pointer to NAPI block
|
||||
* @act : RELOCATE | COLLAPSE | DISPERSE
|
||||
* @act: RELOCATE | COLLAPSE | DISPERSE
|
||||
*
|
||||
* Finds the designated destination for the next IRQ.
|
||||
* RELOCATE: translated to either COLLAPSE or DISPERSE based
|
||||
@@ -1560,8 +1557,9 @@ retry_disperse:
|
||||
}
|
||||
/**
|
||||
* hif_napi_cpu_migrate() - migrate IRQs away
|
||||
* @napid: pointer to NAPI block
|
||||
* @cpu: -1: all CPUs <n> specific CPU
|
||||
* @act: COLLAPSE | DISPERSE
|
||||
* @action: COLLAPSE | DISPERSE
|
||||
*
|
||||
* Moves IRQs/NAPIs from specific or all CPUs (specified by @cpu) to eligible
|
||||
* cores. Eligible cores are:
|
||||
@@ -1736,6 +1734,7 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static unsigned long napi_serialize_reqs;
|
||||
/**
|
||||
* hif_napi_serialize() - [de-]serialize NAPI operations
|
||||
* @hif: context
|
||||
@@ -1751,7 +1750,6 @@ out:
|
||||
* - at the end of the timer, check the current throughput state and
|
||||
* implement it.
|
||||
*/
|
||||
static unsigned long napi_serialize_reqs;
|
||||
int hif_napi_serialize(struct hif_opaque_softc *hif, int is_on)
|
||||
{
|
||||
int rc = -EINVAL;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -31,7 +31,7 @@
|
||||
/* CLD headers */
|
||||
#include <hif.h> /* struct hif_opaque_softc; */
|
||||
|
||||
/**
|
||||
/*
|
||||
* common stuff
|
||||
* The declarations until #ifdef FEATURE_NAPI below
|
||||
* are valid whether or not FEATURE_NAPI has been
|
||||
@@ -39,6 +39,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* enum qca_napi_event - NAPI Events
|
||||
* @NAPI_EVT_INVALID: invalid event
|
||||
* @NAPI_EVT_INI_FILE: ini file processed
|
||||
* @NAPI_EVT_CMD_STATE: userspace command
|
||||
* @NAPI_EVT_INT_STATE: internal event
|
||||
* @NAPI_EVT_CPU_STATE: CPU hotplus events
|
||||
* @NAPI_EVT_TPUT_STATE: throughput triggers
|
||||
* @NAPI_EVT_USR_SERIAL: WMA/Roaming Start
|
||||
* @NAPI_EVT_USR_NORMAL: WMA/Roaming End
|
||||
*
|
||||
* NAPI manages the following states:
|
||||
* NAPI state: per NAPI instance, ENABLED/DISABLED
|
||||
* CPU state: per CPU, DOWN/UP
|
||||
@@ -70,7 +80,8 @@ enum qca_napi_event {
|
||||
NAPI_EVT_USR_SERIAL,
|
||||
NAPI_EVT_USR_NORMAL
|
||||
};
|
||||
/**
|
||||
|
||||
/*
|
||||
* Following are some of NAPI related features controlled using feature flag
|
||||
* These flags need to be enabled in the qca_napi_data->flags variable for the
|
||||
* feature to kick in.
|
||||
@@ -82,7 +93,7 @@ enum qca_napi_event {
|
||||
#define QCA_NAPI_FEATURE_IRQ_BLACKLISTING BIT(2)
|
||||
#define QCA_NAPI_FEATURE_CORE_CTL_BOOST BIT(3)
|
||||
|
||||
/**
|
||||
/*
|
||||
* Macros to map ids -returned by ...create()- to pipes and vice versa
|
||||
*/
|
||||
#define NAPI_ID2PIPE(i) ((i)-1)
|
||||
@@ -92,7 +103,7 @@ enum qca_napi_event {
|
||||
/**
|
||||
* hif_napi_rx_offld_flush_cb_register() - Register flush callback for Rx offld
|
||||
* @hif_hdl: pointer to hif context
|
||||
* @offld_flush_handler: register offld flush callback
|
||||
* @rx_ol_flush_handler: register offld flush callback
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
@@ -110,7 +121,7 @@ void hif_napi_rx_offld_flush_cb_deregister(struct hif_opaque_softc *hif_hdl);
|
||||
|
||||
/**
|
||||
* hif_napi_get_lro_info() - returns the address LRO data for napi_id
|
||||
* @hif: pointer to hif context
|
||||
* @hif_hdl: pointer to hif context
|
||||
* @napi_id: napi instance
|
||||
*
|
||||
* Description:
|
||||
@@ -129,7 +140,7 @@ enum qca_denylist_op {
|
||||
|
||||
#ifdef FEATURE_NAPI
|
||||
|
||||
/**
|
||||
/*
|
||||
* NAPI HIF API
|
||||
*
|
||||
* the declarations below only apply to the case
|
||||
@@ -200,7 +211,7 @@ int hif_napi_poll(struct hif_opaque_softc *hif_ctx,
|
||||
void hif_update_napi_max_poll_time(struct CE_state *ce_state,
|
||||
int ce_id,
|
||||
int cpu_id);
|
||||
/**
|
||||
/*
|
||||
* Local interface to HIF implemented functions of NAPI CPU affinity management.
|
||||
* Note:
|
||||
* 1- The symbols in this file are NOT supposed to be used by any
|
||||
@@ -212,7 +223,7 @@ void hif_update_napi_max_poll_time(struct CE_state *ce_state,
|
||||
|
||||
#else /* ! defined(FEATURE_NAPI) */
|
||||
|
||||
/**
|
||||
/*
|
||||
* Stub API
|
||||
*
|
||||
* The declarations in this section are valid only
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -52,7 +52,7 @@ static struct hif_rtpm_ctx *gp_hif_rtpm_ctx;
|
||||
|
||||
/**
|
||||
* hif_rtpm_id_to_string() - Convert dbgid to respective string
|
||||
* @id - debug id
|
||||
* @id: debug id
|
||||
*
|
||||
* Debug support function to convert dbgid to string.
|
||||
* Please note to add new string in the array at index equal to
|
||||
@@ -81,7 +81,6 @@ static const char *hif_rtpm_id_to_string(enum hif_rtpm_client_id id)
|
||||
|
||||
/**
|
||||
* hif_rtpm_read_usage_count() - Read device usage count
|
||||
* @dev: device structure
|
||||
*
|
||||
* Return: current usage count
|
||||
*/
|
||||
@@ -178,8 +177,8 @@ static int hif_rtpm_debugfs_show(struct seq_file *s, void *data)
|
||||
|
||||
/**
|
||||
* hif_rtpm_debugfs_open() - open a debug fs file to access the runtime pm stats
|
||||
* @inode
|
||||
* @file
|
||||
* @inode:
|
||||
* @file:
|
||||
*
|
||||
* Return: linux error code of single_open.
|
||||
*/
|
||||
@@ -199,7 +198,6 @@ static const struct file_operations hif_rtpm_fops = {
|
||||
|
||||
/**
|
||||
* hif_rtpm_debugfs_create() - creates runtimepm debugfs entry
|
||||
* @scn: hif context
|
||||
*
|
||||
* creates a debugfs entry to debug the runtime pm feature.
|
||||
*/
|
||||
@@ -214,7 +212,6 @@ static void hif_rtpm_debugfs_create(void)
|
||||
|
||||
/**
|
||||
* hif_rtpm_debugfs_remove() - removes runtimepm debugfs entry
|
||||
* @scn: pci context
|
||||
*
|
||||
* removes the debugfs entry to debug the runtime pm feature.
|
||||
*/
|
||||
@@ -350,7 +347,7 @@ static void hif_rtpm_sanitize_exit(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_rtpm_sanitize_on_ssr_exit() - Empty the suspend list on SSR
|
||||
* hif_rtpm_sanitize_ssr_exit() - Empty the suspend list on SSR
|
||||
*
|
||||
* API is used to empty the runtime pm prevent suspend list.
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -48,8 +48,13 @@ enum hif_rtpm_state {
|
||||
* @suspend_ts: Last suspend call timestamp
|
||||
* @suspend_err_ts: Last suspend call fail timestamp
|
||||
* @last_busy_ts: Last busy timestamp marked
|
||||
* @last_busy_id:
|
||||
* @last_busy_marker:
|
||||
* @request_resume_ts: Last request resume done timestamp
|
||||
* @request_resume_ts: Client ID requesting resume
|
||||
* @request_resume_id: Client ID requesting resume
|
||||
* @prevent_suspend:
|
||||
* @allow_suspend:
|
||||
* @runtime_get_err:
|
||||
*/
|
||||
struct hif_rtpm_state_stats {
|
||||
uint32_t resume_count;
|
||||
@@ -86,14 +91,13 @@ struct hif_rtpm_last_busy_hist {
|
||||
/**
|
||||
* struct hif_rtpm_client - Runtime PM client structure
|
||||
* @hif_rtpm_cbk: Callback during resume if get called at suspend and failed
|
||||
* @prevent_multiple_get: Client restricted to not calling get and put calls
|
||||
* simultaneously
|
||||
* @active_count: current active status of client
|
||||
* @get_count: count of get calls by this client
|
||||
* @put_count: count of put calls by this client
|
||||
* @last_busy_cnt:
|
||||
* @get_ts: Last get called timestamp
|
||||
* @put_ts: Last put called timestamp
|
||||
* @request_resume_ts: client request resume timestamp
|
||||
* @last_busy_ts:
|
||||
*/
|
||||
struct hif_rtpm_client {
|
||||
void (*hif_rtpm_cbk)(void);
|
||||
@@ -108,15 +112,23 @@ struct hif_rtpm_client {
|
||||
|
||||
/**
|
||||
* struct hif_rtpm_ctx - Runtime power management context
|
||||
* @enable_rpm:
|
||||
* @dev:
|
||||
* @runtime_lock: Lock to sync state changes with get calls
|
||||
* @runtime_suspend_lock: Suspend lock
|
||||
* @client_count: Number of clients currently registered
|
||||
* @clients: clients registered to use runtime PM module
|
||||
* @prevent_list_lock:
|
||||
* @prevent_list:
|
||||
* @prevent_cnt:
|
||||
* @pm_state: Current runtime pm state
|
||||
* @pending_job: bitmap to set the client job to be called at resume
|
||||
* @monitor_wake_intr: Monitor waking MSI for runtime PM
|
||||
* @stats: Runtime PM stats
|
||||
* @pm_entry: debug fs entry
|
||||
* @pm_dentry: debug fs entry
|
||||
* @cfg_delay:
|
||||
* @delay:
|
||||
* @busy_hist: busy histogram
|
||||
*/
|
||||
struct hif_rtpm_ctx {
|
||||
bool enable_rpm;
|
||||
@@ -251,7 +263,7 @@ static inline void __hif_rtpm_mark_last_busy(struct device *dev)
|
||||
|
||||
/**
|
||||
* __hif_rtpm_resume() - Do Runtime PM Resume of bus
|
||||
* dev: device structure
|
||||
* @dev: device structure
|
||||
*
|
||||
* Return: 0 if success. Error otherwise
|
||||
*/
|
||||
@@ -262,7 +274,7 @@ static inline int __hif_rtpm_resume(struct device *dev)
|
||||
|
||||
/**
|
||||
* __hif_rtpm_request_resume() - Queue resume work
|
||||
* dev: device structure
|
||||
* @dev: device structure
|
||||
*
|
||||
* Return: 1 if already active. 0 if successfully queued. Error otherwise
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -31,13 +31,14 @@
|
||||
|
||||
#ifdef FORCE_WAKE
|
||||
/**
|
||||
* struct hif_pci_stats - Account for hif pci based statistics
|
||||
* struct hif_ipci_stats - Account for hif pci based statistics
|
||||
* @mhi_force_wake_request_vote: vote for mhi
|
||||
* @mhi_force_wake_failure: mhi force wake failure
|
||||
* @mhi_force_wake_success: mhi force wake success
|
||||
* @soc_force_wake_register_write_success: write to soc wake
|
||||
* @soc_force_wake_failure: soc force wake failure
|
||||
* @soc_force_wake_success: soc force wake success
|
||||
* @mhi_force_wake_release_failure: mhi force wake release failure
|
||||
* @mhi_force_wake_release_success: mhi force wake release success
|
||||
* @soc_force_wake_release_success: soc force wake release
|
||||
*/
|
||||
@@ -122,7 +123,7 @@ int hif_configure_irq(struct hif_softc *sc);
|
||||
#ifdef FORCE_WAKE
|
||||
/**
|
||||
* hif_print_ipci_stats() - Display HIF IPCI stats
|
||||
* @ipci_scn - HIF ipci handle
|
||||
* @ipci_scn: HIF ipci handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -239,7 +239,7 @@ static void hif_pci_route_adrastea_interrupt(struct hif_pci_softc *sc)
|
||||
|
||||
|
||||
/**
|
||||
* pci_dispatch_ce_irq() - pci_dispatch_ce_irq
|
||||
* pci_dispatch_interrupt() - PCI interrupt dispatcher
|
||||
* @scn: scn
|
||||
*
|
||||
* Return: N/A
|
||||
@@ -487,6 +487,7 @@ inline void hif_pci_cancel_deferred_target_sleep(struct hif_softc *scn)
|
||||
/**
|
||||
* hif_targ_is_awake() - check to see if the target is awake
|
||||
* @hif_ctx: hif context
|
||||
* @mem:
|
||||
*
|
||||
* emulation never goes to sleep
|
||||
*
|
||||
@@ -499,7 +500,8 @@ static bool hif_targ_is_awake(struct hif_softc *hif_ctx, void *__iomem *mem)
|
||||
#else
|
||||
/**
|
||||
* hif_targ_is_awake() - check to see if the target is awake
|
||||
* @hif_ctx: hif context
|
||||
* @scn: hif context
|
||||
* @mem:
|
||||
*
|
||||
* Return: true if the targets clocks are on
|
||||
*/
|
||||
@@ -932,8 +934,8 @@ static void __hif_pci_dump_registers(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dump_registers(): dump bus debug registers
|
||||
* @scn: struct hif_opaque_softc
|
||||
* hif_pci_dump_registers(): dump bus debug registers
|
||||
* @hif_ctx: struct hif_opaque_softc
|
||||
*
|
||||
* This function dumps hif bus debug registers
|
||||
*
|
||||
@@ -1037,7 +1039,7 @@ static void hif_disable_power_gating(struct hif_opaque_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_enable_power_gating() - enable HW power gating
|
||||
* @hif_ctx: hif context
|
||||
* @sc: hif context
|
||||
*
|
||||
* enables pcie L1 power states
|
||||
*/
|
||||
@@ -1053,8 +1055,9 @@ static void hif_enable_power_gating(struct hif_pci_softc *sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_enable_power_management() - enable power management
|
||||
* @hif_ctx: hif context
|
||||
* hif_pci_enable_power_management() - enable power management
|
||||
* @hif_sc: hif context
|
||||
* @is_packet_log_enabled:
|
||||
*
|
||||
* Enables runtime pm, aspm(PCI.. hif_enable_power_gating) and re-enabling
|
||||
* soc-sleep after driver load (hif_pci_target_sleep_state_adjust).
|
||||
@@ -1095,7 +1098,7 @@ void hif_pci_enable_power_management(struct hif_softc *hif_sc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_disable_power_management() - disable power management
|
||||
* hif_pci_disable_power_management() - disable power management
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Currently disables runtime pm. Should be updated to behave
|
||||
@@ -1140,8 +1143,8 @@ void hif_pci_clear_stats(struct hif_softc *hif_ctx)
|
||||
|
||||
#define ATH_PCI_PROBE_RETRY_MAX 3
|
||||
/**
|
||||
* hif_bus_open(): hif_bus_open
|
||||
* @scn: scn
|
||||
* hif_pci_open(): hif_bus_open
|
||||
* @hif_ctx: scn
|
||||
* @bus_type: bus type
|
||||
*
|
||||
* Return: n/a
|
||||
@@ -1672,7 +1675,7 @@ done:
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_configure() - configure the pcie bus
|
||||
* hif_pci_bus_configure() - configure the pcie bus
|
||||
* @hif_sc: pointer to the hif context.
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
@@ -1788,7 +1791,8 @@ timer_free:
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_close(): hif_bus_close
|
||||
* hif_pci_close(): hif_bus_close
|
||||
* @hif_sc: HIF context
|
||||
*
|
||||
* Return: n/a
|
||||
*/
|
||||
@@ -2153,12 +2157,11 @@ void hif_pci_deconfigure_grp_irq(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_nointrs(): disable IRQ
|
||||
* hif_pci_nointrs(): disable IRQ
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function stops interrupt(s)
|
||||
*
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hif_pci_nointrs(struct hif_softc *scn)
|
||||
@@ -2206,12 +2209,11 @@ bool hif_pci_default_link_up(struct hif_target_info *tgt_info)
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* hif_disable_bus(): hif_disable_bus
|
||||
* hif_pci_disable_bus(): hif_disable_bus
|
||||
* @scn: hif context
|
||||
*
|
||||
* This function disables the bus
|
||||
*
|
||||
* @bdev: bus dev
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hif_pci_disable_bus(struct hif_softc *scn)
|
||||
@@ -2267,6 +2269,7 @@ void hif_pci_disable_bus(struct hif_softc *scn)
|
||||
#ifdef CONFIG_PLD_PCIE_CNSS
|
||||
/**
|
||||
* hif_pci_prevent_linkdown(): allow or permit linkdown
|
||||
* @scn: hif context
|
||||
* @flag: true prevents linkdown, false allows
|
||||
*
|
||||
* Calls into the platform driver to vote against taking down the
|
||||
@@ -2293,8 +2296,9 @@ void hif_pci_prevent_linkdown(struct hif_softc *scn, bool flag)
|
||||
|
||||
#ifdef CONFIG_PCI_LOW_POWER_INT_REG
|
||||
/**
|
||||
* hif_pci_config_low_power_int_register(): configure pci low power
|
||||
* interrupt register.
|
||||
* hif_pci_config_low_power_int_register() - configure pci low power
|
||||
* interrupt register.
|
||||
* @scn: hif context
|
||||
* @enable: true to enable the bits, false clear.
|
||||
*
|
||||
* Configure the bits INTR_L1SS and INTR_CLKPM of
|
||||
@@ -2352,6 +2356,7 @@ static inline void hif_pci_config_low_power_int_register(struct hif_softc *scn,
|
||||
|
||||
/**
|
||||
* hif_pci_bus_suspend(): prepare hif for suspend
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: Errno
|
||||
*/
|
||||
@@ -2477,6 +2482,7 @@ bool hif_log_pcie_info(struct hif_softc *scn, uint8_t *data,
|
||||
|
||||
/**
|
||||
* hif_pci_bus_resume(): prepare hif for resume
|
||||
* @scn: hif context
|
||||
*
|
||||
* Return: Errno
|
||||
*/
|
||||
@@ -2675,8 +2681,9 @@ static int hif_log_soc_wakeup_timeout(struct hif_pci_softc *sc)
|
||||
*
|
||||
* Note: parameter wait_for_it has meaning only when waking (when sleep_ok==0).
|
||||
*/
|
||||
|
||||
/**
|
||||
* hif_target_sleep_state_adjust() - on-demand sleep/wake
|
||||
* hif_pci_target_sleep_state_adjust() - on-demand sleep/wake
|
||||
* @scn: hif_softc pointer.
|
||||
* @sleep_ok: bool
|
||||
* @wait_for_it: bool
|
||||
@@ -3528,12 +3535,10 @@ void hif_pci_reg_write32(struct hif_softc *hif_sc,
|
||||
|
||||
/**
|
||||
* hif_configure_irq() - configure interrupt
|
||||
* @scn: HIF context
|
||||
*
|
||||
* This function configures interrupt(s)
|
||||
*
|
||||
* @sc: PCIe control struct
|
||||
* @hif_hdl: struct HIF_CE_state
|
||||
*
|
||||
* Return: 0 - for success
|
||||
*/
|
||||
int hif_configure_irq(struct hif_softc *scn)
|
||||
@@ -3767,15 +3772,15 @@ static void hif_pci_init_reg_windowing_support(struct hif_pci_softc *sc,
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hif_enable_bus(): enable bus
|
||||
*
|
||||
* This function enables the bus
|
||||
*
|
||||
* hif_pci_enable_bus(): enable bus
|
||||
* @ol_sc: soft_sc struct
|
||||
* @dev: device pointer
|
||||
* @bdev: bus dev pointer
|
||||
* bid: bus id pointer
|
||||
* type: enum hif_enable_type such as HIF_ENABLE_TYPE_PROBE
|
||||
* @bid: bus id pointer
|
||||
* @type: enum hif_enable_type such as HIF_ENABLE_TYPE_PROBE
|
||||
*
|
||||
* This function enables the bus
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_pci_enable_bus(struct hif_softc *ol_sc,
|
||||
@@ -4007,7 +4012,7 @@ bool hif_pci_needs_bmi(struct hif_softc *scn)
|
||||
#ifdef FORCE_WAKE
|
||||
#if defined(DEVICE_FORCE_WAKE_ENABLE) && !defined(CONFIG_PLD_PCIE_FW_SIM)
|
||||
|
||||
/**
|
||||
/*
|
||||
* HIF_POLL_UMAC_WAKE poll value to indicate if UMAC is powered up
|
||||
* Update the below macro with FW defined one.
|
||||
*/
|
||||
|
@@ -71,13 +71,16 @@ struct hang_event_bus_info {
|
||||
uint16_t dev_id;
|
||||
} qdf_packed;
|
||||
|
||||
/**
|
||||
/*
|
||||
* struct hif_msi_info - Structure to hold msi info
|
||||
* @magic: cookie
|
||||
* @magic_da: dma address
|
||||
* @dmaContext: dma address
|
||||
* @dmacontext: dma address
|
||||
*
|
||||
* Structure to hold MSI information for PCIe interrupts
|
||||
*
|
||||
* NB: Intentionally not using kernel-doc comment since the kernel-doc
|
||||
* script doesn't handle the OS_DMA_MEM_CONTEXT() macro
|
||||
*/
|
||||
struct hif_msi_info {
|
||||
void *magic;
|
||||
@@ -93,6 +96,7 @@ struct hif_msi_info {
|
||||
* @soc_force_wake_register_write_success: write to soc wake
|
||||
* @soc_force_wake_failure: soc force wake failure
|
||||
* @soc_force_wake_success: soc force wake success
|
||||
* @mhi_force_wake_release_failure: mhi force wake release failure
|
||||
* @mhi_force_wake_release_success: mhi force wake release success
|
||||
* @soc_force_wake_release_success: soc force wake release
|
||||
*/
|
||||
@@ -200,7 +204,7 @@ int hif_pci_addr_in_boundary(struct hif_softc *scn, uint32_t offset);
|
||||
#ifdef FORCE_WAKE
|
||||
/**
|
||||
* hif_print_pci_stats() - Display HIF PCI stats
|
||||
* @hif_ctx - HIF pci handle
|
||||
* @pci_scn: HIF pci handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -37,7 +38,8 @@ static uint32_t *p_bmi_cmd_credits = &command_credits;
|
||||
|
||||
/**
|
||||
* hif_bmi_buffer_send - call to send bmi buffer
|
||||
* @device: hif context
|
||||
* @scn: hif context
|
||||
* @device: hif SDIO device
|
||||
* @buffer: buffer
|
||||
* @length: length
|
||||
*
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -34,8 +35,8 @@
|
||||
#define WORD_NON_ALIGNMENT_MASK 0x03
|
||||
|
||||
/**
|
||||
* hif_ar6000_set_address_window_register - set the window address register
|
||||
* (using 4-byte register access).
|
||||
* hif_ar6000_set_address_window_register() - set the window address register
|
||||
* (using 4-byte register access).
|
||||
* @hif_device: hif context
|
||||
* @register_addr: register address
|
||||
* @addr: addr
|
||||
@@ -74,7 +75,7 @@ QDF_STATUS hif_ar6000_set_address_window_register(
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_diag_read_access - Read from the AR6000 through its diagnostic window.
|
||||
* hif_diag_read_access() - Read from the AR6000 through its diagnostic window.
|
||||
* @hif_ctx: hif context
|
||||
* @address: address
|
||||
* @data: data
|
||||
@@ -123,7 +124,7 @@ QDF_STATUS hif_diag_read_access(struct hif_opaque_softc *hif_ctx,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_diag_write_access - Write to the AR6000 through its diagnostic window.
|
||||
* hif_diag_write_access() - Write to the AR6000 through its diagnostic window.
|
||||
* @hif_ctx: hif context
|
||||
* @address: address
|
||||
* @data: data
|
||||
@@ -168,8 +169,8 @@ QDF_STATUS hif_diag_write_access(struct hif_opaque_softc *hif_ctx,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_diag_write_mem - Write a block data to the AR6000 through its diagnostic
|
||||
* window.
|
||||
* hif_diag_write_mem() - Write a block data to the AR6000 through its
|
||||
* diagnostic window.
|
||||
* @scn: hif context
|
||||
* @address: address
|
||||
* @data: data
|
||||
@@ -212,9 +213,10 @@ QDF_STATUS hif_diag_write_mem(struct hif_opaque_softc *scn, uint32_t address,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_diag_read_mem - Read a block data to the AR6000 through its diagnostic
|
||||
* window.
|
||||
* hif_diag_read_mem() - Read a block data to the AR6000 through its diagnostic
|
||||
* window.
|
||||
* @scn: hif context
|
||||
* @address: target address
|
||||
* @data: data
|
||||
* @nbytes: nbytes
|
||||
*
|
||||
@@ -258,7 +260,7 @@ QDF_STATUS hif_diag_read_mem(struct hif_opaque_softc *scn,
|
||||
qdf_export_symbol(hif_diag_read_mem);
|
||||
|
||||
/**
|
||||
* hif_ar6k_read_target_register - call to read target register values
|
||||
* hif_ar6k_read_target_register() - call to read target register values
|
||||
* @hif_device: hif context
|
||||
* @regsel: register selection
|
||||
* @regval: reg value
|
||||
@@ -303,7 +305,7 @@ static QDF_STATUS hif_ar6k_read_target_register(struct hif_sdio_dev *hif_device,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_ar6k_fetch_target_regs - call to fetch target reg values
|
||||
* hif_ar6k_fetch_target_regs() - call to fetch target reg values
|
||||
* @hif_device: hif context
|
||||
* @targregs: target regs
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -107,6 +107,11 @@ void hif_sdio_stop(struct hif_softc *hif_ctx)
|
||||
/**
|
||||
* hif_send_head() - send data on hif bus interface.
|
||||
* @hif_ctx: HIF context
|
||||
* @pipe:
|
||||
* @transfer_id:
|
||||
* @nbytes:
|
||||
* @buf:
|
||||
* @data_attr:
|
||||
*
|
||||
* send tx data on a given pipe id
|
||||
*
|
||||
@@ -127,12 +132,12 @@ QDF_STATUS hif_send_head(struct hif_opaque_softc *hif_ctx, uint8_t pipe,
|
||||
|
||||
/**
|
||||
* hif_map_service_to_pipe() - maps ul/dl pipe to service id.
|
||||
* @hif_ctx: HIF hdl
|
||||
* @ServiceId: service index
|
||||
* @hif_hdl: HIF hdl
|
||||
* @service_id: service index
|
||||
* @ul_pipe: uplink pipe id
|
||||
* @dl_pipe: down-linklink pipe id
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
* @dl_is_polled: if dl is polling based
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -42,7 +43,7 @@
|
||||
|
||||
/**
|
||||
* hif_dev_alloc_rx_buffer() - allocate rx buffer.
|
||||
* @pDev: sdio device context
|
||||
* @pdev: sdio device context
|
||||
*
|
||||
*
|
||||
* Return: htc buffer pointer
|
||||
@@ -114,7 +115,7 @@ struct hif_sdio_device *hif_dev_create(struct hif_sdio_dev *hif_device,
|
||||
|
||||
/**
|
||||
* hif_dev_destroy() - destroy hif device.
|
||||
* @pDev: sdio device context
|
||||
* @pdev: sdio device context
|
||||
*
|
||||
*
|
||||
* Return: none
|
||||
@@ -134,7 +135,7 @@ void hif_dev_destroy(struct hif_sdio_device *pdev)
|
||||
|
||||
/**
|
||||
* hif_dev_from_hif() - get sdio device from hif device.
|
||||
* @pDev: hif device context
|
||||
* @hif_device: hif device context
|
||||
*
|
||||
*
|
||||
* Return: hif sdio device context
|
||||
@@ -156,7 +157,7 @@ struct hif_sdio_device *hif_dev_from_hif(struct hif_sdio_dev *hif_device)
|
||||
|
||||
/**
|
||||
* hif_dev_disable_interrupts() - disable hif device interrupts.
|
||||
* @pDev: sdio device context
|
||||
* @pdev: sdio device context
|
||||
*
|
||||
*
|
||||
* Return: int
|
||||
@@ -178,7 +179,7 @@ QDF_STATUS hif_dev_disable_interrupts(struct hif_sdio_device *pdev)
|
||||
|
||||
/**
|
||||
* hif_dev_enable_interrupts() - enables hif device interrupts.
|
||||
* @pDev: sdio device context
|
||||
* @pdev: sdio device context
|
||||
*
|
||||
*
|
||||
* Return: int
|
||||
@@ -210,7 +211,7 @@ QDF_STATUS hif_dev_enable_interrupts(struct hif_sdio_device *pdev)
|
||||
|
||||
/**
|
||||
* hif_dev_setup() - set up sdio device.
|
||||
* @pDev: sdio device context
|
||||
* @pdev: sdio device context
|
||||
*
|
||||
*
|
||||
* Return: int
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -62,6 +62,7 @@ struct ol_pl_os_dep_funcs *g_ol_pl_os_dep_funcs;
|
||||
|
||||
/**
|
||||
* hif_sdio_bus_suspend() - suspend the bus
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* This function suspends the bus, but sdio doesn't need to suspend.
|
||||
* Therefore do nothing.
|
||||
@@ -80,6 +81,7 @@ int hif_sdio_bus_suspend(struct hif_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_sdio_bus_resume() - hif resume API
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* This function resumes the bus. but sdio doesn't need to resume.
|
||||
* Therefore do nothing.
|
||||
@@ -98,6 +100,7 @@ int hif_sdio_bus_resume(struct hif_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_enable_power_gating() - enable HW power gating
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Return: n/a
|
||||
*/
|
||||
@@ -107,6 +110,7 @@ void hif_enable_power_gating(void *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_sdio_close() - hif_bus_close
|
||||
* @hif_sc: hif context
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
@@ -148,7 +152,7 @@ void hif_get_target_revision(struct hif_softc *ol_sc)
|
||||
|
||||
/**
|
||||
* hif_sdio_enable_bus() - hif_enable_bus
|
||||
* @hif_sc: hif context
|
||||
* @ol_sc: hif context
|
||||
* @dev: dev
|
||||
* @bdev: bus dev
|
||||
* @bid: bus id
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -91,7 +91,7 @@ MODULE_PARM_DESC(brokenirq,
|
||||
|
||||
#ifdef CONFIG_SDIO_TRANSFER_MAILBOX
|
||||
/**
|
||||
* hif_sdio_force_drive_strength() - Set SDIO drive strength
|
||||
* hif_sdio_quirk_force_drive_strength() - Set SDIO drive strength
|
||||
* @ol_sc: softc instance
|
||||
* @func: pointer to sdio_func
|
||||
*
|
||||
@@ -214,7 +214,7 @@ int hif_sdio_quirk_async_intr(struct hif_softc *ol_sc, struct sdio_func *func)
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* hif_sdio_force_drive_strength() - Set SDIO drive strength
|
||||
* hif_sdio_quirk_force_drive_strength() - Set SDIO drive strength
|
||||
* @ol_sc: softc instance
|
||||
* @func: pointer to sdio_func
|
||||
*
|
||||
@@ -595,6 +595,7 @@ void hif_un_mask_interrupt(struct hif_sdio_dev *device)
|
||||
* hif_sdio_func_disable() - Handle device enabling as per device
|
||||
* @device: HIF device object
|
||||
* @func: function pointer
|
||||
* @reset:
|
||||
*
|
||||
* Return success or failure
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -376,6 +376,7 @@ err_attach1:
|
||||
/**
|
||||
* power_state_change_notify() - SDIO bus power notification handler
|
||||
* @ol_sc: HIF device context
|
||||
* @device: SDIO device
|
||||
* @config: hif device power change type
|
||||
*
|
||||
* Return: 0 on success, error number otherwise.
|
||||
@@ -445,7 +446,7 @@ power_state_change_notify(struct hif_softc *ol_sc,
|
||||
* @device: pointer to hif device structure
|
||||
* @opcode: configuration type
|
||||
* @config: configuration value to set
|
||||
* @configLen: configuration length
|
||||
* @config_len: configuration length
|
||||
*
|
||||
* Return: 0 on success, error number otherwise.
|
||||
*/
|
||||
@@ -706,10 +707,10 @@ void hif_ack_interrupt(struct hif_sdio_dev *device)
|
||||
|
||||
/**
|
||||
* hif_sdio_configure_pipes - Configure pipes for the lower layer bus
|
||||
* @pdev - HIF layer object
|
||||
* @func - SDIO bus function object
|
||||
* @dev: HIF layer object
|
||||
* @func: SDIO bus function object
|
||||
*
|
||||
* Return - error in case of failure to configure, else success
|
||||
* Return: error in case of failure to configure, else success
|
||||
*/
|
||||
int hif_sdio_configure_pipes(struct hif_sdio_dev *dev, struct sdio_func *func)
|
||||
{
|
||||
@@ -745,7 +746,7 @@ struct bus_request *hif_allocate_bus_request(struct hif_sdio_dev *device)
|
||||
/**
|
||||
* hif_free_bus_request() - Free hif bus request
|
||||
* @device: pointer to struct hif_sdio_dev
|
||||
*
|
||||
* @busrequest: bus request
|
||||
*
|
||||
* Return: None.
|
||||
*/
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -237,12 +238,12 @@ QDF_STATUS do_hif_read_write_scatter(struct hif_sdio_dev *device,
|
||||
}
|
||||
|
||||
/**
|
||||
* alloc_scatter_req() - callback to issue a read-write
|
||||
* hif_read_write_scatter() - callback to issue a read-write
|
||||
* scatter request.
|
||||
* @device: hif device context
|
||||
* @pReq: rd/wr scatter request
|
||||
* @req: rd/wr scatter request
|
||||
*
|
||||
* Return: int
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS hif_read_write_scatter(struct hif_sdio_dev *device,
|
||||
struct _HIF_SCATTER_REQ *req)
|
||||
@@ -343,7 +344,7 @@ static QDF_STATUS hif_read_write_scatter(struct hif_sdio_dev *device,
|
||||
* setup_hif_scatter_support() - setup of HIF scatter resources
|
||||
* scatter request.
|
||||
* @device: hif device context
|
||||
* @pInfo: scatter info
|
||||
* @info: scatter info
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -27,6 +27,7 @@
|
||||
* hif_dev_get_fifo_address() - get the fifo addresses for dma
|
||||
* @pdev: SDIO HIF object
|
||||
* @c : FIFO address config pointer
|
||||
* @config_len: config length
|
||||
*
|
||||
* Return : 0 for success, non-zero for error
|
||||
*/
|
||||
@@ -63,8 +64,9 @@ int hif_dev_configure_pipes(struct hif_sdio_dev *pdev, struct sdio_func *func)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** hif_dev_set_mailbox_swap() - Set the mailbox swap
|
||||
* @pdev : The HIF layer object
|
||||
/**
|
||||
* hif_dev_set_mailbox_swap() - Set the mailbox swap
|
||||
* @pdev: The HIF layer object
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -73,8 +75,9 @@ void hif_dev_set_mailbox_swap(struct hif_sdio_dev *pdev)
|
||||
/* SDIO AL doesn't use mailbox architecture */
|
||||
}
|
||||
|
||||
/** hif_dev_get_mailbox_swap() - Get the mailbox swap setting
|
||||
* @pdev : The HIF layer object
|
||||
/**
|
||||
* hif_dev_get_mailbox_swap() - Get the mailbox swap setting
|
||||
* @pdev: The HIF layer object
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
@@ -86,7 +89,6 @@ bool hif_dev_get_mailbox_swap(struct hif_sdio_dev *pdev)
|
||||
|
||||
/**
|
||||
* hif_dev_dsr_handler() - Synchronous interrupt handler
|
||||
*
|
||||
* @context: hif send context
|
||||
*
|
||||
* Return: 0 for success and non-zero for failure
|
||||
@@ -99,10 +101,10 @@ QDF_STATUS hif_dev_dsr_handler(void *context)
|
||||
|
||||
/**
|
||||
* hif_dev_map_service_to_pipe() - maps ul/dl pipe to service id.
|
||||
* @pDev: SDIO HIF object
|
||||
* @ServiceId: service index
|
||||
* @ULPipe: uplink pipe id
|
||||
* @DLPipe: down-linklink pipe id
|
||||
* @pdev: SDIO HIF object
|
||||
* @svc: service index
|
||||
* @ul_pipe: uplink pipe id
|
||||
* @dl_pipe: down-linklink pipe id
|
||||
*
|
||||
* Return: 0 on success, error value on invalid map
|
||||
*/
|
||||
@@ -145,10 +147,10 @@ QDF_STATUS hif_dev_map_service_to_pipe(struct hif_sdio_dev *pdev, uint16_t svc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_configure() - configure the bus
|
||||
* hif_sdio_bus_configure() - configure the bus
|
||||
* @hif_sc: pointer to the hif context.
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
* Return: 0 for success. nonzero for failure.
|
||||
*/
|
||||
int hif_sdio_bus_configure(struct hif_softc *hif_sc)
|
||||
{
|
||||
@@ -168,7 +170,8 @@ int hif_sdio_bus_configure(struct hif_softc *hif_sc)
|
||||
return pld_wlan_enable(hif_sc->qdf_dev->dev, &cfg, mode);
|
||||
}
|
||||
|
||||
/** hif_dev_setup_device() - Setup device specific stuff here required for hif
|
||||
/**
|
||||
* hif_dev_setup_device() - Setup device specific stuff here required for hif
|
||||
* @pdev : HIF layer object
|
||||
*
|
||||
* return 0 on success, error otherwise
|
||||
@@ -180,8 +183,9 @@ int hif_dev_setup_device(struct hif_sdio_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** hif_dev_mask_interrupts() - Disable the interrupts in the device
|
||||
* @pdev SDIO HIF Object
|
||||
/**
|
||||
* hif_dev_mask_interrupts() - Disable the interrupts in the device
|
||||
* @pdev: SDIO HIF Object
|
||||
*
|
||||
* Return: NONE
|
||||
*/
|
||||
@@ -190,8 +194,9 @@ void hif_dev_mask_interrupts(struct hif_sdio_device *pdev)
|
||||
/* SDIO AL Handles Interrupts */
|
||||
}
|
||||
|
||||
/** hif_dev_unmask_interrupts() - Enable the interrupts in the device
|
||||
* @pdev SDIO HIF Object
|
||||
/**
|
||||
* hif_dev_unmask_interrupts() - Enable the interrupts in the device
|
||||
* @pdev: SDIO HIF Object
|
||||
*
|
||||
* Return: NONE
|
||||
*/
|
||||
@@ -202,7 +207,7 @@ void hif_dev_unmask_interrupts(struct hif_sdio_device *pdev)
|
||||
|
||||
/**
|
||||
* hif_dev_map_pipe_to_adma_chan() - maps pipe id to adma chan
|
||||
* @pdev: The pointer to the hif device object
|
||||
* @dev: The pointer to the hif device object
|
||||
* @pipeid: pipe index
|
||||
*
|
||||
* Return: adma channel handle
|
||||
@@ -250,6 +255,7 @@ uint8_t hif_dev_map_adma_chan_to_pipe(struct hif_sdio_device *pdev,
|
||||
* hif_get_send_address() - Get the transfer pipe address
|
||||
* @pdev: The pointer to the hif device object
|
||||
* @pipe: The pipe identifier
|
||||
* @addr: returned pipe address
|
||||
*
|
||||
* Return 0 for success and non-zero for failure to map
|
||||
*/
|
||||
@@ -275,6 +281,7 @@ int hif_get_send_address(struct hif_sdio_device *pdev,
|
||||
/**
|
||||
* hif_fixup_write_param() - Tweak the address and length parameters
|
||||
* @pdev: The pointer to the hif device object
|
||||
* @req:
|
||||
* @length: The length pointer
|
||||
* @addr: The addr pointer
|
||||
*
|
||||
@@ -335,7 +342,7 @@ QDF_STATUS hif_disable_func(struct hif_sdio_dev *device,
|
||||
*
|
||||
* @ol_sc: HIF object pointer
|
||||
* @device: HIF device pointer
|
||||
* @sdio_func: SDIO function pointer
|
||||
* @func: SDIO function pointer
|
||||
* @resume: If this is called from resume or probe
|
||||
*
|
||||
* Return: 0 in case of success, else error value
|
||||
@@ -367,10 +374,11 @@ QDF_STATUS hif_enable_func(struct hif_softc *ol_sc, struct hif_sdio_dev *device,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_sdio_get_net_buf() - Get a network buffer from the rx q
|
||||
* @dev - HIF device object
|
||||
* hif_sdio_get_nbuf() - Get a network buffer from the rx q
|
||||
* @dev: HIF device object
|
||||
* @buf_len: buffer length
|
||||
*
|
||||
* Return - NULL if out of buffers, else qdf_nbuf_t
|
||||
* Return: NULL if out of buffers, else qdf_nbuf_t
|
||||
*/
|
||||
#if HIF_MAX_RX_Q_ALLOC
|
||||
static qdf_nbuf_t hif_sdio_get_nbuf(struct hif_sdio_dev *dev, uint16_t buf_len)
|
||||
@@ -418,7 +426,7 @@ static qdf_nbuf_t hif_sdio_get_nbuf(struct hif_sdio_dev *dev, uint16_t buf_len)
|
||||
#endif
|
||||
/**
|
||||
* hif_sdio_rx_q_alloc() - Deferred work for pre-alloc rx q
|
||||
* @ctx - Pointer to context object
|
||||
* @ctx: Pointer to context object
|
||||
*
|
||||
* Return NONE
|
||||
*/
|
||||
@@ -560,8 +568,8 @@ void hif_dev_unregister_channels(struct hif_sdio_dev *dev,
|
||||
/**
|
||||
* hif_read_write() - queue a read/write request
|
||||
* @dev: pointer to hif device structure
|
||||
* @address: address to read, actually channel pointer
|
||||
* @buffer: buffer to hold read/write data
|
||||
* @sdio_al_ch_handle: address to read, actually channel pointer
|
||||
* @cbuffer: buffer to hold read/write data
|
||||
* @length: length to read/write
|
||||
* @request: read/write/sync/async request
|
||||
* @context: pointer to hold calling context
|
||||
@@ -667,7 +675,7 @@ hif_read_write(struct hif_sdio_dev *dev,
|
||||
* ul_xfer_cb() - Completion call back for asynchronous transfer
|
||||
* @ch_handle: The sdio al channel handle
|
||||
* @result: The result of the operation
|
||||
* @context: pointer to request context
|
||||
* @ctx: pointer to request context
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -236,6 +236,7 @@ bool hif_dev_get_mailbox_swap(struct hif_sdio_dev *pdev)
|
||||
* hif_dev_get_fifo_address() - get the fifo addresses for dma
|
||||
* @pdev: SDIO HIF object
|
||||
* @config: mbox address config pointer
|
||||
* @config_len: config length
|
||||
*
|
||||
* Return : 0 for success, non-zero for error
|
||||
*/
|
||||
@@ -275,10 +276,10 @@ void hif_dev_get_block_size(void *config)
|
||||
|
||||
/**
|
||||
* hif_dev_map_service_to_pipe() - maps ul/dl pipe to service id.
|
||||
* @pDev: SDIO HIF object
|
||||
* @ServiceId: service index
|
||||
* @ULPipe: uplink pipe id
|
||||
* @DLPipe: down-linklink pipe id
|
||||
* @pdev: SDIO HIF object
|
||||
* @svc: service index
|
||||
* @ul_pipe: uplink pipe id
|
||||
* @dl_pipe: down-linklink pipe id
|
||||
*
|
||||
* Return: 0 on success, error value on invalid map
|
||||
*/
|
||||
@@ -524,7 +525,7 @@ static uint8_t hif_dev_map_pipe_to_mail_box(struct hif_sdio_device *pdev,
|
||||
/**
|
||||
* hif_dev_map_mail_box_to_pipe() - map sdio mailbox to htc pipe.
|
||||
* @pdev: The pointer to the hif device object
|
||||
* @mboxIndex: mailbox index
|
||||
* @mbox_index: mailbox index
|
||||
* @upload: boolean to decide mailbox index
|
||||
*
|
||||
* Return: Invalid pipe index
|
||||
@@ -546,9 +547,10 @@ static uint8_t hif_dev_map_mail_box_to_pipe(struct hif_sdio_device *pdev,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_get_send_addr() - Get the transfer pipe address
|
||||
* hif_get_send_address() - Get the transfer pipe address
|
||||
* @pdev: The pointer to the hif device object
|
||||
* @pipe: The pipe identifier
|
||||
* @addr:
|
||||
*
|
||||
* Return 0 for success and non-zero for failure to map
|
||||
*/
|
||||
@@ -573,6 +575,7 @@ int hif_get_send_address(struct hif_sdio_device *pdev,
|
||||
/**
|
||||
* hif_fixup_write_param() - Tweak the address and length parameters
|
||||
* @pdev: The pointer to the hif device object
|
||||
* @req:
|
||||
* @length: The length pointer
|
||||
* @addr: The addr pointer
|
||||
*
|
||||
@@ -1026,7 +1029,7 @@ QDF_STATUS hif_dev_recv_message_pending_handler(struct hif_sdio_device *pdev,
|
||||
* hif_dev_service_cpu_interrupt() - service fatal interrupts
|
||||
* synchronously
|
||||
*
|
||||
* @pDev: hif sdio device context
|
||||
* @pdev: hif sdio device context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
*/
|
||||
@@ -1085,7 +1088,7 @@ static QDF_STATUS hif_dev_service_cpu_interrupt(struct hif_sdio_device *pdev)
|
||||
* hif_dev_service_error_interrupt() - service error interrupts
|
||||
* synchronously
|
||||
*
|
||||
* @pDev: hif sdio device context
|
||||
* @pdev: hif sdio device context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
*/
|
||||
@@ -1135,7 +1138,7 @@ static QDF_STATUS hif_dev_service_error_interrupt(struct hif_sdio_device *pdev)
|
||||
* hif_dev_service_debug_interrupt() - service debug interrupts
|
||||
* synchronously
|
||||
*
|
||||
* @pDev: hif sdio device context
|
||||
* @pdev: hif sdio device context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
*/
|
||||
@@ -1161,9 +1164,8 @@ static QDF_STATUS hif_dev_service_debug_interrupt(struct hif_sdio_device *pdev)
|
||||
|
||||
/**
|
||||
* hif_dev_service_counter_interrupt() - service counter interrupts
|
||||
* synchronously
|
||||
*
|
||||
* @pDev: hif sdio device context
|
||||
* synchronously
|
||||
* @pdev: hif sdio device context
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
*/
|
||||
@@ -1196,9 +1198,9 @@ QDF_STATUS hif_dev_service_counter_interrupt(struct hif_sdio_device *pdev)
|
||||
mboxProcRegs(pdev).rx_lookahead[MAILBOX_LOOKAHEAD_SIZE_IN_WORD * i]
|
||||
/**
|
||||
* hif_dev_process_pending_irqs() - process pending interrupts
|
||||
* @pDev: hif sdio device context
|
||||
* @pDone: pending irq completion status
|
||||
* @pASyncProcessing: sync/async processing flag
|
||||
* @pdev: hif sdio device context
|
||||
* @done: pending irq completion status
|
||||
* @async_processing: sync/async processing flag
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
*/
|
||||
@@ -1570,7 +1572,7 @@ hif_read_write(struct hif_sdio_dev *device,
|
||||
|
||||
/**
|
||||
* hif_sdio_func_enable() - Handle device enabling as per device
|
||||
* @device: HIF device object
|
||||
* @ol_sc: HIF device object
|
||||
* @func: function pointer
|
||||
*
|
||||
* Return QDF_STATUS
|
||||
@@ -1943,7 +1945,7 @@ QDF_STATUS hif_disable_func(struct hif_sdio_dev *device,
|
||||
*
|
||||
* @ol_sc: HIF object pointer
|
||||
* @device: HIF device pointer
|
||||
* @sdio_func: SDIO function pointer
|
||||
* @func: SDIO function pointer
|
||||
* @resume: If this is called from resume or probe
|
||||
*
|
||||
* Return: 0 in case of success, else error value
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -45,7 +44,7 @@
|
||||
/**
|
||||
* hif_dev_rw_completion_handler() - Completion routine
|
||||
* for ALL HIF layer async I/O
|
||||
* @context: hif send context
|
||||
* @ctx: hif send context
|
||||
* @status: completion routine sync/async context
|
||||
*
|
||||
* Return: 0 for success and non-zero for failure
|
||||
@@ -76,7 +75,7 @@ QDF_STATUS hif_dev_rw_completion_handler(void *ctx, QDF_STATUS status)
|
||||
|
||||
/**
|
||||
* hif_dev_send_buffer() - send buffer to sdio device
|
||||
* @pDev: HIf device object
|
||||
* @pdev: HIf device object
|
||||
* @xfer_id: transfer id
|
||||
* @pipe: ul/dl pipe
|
||||
* @nbytes: no of bytes to transfer
|
||||
@@ -700,7 +699,7 @@ QDF_STATUS hif_dev_process_recv_header(struct hif_sdio_device *pdev,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dev_free_recv_pkt() - Free the allocated recv packets in the queue
|
||||
* hif_dev_free_recv_pkt_queue() - Free the allocated recv packets in the queue
|
||||
* @recv_pkt_queue : The queue that contains the packets to be queued
|
||||
*
|
||||
* Return : NONE
|
||||
|
@@ -109,12 +109,13 @@ const char *ic_irqname[HIF_IC_MAX_IRQ] = {
|
||||
"umac_reset"
|
||||
};
|
||||
|
||||
/** hif_ahb_get_irq_name() - get irqname
|
||||
/**
|
||||
* hif_ahb_get_irq_name() - get irqname
|
||||
* @irq_no: irq number
|
||||
*
|
||||
* This function gives irqnumber to irqname
|
||||
* mapping.
|
||||
*
|
||||
* @irq_no: irq number
|
||||
*
|
||||
* Return: irq name
|
||||
*/
|
||||
const char *hif_ahb_get_irq_name(int irq_no)
|
||||
@@ -123,12 +124,11 @@ const char *hif_ahb_get_irq_name(int irq_no)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_disable_isr() - disable isr
|
||||
* hif_ahb_disable_isr() - disable isr
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function disables isr and kills tasklets
|
||||
*
|
||||
* @hif_ctx: struct hif_softc
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void hif_ahb_disable_isr(struct hif_softc *scn)
|
||||
@@ -143,8 +143,8 @@ void hif_ahb_disable_isr(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dump_registers() - dump bus debug registers
|
||||
* @scn: struct hif_opaque_softc
|
||||
* hif_ahb_dump_registers() - dump bus debug registers
|
||||
* @hif_ctx: struct hif_opaque_softc
|
||||
*
|
||||
* This function dumps hif bus debug registers
|
||||
*
|
||||
@@ -177,13 +177,13 @@ void hif_ahb_close(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_open() - hif_ahb open
|
||||
* hif_ahb_open() - hif_ahb open
|
||||
* @hif_ctx: hif context
|
||||
* @bus_type: bus type
|
||||
*
|
||||
* This is a callback function for hif_bus_open.
|
||||
*
|
||||
* Return: n/a
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_ahb_open(struct hif_softc *hif_ctx, enum qdf_bus_type bus_type)
|
||||
{
|
||||
@@ -195,12 +195,12 @@ QDF_STATUS hif_ahb_open(struct hif_softc *hif_ctx, enum qdf_bus_type bus_type)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_configure() - Configure the bus
|
||||
* hif_ahb_bus_configure() - Configure the bus
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* This function configure the ahb bus
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
* Return: 0 for success. nonzero for failure.
|
||||
*/
|
||||
int hif_ahb_bus_configure(struct hif_softc *scn)
|
||||
{
|
||||
@@ -382,7 +382,7 @@ irqreturn_t hif_ahb_interrupt_handler(int irq, void *context)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_disable_bus() - Disable the bus
|
||||
* hif_ahb_disable_bus() - Disable the bus
|
||||
* @scn : pointer to the hif context
|
||||
*
|
||||
* This function disables the bus and helds the target in reset state
|
||||
@@ -444,7 +444,8 @@ void hif_ahb_disable_bus(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_enable_bus() - Enable the bus
|
||||
* hif_ahb_enable_bus() - Enable the bus
|
||||
* @ol_sc: HIF context
|
||||
* @dev: dev
|
||||
* @bdev: bus dev
|
||||
* @bid: bus id
|
||||
@@ -610,7 +611,7 @@ err_cleanup1:
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_nointrs() - disable IRQ
|
||||
* hif_ahb_nointrs() - disable IRQ
|
||||
*
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
@@ -660,7 +661,7 @@ void hif_ahb_nointrs(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* ce_irq_enable() - enable copy engine IRQ
|
||||
* hif_ahb_irq_enable() - enable copy engine IRQ
|
||||
* @scn: struct hif_softc
|
||||
* @ce_id: ce_id
|
||||
*
|
||||
@@ -716,7 +717,7 @@ void hif_ahb_irq_enable(struct hif_softc *scn, int ce_id)
|
||||
}
|
||||
|
||||
/**
|
||||
* ce_irq_disable() - disable copy engine IRQ
|
||||
* hif_ahb_irq_disable() - disable copy engine IRQ
|
||||
* @scn: struct hif_softc
|
||||
* @ce_id: ce_id
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -40,12 +40,11 @@
|
||||
#include "target_type.h"
|
||||
|
||||
/**
|
||||
* hif_disable_isr(): disable isr
|
||||
* hif_snoc_disable_isr(): disable isr
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function disables isr and kills tasklets
|
||||
*
|
||||
* @hif_ctx: struct hif_softc
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void hif_snoc_disable_isr(struct hif_softc *scn)
|
||||
@@ -58,7 +57,7 @@ void hif_snoc_disable_isr(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_dump_registers(): dump bus debug registers
|
||||
* hif_snoc_dump_registers(): dump bus debug registers
|
||||
* @hif_ctx: struct hif_opaque_softc
|
||||
*
|
||||
* This function dumps hif bus debug registers
|
||||
@@ -99,6 +98,7 @@ void hif_snoc_clear_stats(struct hif_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_snoc_close(): hif_bus_close
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* Return: n/a
|
||||
*/
|
||||
@@ -108,11 +108,11 @@ void hif_snoc_close(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_open(): hif_bus_open
|
||||
* hif_snoc_open(): hif_bus_open
|
||||
* @hif_ctx: hif context
|
||||
* @bus_type: bus type
|
||||
*
|
||||
* Return: n/a
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_snoc_open(struct hif_softc *hif_ctx, enum qdf_bus_type bus_type)
|
||||
{
|
||||
@@ -121,11 +121,12 @@ QDF_STATUS hif_snoc_open(struct hif_softc *hif_ctx, enum qdf_bus_type bus_type)
|
||||
|
||||
/**
|
||||
* hif_snoc_get_soc_info() - populates scn with hw info
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* fills in the virtual and physical base address as well as
|
||||
* soc version info.
|
||||
*
|
||||
* return 0 or QDF_STATUS_E_FAILURE
|
||||
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
|
||||
*/
|
||||
static QDF_STATUS hif_snoc_get_soc_info(struct hif_softc *scn)
|
||||
{
|
||||
@@ -150,7 +151,7 @@ static QDF_STATUS hif_snoc_get_soc_info(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_configure() - configure the snoc bus
|
||||
* hif_snoc_bus_configure() - configure the snoc bus
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
@@ -251,7 +252,8 @@ static int hif_set_dma_coherent_mask(qdf_device_t osdev)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hif_enable_bus(): hif_enable_bus
|
||||
* hif_snoc_enable_bus(): hif_enable_bus
|
||||
* @ol_sc: HIF context
|
||||
* @dev: dev
|
||||
* @bdev: bus dev
|
||||
* @bid: bus id
|
||||
@@ -309,12 +311,11 @@ QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_disable_bus(): hif_disable_bus
|
||||
* hif_snoc_disable_bus(): hif_disable_bus
|
||||
* @scn: HIF context
|
||||
*
|
||||
* This function disables the bus
|
||||
*
|
||||
* @bdev: bus dev
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hif_snoc_disable_bus(struct hif_softc *scn)
|
||||
@@ -329,12 +330,11 @@ void hif_snoc_disable_bus(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_nointrs(): disable IRQ
|
||||
* hif_snoc_nointrs(): disable IRQ
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* This function stops interrupt(s)
|
||||
*
|
||||
* @scn: struct hif_softc
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hif_snoc_nointrs(struct hif_softc *scn)
|
||||
@@ -346,7 +346,7 @@ void hif_snoc_nointrs(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* ce_irq_enable() - enable copy engine IRQ
|
||||
* hif_snoc_irq_enable() - enable copy engine IRQ
|
||||
* @scn: struct hif_softc
|
||||
* @ce_id: ce_id
|
||||
*
|
||||
@@ -359,7 +359,7 @@ void hif_snoc_irq_enable(struct hif_softc *scn,
|
||||
}
|
||||
|
||||
/**
|
||||
* ce_irq_disable() - disable copy engine IRQ
|
||||
* hif_snoc_irq_disable() - disable copy engine IRQ
|
||||
* @scn: struct hif_softc
|
||||
* @ce_id: ce_id
|
||||
*
|
||||
@@ -370,9 +370,10 @@ void hif_snoc_irq_disable(struct hif_softc *scn, int ce_id)
|
||||
ce_disable_irq_in_individual_register(scn, ce_id);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* hif_snoc_setup_wakeup_sources() - enable/disable irq wake on correct irqs
|
||||
* @hif_softc: hif context
|
||||
* @scn: hif context
|
||||
* @enable: true to enable
|
||||
*
|
||||
* Firmware will send a wakeup request to the HTC_CTRL_RSVD_SVC when waking up
|
||||
* the host driver. Ensure that the copy complete interrupt from this copy
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -269,7 +269,6 @@ err:
|
||||
* @transfer_id: endpoint ID on which data is to be sent
|
||||
* @nbytes: number of bytes to be transmitted
|
||||
* @wbuf: qdf_nbuf_t containing data to be transmitted
|
||||
* @hdr_buf: any header buf to be prepended, currently ignored
|
||||
* @data_attr: data_attr field from cvg_nbuf_cb of wbuf
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and error QDF status on failure
|
||||
@@ -451,7 +450,7 @@ QDF_STATUS hif_start(struct hif_opaque_softc *scn)
|
||||
|
||||
/**
|
||||
* hif_usb_stop_device() - Stop/flush all HIF communication
|
||||
* @scn: pointer to hif_opaque_softc structure
|
||||
* @hif_sc: pointer to hif_opaque_softc structure
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -470,7 +469,7 @@ void hif_usb_stop_device(struct hif_softc *hif_sc)
|
||||
* hif_get_default_pipe() - get default pipes for HIF TX/RX
|
||||
* @scn: pointer to hif_opaque_softc structure
|
||||
* @ul_pipe: pointer to TX pipe
|
||||
* @ul_pipe: pointer to TX pipe
|
||||
* @dl_pipe: pointer to RX pipe
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -489,7 +488,7 @@ void hif_get_default_pipe(struct hif_opaque_softc *scn, uint8_t *ul_pipe,
|
||||
* @ul_pipe: pointer to uplink pipe id
|
||||
* @dl_pipe: pointer to down-linklink pipe id
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
* @dl_is_polled: if dl is polling based
|
||||
*
|
||||
* Return: status
|
||||
*/
|
||||
@@ -544,7 +543,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||
* @ul_pipe: pointer to uplink pipe id
|
||||
* @dl_pipe: pointer to down-linklink pipe id
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
* @dl_is_polled: if dl is polling based
|
||||
*
|
||||
* Return: status
|
||||
*/
|
||||
@@ -667,10 +666,12 @@ static QDF_STATUS hif_ctrl_msg_exchange(struct HIF_DEVICE_USB *macp,
|
||||
/**
|
||||
* hif_exchange_bmi_msg() - send/recev ctrl message of type BMI_CMD/BMI_RESP
|
||||
* @scn: pointer to hif_opaque_softc
|
||||
* @cmd:
|
||||
* @rsp:
|
||||
* @bmi_request: pointer to data to send
|
||||
* @request_length: length in bytes of the data to send
|
||||
* @bmi_response: pointer to response msg
|
||||
* @bmi_response_length: length of the response message
|
||||
* @bmi_response_lengthp: length of the response message
|
||||
* @timeout_ms: timeout to wait for response (ignored in current implementation)
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if success else an appropriate QDF_STATUS error
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -93,7 +94,7 @@ hif_usb_procfs_init(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_nointrs(): disable IRQ
|
||||
* hif_usb_nointrs() - disable IRQ
|
||||
* @scn: pointer to struct hif_softc
|
||||
*
|
||||
* This function stops interrupt(s)
|
||||
@@ -170,7 +171,7 @@ exit:
|
||||
|
||||
/**
|
||||
* hif_usb_enable_bus() - enable usb bus
|
||||
* @ol_sc: hif_softc struct
|
||||
* @scn: hif_softc struct
|
||||
* @dev: device pointer
|
||||
* @bdev: bus dev pointer
|
||||
* @bid: bus id pointer
|
||||
@@ -277,8 +278,8 @@ err_usb:
|
||||
|
||||
|
||||
/**
|
||||
* hif_usb_close(): close bus, delete hif_sc
|
||||
* @ol_sc: soft_sc struct
|
||||
* hif_usb_close() - close bus, delete hif_sc
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
@@ -288,7 +289,7 @@ void hif_usb_close(struct hif_softc *scn)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_usb_disable_bus(): This function disables usb bus
|
||||
* hif_usb_disable_bus() - This function disables usb bus
|
||||
* @hif_ctx: pointer to struct hif_softc
|
||||
*
|
||||
* Return: none
|
||||
@@ -374,7 +375,7 @@ int hif_usb_bus_resume(struct hif_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_usb_bus_reset_resume() - resume the bus after reset
|
||||
* @scn: struct hif_opaque_softc
|
||||
* @hif_ctx: HIF context
|
||||
*
|
||||
* This function is called to tell the driver that USB device has been resumed
|
||||
* and it has also been reset. The driver should redo any necessary
|
||||
@@ -396,7 +397,7 @@ int hif_usb_bus_reset_resume(struct hif_softc *hif_ctx)
|
||||
|
||||
/**
|
||||
* hif_usb_open()- initialization routine for usb bus
|
||||
* @ol_sc: ol_sc
|
||||
* @hif_ctx: HIF context
|
||||
* @bus_type: bus type
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and error QDF status on failure
|
||||
@@ -409,7 +410,7 @@ QDF_STATUS hif_usb_open(struct hif_softc *hif_ctx,
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_usb_disable_isr(): disable isr
|
||||
* hif_usb_disable_isr() - disable isr
|
||||
* @hif_ctx: struct hif_softc
|
||||
*
|
||||
* Return: void
|
||||
@@ -487,7 +488,7 @@ void hif_usb_reg_tbl_attach(struct hif_softc *scn)
|
||||
/**
|
||||
* hif_usb_get_hw_info()- attach register table for USB
|
||||
* @hif_ctx: pointer to hif_softc structure
|
||||
|
||||
*
|
||||
* This function is used to attach the host and target register tables.
|
||||
* Ideally, we should not attach register tables as a part of this function.
|
||||
* There is scope of cleanup to move register table attach during
|
||||
@@ -511,7 +512,7 @@ void hif_usb_get_hw_info(struct hif_softc *hif_ctx)
|
||||
|
||||
#if defined(CONFIG_PLD_USB_CNSS) && !defined(CONFIG_BYPASS_QMI)
|
||||
/**
|
||||
* hif_bus_configure() - configure the bus
|
||||
* hif_usb_bus_configure() - configure the bus
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
@@ -535,7 +536,7 @@ int hif_usb_bus_configure(struct hif_softc *scn)
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* hif_bus_configure() - configure the bus
|
||||
* hif_usb_bus_configure() - configure the bus
|
||||
* @scn: pointer to the hif context.
|
||||
*
|
||||
* return: 0 for success. nonzero for failure.
|
||||
@@ -666,7 +667,7 @@ void hif_fw_assert_ramdump_pattern(struct hif_usb_softc *sc)
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_usb_ramdump_handler(): dump bus debug registers
|
||||
* hif_usb_ramdump_handler() - dump bus debug registers
|
||||
* @scn: struct hif_opaque_softc
|
||||
*
|
||||
* This function is to receive information of firmware crash dump, and
|
||||
@@ -746,9 +747,8 @@ void hif_usb_ramdump_handler(struct hif_opaque_softc *scn)
|
||||
|
||||
#ifndef QCA_WIFI_3_0
|
||||
/**
|
||||
* hif_check_fw_reg(): hif_check_fw_reg
|
||||
* hif_check_fw_reg() - hif_check_fw_reg
|
||||
* @scn: scn
|
||||
* @state:
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -326,7 +326,7 @@ static uint8_t usb_hif_get_logical_pipe_num
|
||||
#endif /* QCN7605_SUPPORT */
|
||||
|
||||
/**
|
||||
* usb_hif_get_logical_pipe_num() - setup urb resources for all pipes
|
||||
* usb_hif_setup_pipe_resources() - setup urb resources for all pipes
|
||||
* @device: pointer to HIF_DEVICE_USB structure
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if success else an appropriate QDF_STATUS error
|
||||
|
Reference in New Issue
Block a user