#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/dma-direction.h>
#include <linux/if_rmnet.h>
#include <linux/types.h>
#include "gsi.h"
#include "gsi_trans.h"
#include "ipa.h"
#include "ipa_cmd.h"
#include "ipa_data.h"
#include "ipa_endpoint.h"
#include "ipa_gsi.h"
#include "ipa_interrupt.h"
#include "ipa_mem.h"
#include "ipa_modem.h"
#include "ipa_power.h"
#include "ipa_reg.h"
#include "ipa_table.h"
#include "ipa_version.h"
#define IPA_REPLENISH_BATCH …
#define IPA_RX_BUFFER_OVERHEAD …
#define IPA_ENDPOINT_QMAP_METADATA_MASK …
#define IPA_ENDPOINT_RESET_AGGR_RETRY_MAX …
enum ipa_status_opcode { … };
enum ipa_status_exception { … };
enum ipa_status_mask { … };
#define IPA_STATUS_RULE_MISS …
enum ipa_status_field_id { … };
#define IPA_STATUS_SIZE …
static u32 ipa_status_extract(struct ipa *ipa, const void *data,
enum ipa_status_field_id field)
{ … }
static u32 ipa_aggr_size_kb(u32 rx_buffer_size, bool aggr_hard_limit)
{ … }
static bool ipa_endpoint_data_valid_one(struct ipa *ipa, u32 count,
const struct ipa_gsi_endpoint_data *all_data,
const struct ipa_gsi_endpoint_data *data)
{ … }
static u32 ipa_endpoint_max(struct ipa *ipa, u32 count,
const struct ipa_gsi_endpoint_data *data)
{ … }
static struct gsi_trans *ipa_endpoint_trans_alloc(struct ipa_endpoint *endpoint,
u32 tre_count)
{ … }
static bool
ipa_endpoint_init_ctrl(struct ipa_endpoint *endpoint, bool suspend_delay)
{ … }
static void
ipa_endpoint_program_delay(struct ipa_endpoint *endpoint, bool enable)
{ … }
static bool ipa_endpoint_aggr_active(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_force_close(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_suspend_aggr(struct ipa_endpoint *endpoint)
{ … }
static bool
ipa_endpoint_program_suspend(struct ipa_endpoint *endpoint, bool enable)
{ … }
void ipa_endpoint_modem_pause_all(struct ipa *ipa, bool enable)
{ … }
int ipa_endpoint_modem_exception_reset_all(struct ipa *ipa)
{ … }
static void ipa_endpoint_init_cfg(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_init_nat(struct ipa_endpoint *endpoint)
{ … }
static u32
ipa_qmap_header_size(enum ipa_version version, struct ipa_endpoint *endpoint)
{ … }
static u32 ipa_header_size_encode(enum ipa_version version,
const struct reg *reg, u32 header_size)
{ … }
static u32 ipa_metadata_offset_encode(enum ipa_version version,
const struct reg *reg, u32 offset)
{ … }
static void ipa_endpoint_init_hdr(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_init_hdr_ext(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_init_hdr_metadata_mask(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_init_mode(struct ipa_endpoint *endpoint)
{ … }
static u32
ipa_qtime_val(struct ipa *ipa, u32 microseconds, u32 max, u32 *select)
{ … }
static u32 aggr_time_limit_encode(struct ipa *ipa, const struct reg *reg,
u32 microseconds)
{ … }
static void ipa_endpoint_init_aggr(struct ipa_endpoint *endpoint)
{ … }
static u32 hol_block_timer_encode(struct ipa *ipa, const struct reg *reg,
u32 microseconds)
{ … }
static void ipa_endpoint_init_hol_block_timer(struct ipa_endpoint *endpoint,
u32 microseconds)
{ … }
static void
ipa_endpoint_init_hol_block_en(struct ipa_endpoint *endpoint, bool enable)
{ … }
static void ipa_endpoint_init_hol_block_enable(struct ipa_endpoint *endpoint,
u32 microseconds)
{ … }
static void ipa_endpoint_init_hol_block_disable(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_modem_hol_block_clear_all(struct ipa *ipa)
{ … }
static void ipa_endpoint_init_deaggr(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_init_rsrc_grp(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_init_seq(struct ipa_endpoint *endpoint)
{ … }
int ipa_endpoint_skb_tx(struct ipa_endpoint *endpoint, struct sk_buff *skb)
{ … }
static void ipa_endpoint_status(struct ipa_endpoint *endpoint)
{ … }
static int ipa_endpoint_replenish_one(struct ipa_endpoint *endpoint,
struct gsi_trans *trans)
{ … }
static void ipa_endpoint_replenish(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_replenish_enable(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_replenish_disable(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_replenish_work(struct work_struct *work)
{ … }
static void ipa_endpoint_skb_copy(struct ipa_endpoint *endpoint,
void *data, u32 len, u32 extra)
{ … }
static bool ipa_endpoint_skb_build(struct ipa_endpoint *endpoint,
struct page *page, u32 len)
{ … }
static bool ipa_status_format_packet(enum ipa_status_opcode opcode)
{ … }
static bool
ipa_endpoint_status_skip(struct ipa_endpoint *endpoint, const void *data)
{ … }
static bool
ipa_endpoint_status_tag_valid(struct ipa_endpoint *endpoint, const void *data)
{ … }
static bool
ipa_endpoint_status_drop(struct ipa_endpoint *endpoint, const void *data)
{ … }
static void ipa_endpoint_status_parse(struct ipa_endpoint *endpoint,
struct page *page, u32 total_len)
{ … }
void ipa_endpoint_trans_complete(struct ipa_endpoint *endpoint,
struct gsi_trans *trans)
{ … }
void ipa_endpoint_trans_release(struct ipa_endpoint *endpoint,
struct gsi_trans *trans)
{ … }
void ipa_endpoint_default_route_set(struct ipa *ipa, u32 endpoint_id)
{ … }
void ipa_endpoint_default_route_clear(struct ipa *ipa)
{ … }
static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
{ … }
int ipa_endpoint_enable_one(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_disable_one(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_suspend_one(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_resume_one(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_suspend(struct ipa *ipa)
{ … }
void ipa_endpoint_resume(struct ipa *ipa)
{ … }
static void ipa_endpoint_setup_one(struct ipa_endpoint *endpoint)
{ … }
static void ipa_endpoint_teardown_one(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_setup(struct ipa *ipa)
{ … }
void ipa_endpoint_teardown(struct ipa *ipa)
{ … }
void ipa_endpoint_deconfig(struct ipa *ipa)
{ … }
int ipa_endpoint_config(struct ipa *ipa)
{ … }
static void ipa_endpoint_init_one(struct ipa *ipa, enum ipa_endpoint_name name,
const struct ipa_gsi_endpoint_data *data)
{ … }
static void ipa_endpoint_exit_one(struct ipa_endpoint *endpoint)
{ … }
void ipa_endpoint_exit(struct ipa *ipa)
{ … }
int ipa_endpoint_init(struct ipa *ipa, u32 count,
const struct ipa_gsi_endpoint_data *data)
{ … }