Browse Source

ipa: Cleanup after moving internal definitions

Removing the files copied from the kernel:
ipa.h
msm_gsi.h
ipa_fmwk.h
ipa_mhi.h
ipa_odu_bridge.h
ipa_uc_offload.h
ipa_usb.h
ipa_wdi3.h
ipa_wigig.h

and including the original files instead.

Depends-on: 3177533

Change-Id: I485f5545505bfbc4e775a75ae3d0809f9a977a97
Signed-off-by: Ilia Lin <[email protected]>
Ilia Lin 4 years ago
parent
commit
9d4ff10cc6
56 changed files with 67 additions and 4472 deletions
  1. 1 1
      drivers/platform/msm/gsi/gsi.c
  2. 1 1
      drivers/platform/msm/gsi/gsi.h
  3. 1 1
      drivers/platform/msm/gsi/gsi_dbg.c
  4. 0 31
      drivers/platform/msm/gsi/msm_gsi.h
  5. 0 2168
      drivers/platform/msm/ipa/ipa.h
  6. 1 1
      drivers/platform/msm/ipa/ipa_clients/ecm_ipa.h
  7. 0 324
      drivers/platform/msm/ipa/ipa_clients/ipa_fmwk.h
  8. 3 3
      drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c
  9. 0 154
      drivers/platform/msm/ipa/ipa_clients/ipa_mhi.h
  10. 4 4
      drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c
  11. 0 140
      drivers/platform/msm/ipa/ipa_clients/ipa_odu_bridge.h
  12. 2 2
      drivers/platform/msm/ipa/ipa_clients/ipa_uc_offload.c
  13. 0 314
      drivers/platform/msm/ipa/ipa_clients/ipa_uc_offload.h
  14. 3 3
      drivers/platform/msm/ipa/ipa_clients/ipa_usb.c
  15. 0 335
      drivers/platform/msm/ipa/ipa_clients/ipa_usb.h
  16. 1 1
      drivers/platform/msm/ipa/ipa_clients/ipa_wdi3.c
  17. 0 453
      drivers/platform/msm/ipa/ipa_clients/ipa_wdi3.h
  18. 2 2
      drivers/platform/msm/ipa/ipa_clients/ipa_wigig.c
  19. 0 486
      drivers/platform/msm/ipa/ipa_clients/ipa_wigig.h
  20. 1 1
      drivers/platform/msm/ipa/ipa_clients/rndis_ipa.c
  21. 1 1
      drivers/platform/msm/ipa/ipa_clients/rndis_ipa.h
  22. 5 5
      drivers/platform/msm/ipa/ipa_common_i.h
  23. 1 1
      drivers/platform/msm/ipa/ipa_rm.c
  24. 1 1
      drivers/platform/msm/ipa/ipa_rm_dependency_graph.h
  25. 1 1
      drivers/platform/msm/ipa/ipa_rm_i.h
  26. 1 1
      drivers/platform/msm/ipa/ipa_rm_inactivity_timer.c
  27. 1 1
      drivers/platform/msm/ipa/ipa_rm_resource.h
  28. 1 1
      drivers/platform/msm/ipa/ipa_uc_offload_common_i.h
  29. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa.c
  30. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_client.c
  31. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_defs.h
  32. 2 2
      drivers/platform/msm/ipa/ipa_v3/ipa_dma.c
  33. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_dp.c
  34. 3 3
      drivers/platform/msm/ipa/ipa_v3/ipa_i.h
  35. 3 3
      drivers/platform/msm/ipa/ipa_v3/ipa_mhi.c
  36. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c
  37. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c
  38. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.h
  39. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_uc_mhi.c
  40. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_uc_offload_i.h
  41. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
  42. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_wdi3_i.c
  43. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipa_wigig_i.c
  44. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c
  45. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_hw_stats.h
  46. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_i.h
  47. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c
  48. 1 1
      drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.h
  49. 1 1
      drivers/platform/msm/ipa/ipa_v3/rmnet_ctl_ipa.c
  50. 1 1
      drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
  51. 1 1
      drivers/platform/msm/ipa/ipa_v3/teth_bridge.c
  52. 1 1
      drivers/platform/msm/ipa/test/ipa_pm_ut.c
  53. 1 1
      drivers/platform/msm/ipa/test/ipa_test_dma.c
  54. 2 2
      drivers/platform/msm/ipa/test/ipa_test_mhi.c
  55. 2 2
      drivers/platform/msm/ipa/test/ipa_test_wdi3.c
  56. 1 1
      drivers/platform/msm/ipa/test/ipa_ut_framework.c

+ 1 - 1
drivers/platform/msm/gsi/gsi.c

@@ -8,7 +8,7 @@
 #include <linux/io.h>
 #include <linux/log2.h>
 #include <linux/module.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include "gsi.h"

+ 1 - 1
drivers/platform/msm/gsi/gsi.h

@@ -11,7 +11,7 @@
 #include <linux/completion.h>
 #include <linux/mutex.h>
 #include <linux/spinlock.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include <linux/errno.h>
 #include <linux/ipc_logging.h>
 

+ 1 - 1
drivers/platform/msm/gsi/gsi_dbg.c

@@ -8,7 +8,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/random.h>
 #include <linux/uaccess.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include "gsi_reg.h"
 #include "gsi.h"
 

+ 0 - 31
drivers/platform/msm/gsi/msm_gsi.h

@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
- */
-
-#ifndef MSM_GSI_H
-#define MSM_GSI_H
-#include <linux/types.h>
-#include <linux/interrupt.h>
-
-enum gsi_chan_dir {
-	GSI_CHAN_DIR_FROM_GSI = 0x0,
-	GSI_CHAN_DIR_TO_GSI = 0x1
-};
-
-/**
- * @GSI_USE_PREFETCH_BUFS: Channel will use normal prefetch buffers if possible
- * @GSI_ESCAPE_BUF_ONLY: Channel will always use escape buffers only
- * @GSI_SMART_PRE_FETCH: Channel will work in smart prefetch mode.
- *	relevant starting GSI 2.5
- * @GSI_FREE_PRE_FETCH: Channel will work in free prefetch mode.
- *	relevant starting GSI 2.5
- */
-enum gsi_prefetch_mode {
-	GSI_USE_PREFETCH_BUFS = 0x0,
-	GSI_ESCAPE_BUF_ONLY = 0x1,
-	GSI_SMART_PRE_FETCH = 0x2,
-	GSI_FREE_PRE_FETCH = 0x3,
-};
-
-#endif

+ 0 - 2168
drivers/platform/msm/ipa/ipa.h

@@ -1,2168 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_H_
-#define _IPA_H_
-
-#include <linux/msm_ipa.h>
-#include <linux/skbuff.h>
-#include <linux/types.h>
-#include <linux/if_ether.h>
-#include <linux/ipa_qmi_service_v01.h>
-#include "msm_gsi.h"
-
-#define IPA_APPS_MAX_BW_IN_MBPS 700
-#define IPA_BW_THRESHOLD_MAX 3
-
-#define IPA_MAX_CH_STATS_SUPPORTED 5
-/**
- * enum ipa_transport_type
- * transport type: either GSI or SPS
- */
-enum ipa_transport_type {
-	IPA_TRANSPORT_TYPE_SPS,
-	IPA_TRANSPORT_TYPE_GSI
-};
-
-/**
- * enum ipa_nat_en_type - NAT setting type in IPA end-point
- */
-enum ipa_nat_en_type {
-	IPA_BYPASS_NAT,
-	IPA_SRC_NAT,
-	IPA_DST_NAT,
-};
-
-/**
- * enum ipa_ipv6ct_en_type - IPv6CT setting type in IPA end-point
- */
-enum ipa_ipv6ct_en_type {
-	IPA_BYPASS_IPV6CT,
-	IPA_ENABLE_IPV6CT,
-};
-
-/**
- * enum ipa_mode_type - mode setting type in IPA end-point
- * @BASIC: basic mode
- * @ENABLE_FRAMING_HDLC: not currently supported
- * @ENABLE_DEFRAMING_HDLC: not currently supported
- * @DMA: all data arriving IPA will not go through IPA logic blocks, this
- *  allows IPA to work as DMA for specific pipes.
- */
-enum ipa_mode_type {
-	IPA_BASIC,
-	IPA_ENABLE_FRAMING_HDLC,
-	IPA_ENABLE_DEFRAMING_HDLC,
-	IPA_DMA,
-};
-
-/**
- *  enum ipa_aggr_en_type - aggregation setting type in IPA
- *  end-point
- */
-enum ipa_aggr_en_type {
-	IPA_BYPASS_AGGR,
-	IPA_ENABLE_AGGR,
-	IPA_ENABLE_DEAGGR,
-};
-
-/**
- *  enum ipa_aggr_type - type of aggregation in IPA end-point
- */
-enum ipa_aggr_type {
-	IPA_MBIM_16 = 0,
-	IPA_HDLC    = 1,
-	IPA_TLP     = 2,
-	IPA_RNDIS   = 3,
-	IPA_GENERIC = 4,
-	IPA_COALESCE = 5,
-	IPA_QCMAP   = 6,
-};
-
-/**
- * enum ipa_aggr_mode - global aggregation mode
- */
-enum ipa_aggr_mode {
-	IPA_MBIM_AGGR,
-	IPA_QCNCM_AGGR,
-};
-
-/**
- * enum ipa_dp_evt_type - type of event client callback is
- * invoked for on data path
- * @IPA_RECEIVE: data is struct sk_buff
- * @IPA_WRITE_DONE: data is struct sk_buff
- */
-enum ipa_dp_evt_type {
-	IPA_RECEIVE,
-	IPA_WRITE_DONE,
-};
-
-/**
- * enum hdr_total_len_or_pad_type - type of value held by TOTAL_LEN_OR_PAD
- * field in header configuration register.
- * @IPA_HDR_PAD: field is used as padding length
- * @IPA_HDR_TOTAL_LEN: field is used as total length
- */
-enum hdr_total_len_or_pad_type {
-	IPA_HDR_PAD = 0,
-	IPA_HDR_TOTAL_LEN = 1,
-};
-
-/**
- * struct ipa_ep_cfg_nat - NAT configuration in IPA end-point
- * @nat_en:	This defines the default NAT mode for the pipe: in case of
- *		filter miss - the default NAT mode defines the NATing operation
- *		on the packet. Valid for Input Pipes only (IPA consumer)
- */
-struct ipa_ep_cfg_nat {
-	enum ipa_nat_en_type nat_en;
-};
-
-/**
- * struct ipa_ep_cfg_conn_track - IPv6 Connection tracking configuration in
- *	IPA end-point
- * @conn_track_en: Defines speculative conn_track action, means if specific
- *		   pipe needs to have UL/DL IPv6 Connection Tracking or Bypass
- *		   IPv6 Connection Tracking. 0: Bypass IPv6 Connection Tracking
- *					     1: IPv6 UL/DL Connection Tracking.
- *		  Valid for Input Pipes only (IPA consumer)
- */
-struct ipa_ep_cfg_conn_track {
-	enum ipa_ipv6ct_en_type conn_track_en;
-};
-
-/**
- * struct ipa_ep_cfg_hdr - header configuration in IPA end-point
- *
- * @hdr_len:Header length in bytes to be added/removed. Assuming
- *			header len is constant per endpoint. Valid for
- *			both Input and Output Pipes
- * @hdr_ofst_metadata_valid:	0: Metadata_Ofst  value is invalid, i.e., no
- *			metadata within header.
- *			1: Metadata_Ofst  value is valid, i.e., metadata
- *			within header is in offset Metadata_Ofst Valid
- *			for Input Pipes only (IPA Consumer) (for output
- *			pipes, metadata already set within the header)
- * @hdr_ofst_metadata:	Offset within header in which metadata resides
- *			Size of metadata - 4bytes
- *			Example -  Stream ID/SSID/mux ID.
- *			Valid for  Input Pipes only (IPA Consumer) (for output
- *			pipes, metadata already set within the header)
- * @hdr_additional_const_len:	Defines the constant length that should be added
- *			to the payload length in order for IPA to update
- *			correctly the length field within the header
- *			(valid only in case Hdr_Ofst_Pkt_Size_Valid=1)
- *			Valid for Output Pipes (IPA Producer)
- *			Starting IPA4.5, this field in H/W requires more bits
- *			to support larger range, but no spare bits to use.
- *			So the MSB part is done thourgh the EXT register.
- *			When accessing this register, need to access the EXT
- *			register as well.
- * @hdr_ofst_pkt_size_valid:	0: Hdr_Ofst_Pkt_Size  value is invalid, i.e., no
- *			length field within the inserted header
- *			1: Hdr_Ofst_Pkt_Size  value is valid, i.e., a
- *			packet length field resides within the header
- *			Valid for Output Pipes (IPA Producer)
- * @hdr_ofst_pkt_size:	Offset within header in which packet size reside. Upon
- *			Header Insertion, IPA will update this field within the
- *			header with the packet length . Assumption is that
- *			header length field size is constant and is 2Bytes
- *			Valid for Output Pipes (IPA Producer)
- *			Starting IPA4.5, this field in H/W requires more bits
- *			to support larger range, but no spare bits to use.
- *			So the MSB part is done thourgh the EXT register.
- *			When accessing this register, need to access the EXT
- *			register as well.
- * @hdr_a5_mux:	Determines whether A5 Mux header should be added to the packet.
- *			This bit is valid only when Hdr_En=01(Header Insertion)
- *			SW should set this bit for IPA-to-A5 pipes.
- *			0: Do not insert A5 Mux Header
- *			1: Insert A5 Mux Header
- *			Valid for Output Pipes (IPA Producer)
- * @hdr_remove_additional:	bool switch, remove more of the header
- *			based on the aggregation configuration (register
- *			HDR_LEN_INC_DEAGG_HDR)
- * @hdr_metadata_reg_valid:	bool switch, metadata from
- *			register INIT_HDR_METADATA_n is valid.
- *			(relevant only for IPA Consumer pipes)
- *			Starting IPA4.5, this parameter is irrelevant and H/W
- *			assumes it is always valid.
- */
-struct ipa_ep_cfg_hdr {
-	u32  hdr_len;
-	u32  hdr_ofst_metadata_valid;
-	u32  hdr_ofst_metadata;
-	u32  hdr_additional_const_len;
-	u32  hdr_ofst_pkt_size_valid;
-	u32  hdr_ofst_pkt_size;
-	u32  hdr_a5_mux;
-	u32  hdr_remove_additional;
-	u32  hdr_metadata_reg_valid;
-};
-
-/**
- * struct ipa_ep_cfg_hdr_ext - extended header configuration in IPA end-point
- * @hdr_pad_to_alignment: Pad packet to specified alignment
- *	(2^pad to alignment value), i.e. value of 3 means pad to 2^3 = 8 bytes
- *	alignment. Alignment is to 0,2 up to 32 bytes (IPAv2 does not support 64
- *	byte alignment). Valid for Output Pipes only (IPA Producer).
- * @hdr_total_len_or_pad_offset: Offset to length field containing either
- *	total length or pad length, per hdr_total_len_or_pad config
- * @hdr_payload_len_inc_padding: 0-IPA_ENDP_INIT_HDR_n's
- *	HDR_OFST_PKT_SIZE does
- *	not includes padding bytes size, payload_len = packet length,
- *	1-IPA_ENDP_INIT_HDR_n's HDR_OFST_PKT_SIZE includes
- *	padding bytes size, payload_len = packet length + padding
- * @hdr_total_len_or_pad: field is used as PAD length ot as Total length
- *	(header + packet + padding)
- * @hdr_total_len_or_pad_valid: 0-Ignore TOTAL_LEN_OR_PAD field, 1-Process
- *	TOTAL_LEN_OR_PAD field
- * @hdr_little_endian: 0-Big Endian, 1-Little Endian
- * @hdr: The header structure. Used starting IPA4.5 where part of the info
- *	at the header structure is implemented via the EXT register at the H/W
- */
-struct ipa_ep_cfg_hdr_ext {
-	u32 hdr_pad_to_alignment;
-	u32 hdr_total_len_or_pad_offset;
-	bool hdr_payload_len_inc_padding;
-	enum hdr_total_len_or_pad_type hdr_total_len_or_pad;
-	bool hdr_total_len_or_pad_valid;
-	bool hdr_little_endian;
-	struct ipa_ep_cfg_hdr *hdr;
-};
-
-/**
- * struct ipa_ep_cfg_mode - mode configuration in IPA end-point
- * @mode:	Valid for Input Pipes only (IPA Consumer)
- * @dst:	This parameter specifies the output pipe to which the packets
- *		will be routed to.
- *		This parameter is valid for Mode=DMA and not valid for
- *		Mode=Basic
- *		Valid for Input Pipes only (IPA Consumer)
- */
-struct ipa_ep_cfg_mode {
-	enum ipa_mode_type mode;
-	enum ipa_client_type dst;
-};
-
-/**
- * struct ipa_ep_cfg_aggr - aggregation configuration in IPA end-point
- *
- * @aggr_en:	Valid for both Input and Output Pipes
- * @aggr:	aggregation type (Valid for both Input and Output Pipes)
- * @aggr_byte_limit:	Limit of aggregated packet size in KB (<=32KB) When set
- *			to 0, there is no size limitation on the aggregation.
- *			When both, Aggr_Byte_Limit and Aggr_Time_Limit are set
- *			to 0, there is no aggregation, every packet is sent
- *			independently according to the aggregation structure
- *			Valid for Output Pipes only (IPA Producer )
- * @aggr_time_limit:	Timer to close aggregated packet When set to 0,
- *			there is no time limitation on the aggregation.  When
- *			both, Aggr_Byte_Limit and Aggr_Time_Limit are set to 0,
- *			there is no aggregation, every packet is sent
- *			independently according to the aggregation structure
- *			Valid for Output Pipes only (IPA Producer).
- *			Time unit is -->> usec <<--
- * @aggr_pkt_limit: Defines if EOF close aggregation or not. if set to false
- *			HW closes aggregation (sends EOT) only based on its
- *			aggregation config (byte/time limit, etc). if set to
- *			true EOF closes aggregation in addition to HW based
- *			aggregation closure. Valid for Output Pipes only (IPA
- *			Producer). EOF affects only Pipes configured for
- *			generic aggregation.
- * @aggr_hard_byte_limit_en: If set to 1, byte-limit aggregation for this
- *			pipe will apply a hard-limit behavior which will not
- *			allow frames to be closed with more than byte-limit
- *			bytes. If set to 0, previous byte-limit behavior
- *			will apply - frames close once a packet causes the
- *			accumulated byte-count to cross the byte-limit
- *			threshold (closed frame will contain that packet).
- * @aggr_sw_eof_active: 0: EOF does not close aggregation. HW closes aggregation
- *			(sends EOT) only based on its aggregation config
- *			(byte/time limit, etc).
- *			1: EOF closes aggregation in addition to HW based
- *			aggregation closure. Valid for Output Pipes only (IPA
- *			Producer). EOF affects only Pipes configured for generic
- *			aggregation.
- * @pulse_generator:	Pulse generator number to be used.
- *			For internal use.
- *			Supported starting IPA4.5.
- * @scaled_time:	Time limit in accordance to the pulse generator
- *			granularity.
- *			For internal use
- *			Supported starting IPA4.5
- */
-struct ipa_ep_cfg_aggr {
-	enum ipa_aggr_en_type aggr_en;
-	enum ipa_aggr_type aggr;
-	u32 aggr_byte_limit;
-	u32 aggr_time_limit;
-	u32 aggr_pkt_limit;
-	u32 aggr_hard_byte_limit_en;
-	bool aggr_sw_eof_active;
-	u8 pulse_generator;
-	u8 scaled_time;
-};
-
-/**
- * struct ipa_ep_cfg_route - route configuration in IPA end-point
- * @rt_tbl_hdl:	Defines the default routing table index to be used in case there
- *		is no filter rule matching, valid for Input Pipes only (IPA
- *		Consumer). Clients should set this to 0 which will cause default
- *		v4 and v6 routes setup internally by IPA driver to be used for
- *		this end-point
- */
-struct ipa_ep_cfg_route {
-	u32 rt_tbl_hdl;
-};
-
-/**
- * struct ipa_ep_cfg_holb - head of line blocking configuration in IPA end-point
- * @en: enable(1 => ok to drop pkt)/disable(0 => never drop pkt)
- * @tmr_val: duration in units of 128 IPA clk clock cyles [0,511], 1 clk=1.28us
- *	     IPAv2.5 support 32 bit HOLB timeout value, previous versions
- *	     supports 16 bit
- *  IPAv4.2: splitting timer value into 2 fields. Timer value is:
- *   BASE_VALUE * (2^SCALE)
- *  IPA4.5: tmr_val is in -->>msec<<--. Range is dynamic based
- *   on H/W configuration. (IPA4.5 absolute maximum is 0.65535*31 -> ~20sec).
- * @base_val : IPA4.2 only field. base value of the timer.
- * @scale : IPA4.2 only field. scale value for timer.
- * @pulse_generator: Pulse generator number to be used.
- *  For internal use.
- *  Supported starting IPA4.5.
- * @scaled_time: Time limit in accordance to the pulse generator granularity
- *  For internal use
- *  Supported starting IPA4.5
- */
-struct ipa_ep_cfg_holb {
-	u32 tmr_val;
-	u32 base_val;
-	u32 scale;
-	u16 en;
-	u8 pulse_generator;
-	u8 scaled_time;
-};
-
-/**
- * struct ipa_ep_cfg_deaggr - deaggregation configuration in IPA end-point
- * @deaggr_hdr_len: Deaggregation Header length in bytes. Valid only for Input
- *	Pipes, which are configured for 'Generic' deaggregation.
- * @syspipe_err_detection - If set to 1, enables error detection for
- *	de-aggregration. Valid only for Input Pipes, which are configured
- *	for 'Generic' deaggregation.
- *	Note: if this bit is set, de-aggregated frames must be contiguous
- *	in memory.
- * @packet_offset_valid: - 0: PACKET_OFFSET is not used, 1: PACKET_OFFSET is
- *	used.
- * @packet_offset_location: Location of packet offset field, which specifies
- *	the offset to the packet from the start of the packet offset field.
- * @ignore_min_pkt_err - Ignore packets smaller than header. This is intended
- *	for use in RNDIS de-aggregated pipes, to silently ignore a redundant
- *	1-byte trailer in MSFT implementation.
- * @max_packet_len: DEAGGR Max Packet Length in Bytes. A Packet with higher
- *	size wil be treated as an error. 0 - Packet Length is not Bound,
- *	IPA should not check for a Max Packet Length.
- */
-struct ipa_ep_cfg_deaggr {
-	u32 deaggr_hdr_len;
-	bool syspipe_err_detection;
-	bool packet_offset_valid;
-	u32 packet_offset_location;
-	bool ignore_min_pkt_err;
-	u32 max_packet_len;
-};
-
-/**
- * enum ipa_cs_offload - checksum offload setting
- */
-enum ipa_cs_offload {
-	IPA_DISABLE_CS_OFFLOAD,
-	/*
-	 * For enum value = 1, we check the csum required/valid bit which is the
-	 * same bit used for both DL and UL but have different meanings.
-	 * For UL pipe, HW checks if it needs to perform Csum caluclation.
-	 * For DL pipe, HW checks if the csum is valid or invalid
-	 */
-	IPA_ENABLE_CS_OFFLOAD_UL,
-	IPA_ENABLE_CS_DL_QMAP = IPA_ENABLE_CS_OFFLOAD_UL,
-	IPA_ENABLE_CS_OFFLOAD_DL,
-	IPA_CS_RSVD
-};
-
-/**
- * struct ipa_ep_cfg_cfg - IPA ENDP_INIT Configuration register
- * @frag_offload_en: - 0 - IP packet fragment handling is disabled. IP packet
- *	fragments should be sent to SW. SW is responsible for
- *	configuring filter rules, and IP packet filter exception should be
- *	used to send all fragments to SW. 1 - IP packet fragment
- *	handling is enabled. IPA checks for fragments and uses frag
- *	rules table for processing fragments. Valid only for Input Pipes
- *	(IPA Consumer)
- * @cs_offload_en: Checksum offload enable: 00: Disable checksum offload, 01:
- *	Enable checksum calculation offload (UL) - For output pipe
- *	(IPA producer) specifies that checksum trailer is to be added.
- *	For input pipe (IPA consumer) specifies presence of checksum
- *	header and IPA checksum calculation accordingly. 10: Enable
- *	checksum calculation offload (DL) - For output pipe (IPA
- *	producer) specifies that checksum trailer is to be added. For
- *	input pipe (IPA consumer) specifies IPA checksum calculation.
- *	11: Reserved
- * @cs_metadata_hdr_offset: Offset in Words (4 bytes) within header in which
- *	checksum meta info header (4 bytes) starts (UL). Values are 0-15, which
- *	mean 0 - 60 byte checksum header offset. Valid for input
- *	pipes only (IPA consumer)
- * @gen_qmb_master_sel: Select bit for ENDP GEN-QMB master. This is used to
- *	separate DDR & PCIe transactions in-order to limit them as
- *	a group (using MAX_WRITES/READS limiation). Valid for input and
- *	output pipes (IPA consumer+producer)
- */
-struct ipa_ep_cfg_cfg {
-	bool frag_offload_en;
-	enum ipa_cs_offload cs_offload_en;
-	u8 cs_metadata_hdr_offset;
-	u8 gen_qmb_master_sel;
-};
-
-/**
- * struct ipa_ep_cfg_metadata_mask - Endpoint initialization hdr metadata mask
- * @metadata_mask: Mask specifying which metadata bits to write to
- *	IPA_ENDP_INIT_HDR_n.s HDR_OFST_METADATA. Only
- *	masked metadata bits (set to 1) will be written. Valid for Output
- *	Pipes only (IPA Producer)
- */
-struct ipa_ep_cfg_metadata_mask {
-	u32 metadata_mask;
-};
-
-/**
- * struct ipa_ep_cfg_metadata - Meta Data configuration in IPA end-point
- * @md:	This defines the meta data from tx data descriptor
- * @qmap_id: qmap id
- */
-struct ipa_ep_cfg_metadata {
-	u32 qmap_id;
-};
-
-/**
- * struct ipa_ep_cfg_seq - HPS/DPS sequencer type configuration in IPA end-point
- * @set_dynamic:  0 - HPS/DPS seq type is configured statically,
- *		   1 - HPS/DPS seq type is set to seq_type
- * @seq_type: HPS/DPS sequencer type configuration
- */
-struct ipa_ep_cfg_seq {
-	bool set_dynamic;
-	int seq_type;
-};
-
-/**
- * struct ipa_ep_cfg - configuration of IPA end-point
- * @nat:		NAT parameters
- * @conn_track:		IPv6CT parameters
- * @hdr:		Header parameters
- * @hdr_ext:		Extended header parameters
- * @mode:		Mode parameters
- * @aggr:		Aggregation parameters
- * @deaggr:		Deaggregation params
- * @route:		Routing parameters
- * @cfg:		Configuration register data
- * @metadata_mask:	Hdr metadata mask
- * @meta:		Meta Data
- * @seq:		HPS/DPS sequencers configuration
- */
-struct ipa_ep_cfg {
-	struct ipa_ep_cfg_nat nat;
-	struct ipa_ep_cfg_conn_track conn_track;
-	struct ipa_ep_cfg_hdr hdr;
-	struct ipa_ep_cfg_hdr_ext hdr_ext;
-	struct ipa_ep_cfg_mode mode;
-	struct ipa_ep_cfg_aggr aggr;
-	struct ipa_ep_cfg_deaggr deaggr;
-	struct ipa_ep_cfg_route route;
-	struct ipa_ep_cfg_cfg cfg;
-	struct ipa_ep_cfg_metadata_mask metadata_mask;
-	struct ipa_ep_cfg_metadata meta;
-	struct ipa_ep_cfg_seq seq;
-};
-
-/**
- * struct ipa_ep_cfg_ctrl - Control configuration in IPA end-point
- * @ipa_ep_suspend: 0 - ENDP is enabled, 1 - ENDP is suspended (disabled).
- *			Valid for PROD Endpoints
- * @ipa_ep_delay:   0 - ENDP is free-running, 1 - ENDP is delayed.
- *			SW controls the data flow of an endpoint usind this bit.
- *			Valid for CONS Endpoints
- */
-struct ipa_ep_cfg_ctrl {
-	bool ipa_ep_suspend;
-	bool ipa_ep_delay;
-};
-
-/**
- * x should be in bytes
- */
-#define IPA_NUM_OF_FIFO_DESC(x) (x/sizeof(struct sps_iovec))
-typedef void (*ipa_notify_cb)(void *priv, enum ipa_dp_evt_type evt,
-		       unsigned long data);
-
-/**
- * enum ipa_wdi_meter_evt_type - type of event client callback is
- * for AP+STA mode metering
- * @IPA_GET_WDI_SAP_STATS: get IPA_stats betwen SAP and STA -
- *			use ipa_get_wdi_sap_stats structure
- * @IPA_SET_WIFI_QUOTA: set quota limit on STA -
- *			use ipa_set_wifi_quota structure
- * @IPA_SET_WLAN_BW: set wlan BW -
- *			use ipa_set_wlan_bw structure
- */
-enum ipa_wdi_meter_evt_type {
-	IPA_GET_WDI_SAP_STATS,
-	IPA_SET_WIFI_QUOTA,
-	IPA_INFORM_WLAN_BW,
-};
-
-struct ipa_get_wdi_sap_stats {
-	/* indicate to reset stats after query */
-	uint8_t reset_stats;
-	/* indicate valid stats from wlan-fw */
-	uint8_t stats_valid;
-	/* Tx: SAP->STA */
-	uint64_t ipv4_tx_packets;
-	uint64_t ipv4_tx_bytes;
-	/* Rx: STA->SAP */
-	uint64_t ipv4_rx_packets;
-	uint64_t ipv4_rx_bytes;
-	uint64_t ipv6_tx_packets;
-	uint64_t ipv6_tx_bytes;
-	uint64_t ipv6_rx_packets;
-	uint64_t ipv6_rx_bytes;
-};
-
-/**
- * struct ipa_set_wifi_quota - structure used for
- *                                   IPA_SET_WIFI_QUOTA.
- *
- * @quota_bytes:    Quota (in bytes) for the STA interface.
- * @set_quota:       Indicate whether to set the quota (use 1) or
- *                   unset the quota.
- *
- */
-struct ipa_set_wifi_quota {
-	uint64_t quota_bytes;
-	uint8_t  set_quota;
-	/* indicate valid quota set from wlan-fw */
-	uint8_t set_valid;
-};
-
-/**
- * struct ipa_inform_wlan_bw - structure used for
- *                                   IPA_INFORM_WLAN_BW.
- *
- * @index:       Indicate which bw-index hit
- * @throughput:  throughput usage
- *
- */
-struct ipa_inform_wlan_bw {
-	uint8_t  index;
-	uint64_t throughput;
-};
-
-typedef void (*ipa_wdi_meter_notifier_cb)(enum ipa_wdi_meter_evt_type evt,
-		       void *data);
-
-
-/**
- * struct ipa_tx_intf - interface tx properties
- * @num_props:	number of tx properties
- * @prop:	the tx properties array
- */
-struct ipa_tx_intf {
-	u32 num_props;
-	struct ipa_ioc_tx_intf_prop *prop;
-};
-
-/**
- * struct ipa_rx_intf - interface rx properties
- * @num_props:	number of rx properties
- * @prop:	the rx properties array
- */
-struct ipa_rx_intf {
-	u32 num_props;
-	struct ipa_ioc_rx_intf_prop *prop;
-};
-
-/**
- * struct ipa_ext_intf - interface ext properties
- * @excp_pipe_valid:	is next field valid?
- * @excp_pipe:	exception packets should be routed to this pipe
- * @num_props:	number of ext properties
- * @prop:	the ext properties array
- */
-struct ipa_ext_intf {
-	bool excp_pipe_valid;
-	enum ipa_client_type excp_pipe;
-	u32 num_props;
-	struct ipa_ioc_ext_intf_prop *prop;
-};
-
-/**
- * struct ipa_sys_connect_params - information needed to setup an IPA end-point
- * in system-BAM mode
- * @ipa_ep_cfg:	IPA EP configuration
- * @client:	the type of client who "owns" the EP
- * @desc_fifo_sz: size of desc FIFO. This number is used to allocate the desc
- *		fifo for BAM. For GSI, this size is used by IPA driver as a
- *		baseline to calculate the GSI ring size in the following way:
- *		For PROD pipes, GSI ring is 4 * desc_fifo_sz.
-		For PROD pipes, GSI ring is 2 * desc_fifo_sz.
- * @priv:	callback cookie
- * @notify:	callback
- *		priv - callback cookie
- *		evt - type of event
- *		data - data relevant to event.  May not be valid. See event_type
- *		enum for valid cases.
- * @skip_ep_cfg: boolean field that determines if EP should be configured
- *  by IPA driver
- * @keep_ipa_awake: when true, IPA will not be clock gated
- * @napi_enabled: when true, IPA call client callback to start polling
- */
-struct ipa_sys_connect_params {
-	struct ipa_ep_cfg ipa_ep_cfg;
-	enum ipa_client_type client;
-	u32 desc_fifo_sz;
-	void *priv;
-	ipa_notify_cb notify;
-	bool skip_ep_cfg;
-	bool keep_ipa_awake;
-	struct napi_struct *napi_obj;
-	bool recycle_enabled;
-};
-
-/**
- * struct ipa_tx_meta - meta-data for the TX packet
- * @dma_address: dma mapped address of TX packet
- * @dma_address_valid: is above field valid?
- */
-struct ipa_tx_meta {
-	u8 pkt_init_dst_ep;
-	bool pkt_init_dst_ep_valid;
-	bool pkt_init_dst_ep_remote;
-	dma_addr_t dma_address;
-	bool dma_address_valid;
-};
-
-/**
- * typedef ipa_msg_free_fn - callback function
- * @param buff - [in] the message payload to free
- * @param len - [in] size of message payload
- * @param type - [in] the message type
- *
- * Message callback registered by kernel client with IPA driver to
- * free message payload after IPA driver processing is complete
- *
- * No return value
- */
-typedef void (*ipa_msg_free_fn)(void *buff, u32 len, u32 type);
-
-/**
- * typedef ipa_msg_pull_fn - callback function
- * @param buff - [in] where to copy message payload
- * @param len - [in] size of buffer to copy payload into
- * @param type - [in] the message type
- *
- * Message callback registered by kernel client with IPA driver for
- * IPA driver to pull messages from the kernel client upon demand from
- * user-space
- *
- * Returns how many bytes were copied into the buffer.
- */
-typedef int (*ipa_msg_pull_fn)(void *buff, u32 len, u32 type);
-
-/**
- * enum ipa_voltage_level - IPA Voltage levels
- */
-enum ipa_voltage_level {
-	IPA_VOLTAGE_UNSPECIFIED,
-	IPA_VOLTAGE_SVS2 = IPA_VOLTAGE_UNSPECIFIED,
-	IPA_VOLTAGE_SVS,
-	IPA_VOLTAGE_NOMINAL,
-	IPA_VOLTAGE_TURBO,
-	IPA_VOLTAGE_MAX,
-};
-
-/**
- * enum ipa_rm_event - IPA RM events
- *
- * Indicate the resource state change
- */
-enum ipa_rm_event {
-	IPA_RM_RESOURCE_GRANTED,
-	IPA_RM_RESOURCE_RELEASED
-};
-
-typedef void (*ipa_rm_notify_cb)(void *user_data,
-		enum ipa_rm_event event,
-		unsigned long data);
-/**
- * struct ipa_rm_register_params - information needed to
- *      register IPA RM client with IPA RM
- *
- * @user_data: IPA RM client provided information
- *		to be passed to notify_cb callback below
- * @notify_cb: callback which is called by resource
- *		to notify the IPA RM client about its state
- *		change IPA RM client is expected to perform non
- *		blocking operations only in notify_cb and
- *		release notification context as soon as
- *		possible.
- */
-struct ipa_rm_register_params {
-	void *user_data;
-	ipa_rm_notify_cb notify_cb;
-};
-
-/**
- * struct ipa_rm_create_params - information needed to initialize
- *				the resource
- * @name: resource name
- * @floor_voltage: floor voltage needed for client to operate in maximum
- *		bandwidth.
- * @reg_params: register parameters, contains are ignored
- *		for consumer resource NULL should be provided
- *		for consumer resource
- * @request_resource: function which should be called to request resource,
- *			NULL should be provided for producer resource
- * @release_resource: function which should be called to release resource,
- *			NULL should be provided for producer resource
- *
- * IPA RM client is expected to perform non blocking operations only
- * in request_resource and release_resource functions and
- * release notification context as soon as possible.
- */
-struct ipa_rm_create_params {
-	enum ipa_rm_resource_name name;
-	enum ipa_voltage_level floor_voltage;
-	struct ipa_rm_register_params reg_params;
-	int (*request_resource)(void);
-	int (*release_resource)(void);
-};
-
-/**
- * struct ipa_rm_perf_profile - information regarding IPA RM client performance
- * profile
- *
- * @max_bandwidth_mbps: maximum bandwidth need of the client in Mbps
- */
-struct ipa_rm_perf_profile {
-	u32 max_supported_bandwidth_mbps;
-};
-
-#define A2_MUX_HDR_NAME_V4_PREF "dmux_hdr_v4_"
-#define A2_MUX_HDR_NAME_V6_PREF "dmux_hdr_v6_"
-
-/**
- * struct  ipa_tx_data_desc - information needed
- * to send data packet to HW link: link to data descriptors
- * priv: client specific private data
- * @pyld_buffer: pointer to the data buffer that holds frame
- * @pyld_len: length of the data packet
- */
-struct ipa_tx_data_desc {
-	struct list_head link;
-	void *priv;
-	void *pyld_buffer;
-	u16  pyld_len;
-};
-
-/**
- * struct  ipa_rx_data - information needed
- * to send to wlan driver on receiving data from ipa hw
- * @skb: skb
- * @dma_addr: DMA address of this Rx packet
- */
-struct ipa_rx_data {
-	struct sk_buff *skb;
-	dma_addr_t dma_addr;
-};
-
-/**
- * enum ipa_irq_type - IPA Interrupt Type
- * Used to register handlers for IPA interrupts
- *
- * Below enum is a logical mapping and not the actual interrupt bit in HW
- */
-enum ipa_irq_type {
-	IPA_BAD_SNOC_ACCESS_IRQ,
-	IPA_UC_IRQ_0,
-	IPA_UC_IRQ_1,
-	IPA_UC_IRQ_2,
-	IPA_UC_IRQ_3,
-	IPA_UC_IN_Q_NOT_EMPTY_IRQ,
-	IPA_UC_RX_CMD_Q_NOT_FULL_IRQ,
-	IPA_PROC_TO_UC_ACK_Q_NOT_EMPTY_IRQ,
-	IPA_RX_ERR_IRQ,
-	IPA_DEAGGR_ERR_IRQ,
-	IPA_TX_ERR_IRQ,
-	IPA_STEP_MODE_IRQ,
-	IPA_PROC_ERR_IRQ,
-	IPA_TX_SUSPEND_IRQ,
-	IPA_TX_HOLB_DROP_IRQ,
-	IPA_BAM_GSI_IDLE_IRQ,
-	IPA_PIPE_YELLOW_MARKER_BELOW_IRQ,
-	IPA_PIPE_RED_MARKER_BELOW_IRQ,
-	IPA_PIPE_YELLOW_MARKER_ABOVE_IRQ,
-	IPA_PIPE_RED_MARKER_ABOVE_IRQ,
-	IPA_UCP_IRQ,
-	IPA_DCMP_IRQ,
-	IPA_GSI_EE_IRQ,
-	IPA_GSI_IPA_IF_TLV_RCVD_IRQ,
-	IPA_GSI_UC_IRQ,
-	IPA_TLV_LEN_MIN_DSM_IRQ,
-	IPA_DRBIP_PKT_EXCEED_MAX_SIZE_IRQ,
-	IPA_DRBIP_DATA_SCTR_CFG_ERROR_IRQ,
-	IPA_DRBIP_IMM_CMD_NO_FLSH_HZRD_IRQ,
-	IPA_IRQ_MAX
-};
-
-/**
- * typedef ipa_irq_handler_t - irq handler/callback type
- * @param ipa_irq_type - [in] interrupt type
- * @param private_data - [in, out] the client private data
- * @param interrupt_data - [out] interrupt information data
- *
- * callback registered by ipa_add_interrupt_handler function to
- * handle a specific interrupt type
- *
- * No return value
- */
-typedef void (*ipa_irq_handler_t)(enum ipa_irq_type interrupt,
-				void *private_data,
-				void *interrupt_data);
-
-/**
- * struct IpaHwBamStats_t - Structure holding the BAM statistics
- *
- * @bamFifoFull : Number of times Bam Fifo got full - For In Ch: Good,
- * For Out Ch: Bad
- * @bamFifoEmpty : Number of times Bam Fifo got empty - For In Ch: Bad,
- * For Out Ch: Good
- * @bamFifoUsageHigh : Number of times Bam fifo usage went above 75% -
- * For In Ch: Good, For Out Ch: Bad
- * @bamFifoUsageLow : Number of times Bam fifo usage went below 25% -
- * For In Ch: Bad, For Out Ch: Good
- */
-struct IpaHwBamStats_t {
-	u32 bamFifoFull;
-	u32 bamFifoEmpty;
-	u32 bamFifoUsageHigh;
-	u32 bamFifoUsageLow;
-	u32 bamUtilCount;
-} __packed;
-
-/**
- * struct IpaHwRingStats_t - Structure holding the Ring statistics
- *
- * @ringFull : Number of times Transfer Ring got full - For In Ch: Good,
- * For Out Ch: Bad
- * @ringEmpty : Number of times Transfer Ring got empty - For In Ch: Bad,
- * For Out Ch: Good
- * @ringUsageHigh : Number of times Transfer Ring usage went above 75% -
- * For In Ch: Good, For Out Ch: Bad
- * @ringUsageLow : Number of times Transfer Ring usage went below 25% -
- * For In Ch: Bad, For Out Ch: Good
- */
-struct IpaHwRingStats_t {
-	u32 ringFull;
-	u32 ringEmpty;
-	u32 ringUsageHigh;
-	u32 ringUsageLow;
-	u32 RingUtilCount;
-} __packed;
-
-/**
- * struct IpaHwStatsWDIRxInfoData_t - Structure holding the WDI Rx channel
- * structures
- *
- * @max_outstanding_pkts : Number of outstanding packets in Rx Ring
- * @num_pkts_processed : Number of packets processed - cumulative
- * @rx_ring_rp_value : Read pointer last advertized to the WLAN FW
- * @rx_ind_ring_stats : Ring info
- * @bam_stats : BAM info
- * @num_bam_int_handled : Number of Bam Interrupts handled by FW
- * @num_db : Number of times the doorbell was rung
- * @num_unexpected_db : Number of unexpected doorbells
- * @num_pkts_in_dis_uninit_state : number of completions we
- *		received in disabled or uninitialized state
- * @num_ic_inj_vdev_change : Number of times the Imm Cmd is
- *		injected due to vdev_id change
- * @num_ic_inj_fw_desc_change : Number of times the Imm Cmd is
- *		injected due to fw_desc change
- * @num_qmb_int_handled : Number of QMB interrupts handled
- */
-struct IpaHwStatsWDIRxInfoData_t {
-	u32 max_outstanding_pkts;
-	u32 num_pkts_processed;
-	u32 rx_ring_rp_value;
-	struct IpaHwRingStats_t rx_ind_ring_stats;
-	struct IpaHwBamStats_t bam_stats;
-	u32 num_bam_int_handled;
-	u32 num_db;
-	u32 num_unexpected_db;
-	u32 num_pkts_in_dis_uninit_state;
-	u32 num_ic_inj_vdev_change;
-	u32 num_ic_inj_fw_desc_change;
-	u32 num_qmb_int_handled;
-	u32 reserved1;
-	u32 reserved2;
-} __packed;
-
-/**
- * struct IpaHwStatsWDITxInfoData_t  - Structure holding the WDI Tx channel
- * structures
- *
- * @num_pkts_processed : Number of packets processed - cumulative
- * @copy_engine_doorbell_value : latest value of doorbell written to copy engine
- * @num_db_fired : Number of DB from uC FW to Copy engine
- * @tx_comp_ring_stats : ring info
- * @bam_stats : BAM info
- * @num_db : Number of times the doorbell was rung
- * @num_unexpected_db : Number of unexpected doorbells
- * @num_bam_int_handled : Number of Bam Interrupts handled by FW
- * @num_bam_int_in_non_running_state : Number of Bam interrupts while not in
- * Running state
- * @num_qmb_int_handled : Number of QMB interrupts handled
- */
-struct IpaHwStatsWDITxInfoData_t {
-	u32 num_pkts_processed;
-	u32 copy_engine_doorbell_value;
-	u32 num_db_fired;
-	struct IpaHwRingStats_t tx_comp_ring_stats;
-	struct IpaHwBamStats_t bam_stats;
-	u32 num_db;
-	u32 num_unexpected_db;
-	u32 num_bam_int_handled;
-	u32 num_bam_int_in_non_running_state;
-	u32 num_qmb_int_handled;
-	u32 num_bam_int_handled_while_wait_for_bam;
-} __packed;
-
-/**
- * struct IpaHwStatsWDIInfoData_t - Structure holding the WDI channel structures
- *
- * @rx_ch_stats : RX stats
- * @tx_ch_stats : TX stats
- */
-struct IpaHwStatsWDIInfoData_t {
-	struct IpaHwStatsWDIRxInfoData_t rx_ch_stats;
-	struct IpaHwStatsWDITxInfoData_t tx_ch_stats;
-} __packed;
-
-
-/**
- * struct  ipa_wdi_ul_params - WDI_RX configuration
- * @rdy_ring_base_pa: physical address of the base of the Rx ring (containing
- * Rx buffers)
- * @rdy_ring_size: size of the Rx ring in bytes
- * @rdy_ring_rp_pa: physical address of the location through which IPA uc is
- * reading (WDI-1.0)
- * @rdy_comp_ring_base_pa: physical address of the base of the Rx completion
- * ring (WDI-2.0)
- * @rdy_comp_ring_wp_pa: physical address of the location through which IPA
- * uc is writing (WDI-2.0)
- * @rdy_comp_ring_size: size of the Rx_completion ring in bytes
- * expected to communicate about the Read pointer into the Rx Ring
- */
-struct ipa_wdi_ul_params {
-	phys_addr_t rdy_ring_base_pa;
-	u32 rdy_ring_size;
-	phys_addr_t rdy_ring_rp_pa;
-	phys_addr_t rdy_comp_ring_base_pa;
-	phys_addr_t rdy_comp_ring_wp_pa;
-	u32 rdy_comp_ring_size;
-	u32 *rdy_ring_rp_va;
-	u32 *rdy_comp_ring_wp_va;
-};
-
-/**
- * struct  ipa_wdi_ul_params_smmu - WDI_RX configuration (with WLAN SMMU)
- * @rdy_ring: SG table describing the Rx ring (containing Rx buffers)
- * @rdy_ring_size: size of the Rx ring in bytes
- * @rdy_ring_rp_pa: physical address of the location through which IPA uc is
- * expected to communicate about the Read pointer into the Rx Ring
- */
-struct ipa_wdi_ul_params_smmu {
-	struct sg_table rdy_ring;
-	u32 rdy_ring_size;
-	phys_addr_t rdy_ring_rp_pa;
-	struct sg_table rdy_comp_ring;
-	phys_addr_t rdy_comp_ring_wp_pa;
-	u32 rdy_comp_ring_size;
-	u32 *rdy_ring_rp_va;
-	u32 *rdy_comp_ring_wp_va;
-};
-
-/**
- * struct  ipa_wdi_dl_params - WDI_TX configuration
- * @comp_ring_base_pa: physical address of the base of the Tx completion ring
- * @comp_ring_size: size of the Tx completion ring in bytes
- * @ce_ring_base_pa: physical address of the base of the Copy Engine Source
- * Ring
- * @ce_door_bell_pa: physical address of the doorbell that the IPA uC has to
- * write into to trigger the copy engine
- * @ce_ring_size: Copy Engine Ring size in bytes
- * @num_tx_buffers: Number of pkt buffers allocated
- */
-struct ipa_wdi_dl_params {
-	phys_addr_t comp_ring_base_pa;
-	u32 comp_ring_size;
-	phys_addr_t ce_ring_base_pa;
-	phys_addr_t ce_door_bell_pa;
-	u32 ce_ring_size;
-	u32 num_tx_buffers;
-};
-
-/**
- * struct  ipa_wdi_dl_params_smmu - WDI_TX configuration (with WLAN SMMU)
- * @comp_ring: SG table describing the Tx completion ring
- * @comp_ring_size: size of the Tx completion ring in bytes
- * @ce_ring: SG table describing the Copy Engine Source Ring
- * @ce_door_bell_pa: physical address of the doorbell that the IPA uC has to
- * write into to trigger the copy engine
- * @ce_ring_size: Copy Engine Ring size in bytes
- * @num_tx_buffers: Number of pkt buffers allocated
- */
-struct ipa_wdi_dl_params_smmu {
-	struct sg_table comp_ring;
-	u32 comp_ring_size;
-	struct sg_table ce_ring;
-	phys_addr_t ce_door_bell_pa;
-	u32 ce_ring_size;
-	u32 num_tx_buffers;
-};
-
-/**
- * struct  ipa_wdi_in_params - information provided by WDI client
- * @sys: IPA EP configuration info
- * @ul: WDI_RX configuration info
- * @dl: WDI_TX configuration info
- * @ul_smmu: WDI_RX configuration info when WLAN uses SMMU
- * @dl_smmu: WDI_TX configuration info when WLAN uses SMMU
- * @smmu_enabled: true if WLAN uses SMMU
- * @ipa_wdi_meter_notifier_cb: Get WDI stats and quato info
- */
-struct ipa_wdi_in_params {
-	struct ipa_sys_connect_params sys;
-	union {
-		struct ipa_wdi_ul_params ul;
-		struct ipa_wdi_dl_params dl;
-		struct ipa_wdi_ul_params_smmu ul_smmu;
-		struct ipa_wdi_dl_params_smmu dl_smmu;
-	} u;
-	bool smmu_enabled;
-#ifdef IPA_WAN_MSG_IPv6_ADDR_GW_LEN
-	ipa_wdi_meter_notifier_cb wdi_notify;
-#endif
-};
-
-enum ipa_upstream_type {
-	IPA_UPSTEAM_MODEM = 1,
-	IPA_UPSTEAM_WLAN,
-	IPA_UPSTEAM_MAX
-};
-
-/**
- * struct  ipa_wdi_out_params - information provided to WDI client
- * @uc_door_bell_pa: physical address of IPA uc doorbell
- * @clnt_hdl: opaque handle assigned to client
- */
-struct ipa_wdi_out_params {
-	phys_addr_t uc_door_bell_pa;
-	u32 clnt_hdl;
-};
-
-/**
- * struct ipa_wdi_db_params - information provided to retrieve
- *       physical address of uC doorbell
- * @client:	type of "client" (IPA_CLIENT_WLAN#_PROD/CONS)
- * @uc_door_bell_pa: physical address of IPA uc doorbell
- */
-struct ipa_wdi_db_params {
-	enum ipa_client_type client;
-	phys_addr_t uc_door_bell_pa;
-};
-
-/**
- * struct  ipa_wdi_uc_ready_params - uC ready CB parameters
- * @is_uC_ready: uC loaded or not
- * @priv : callback cookie
- * @notify:	callback
- */
-typedef void (*ipa_uc_ready_cb)(void *priv);
-struct ipa_wdi_uc_ready_params {
-	bool is_uC_ready;
-	void *priv;
-	ipa_uc_ready_cb notify;
-};
-
-/**
- * struct  ipa_wdi_buffer_info - address info of a WLAN allocated buffer
- * @pa: physical address of the buffer
- * @iova: IOVA of the buffer as embedded inside the WDI descriptors
- * @size: size in bytes of the buffer
- * @result: result of map or unmap operations (out param)
- *
- * IPA driver will create/release IOMMU mapping in IPA SMMU from iova->pa
- */
-struct ipa_wdi_buffer_info {
-	phys_addr_t pa;
-	unsigned long iova;
-	size_t size;
-	int result;
-};
-
-/**
- * struct  ipa_wdi_bw_info - address info of a WLAN allocated buffer
- * @threshold: throughput wants to be monitored
- * @num: number of threshold entries
- * @stop: true to stop monitoring
- *
- * IPA driver will create/release IOMMU mapping in IPA SMMU from iova->pa
- */
-struct ipa_wdi_bw_info {
-	uint64_t threshold[IPA_BW_THRESHOLD_MAX];
-	int num;
-	bool stop;
-};
-
-/**
- * struct  ipa_wdi_tx_info - sw tx info from WLAN
- * @sta_tx: sw tx stats on sta interface
- * @ap_tx: sw tx stats on ap interface
- *
- * IPA driver will create/release IOMMU mapping in IPA SMMU from iova->pa
- */
-struct ipa_wdi_tx_info {
-	uint64_t sta_tx;
-	uint64_t ap_tx;
-};
-
-/**
- * struct ipa_gsi_ep_config - IPA GSI endpoint configurations
- *
- * @ipa_ep_num: IPA EP pipe number
- * @ipa_gsi_chan_num: GSI channel number
- * @ipa_if_tlv: number of IPA_IF TLV
- * @ipa_if_aos: number of IPA_IF AOS
- * @ee: Execution environment
- * @prefetch_mode: Prefetch mode to be used
- * @prefetch_threshold: Prefetch empty level threshold.
- *  relevant for smart and free prefetch modes
- */
-struct ipa_gsi_ep_config {
-	int ipa_ep_num;
-	int ipa_gsi_chan_num;
-	int ipa_if_tlv;
-	int ipa_if_aos;
-	int ee;
-	enum gsi_prefetch_mode prefetch_mode;
-	uint8_t prefetch_threshold;
-};
-
-/**
- * struct  ipa_smmu_in_params - information provided from client
- * @ipa_smmu_client_type: clinet requesting for the smmu info.
- */
-
-enum ipa_smmu_client_type {
-	IPA_SMMU_WLAN_CLIENT,
-	IPA_SMMU_AP_CLIENT,
-	IPA_SMMU_WIGIG_CLIENT,
-	IPA_SMMU_CLIENT_MAX
-};
-
-struct ipa_smmu_in_params {
-	enum ipa_smmu_client_type smmu_client;
-};
-
-/**
- * struct  ipa_smmu_out_params - information provided to IPA client
- * @smmu_enable: IPA S1 SMMU enable/disable status
- * @shared_cb: is client CB shared (mappings should be done by client only)
- */
-struct ipa_smmu_out_params {
-	bool smmu_enable;
-	bool shared_cb;
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-/*
- * Configuration
- */
-
-/**
- * ipa_cfg_ep_ctrl() -  IPA end-point Control configuration
- * @clnt_hdl:	[in] opaque client handle assigned by IPA to client
- * @ipa_ep_cfg_ctrl:	[in] IPA end-point configuration params
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_cfg_ep_ctrl(u32 clnt_hdl, const struct ipa_ep_cfg_ctrl *ep_ctrl);
-
-/*
- * Routing
- */
-
-/**
- * ipa_add_rt_rule() - Add the specified routing rules to SW and optionally
- * commit to IPA HW
- * @rules:	[inout] set of routing rules to add
- *
- * Returns:	0 on success, negative on failure
- *
- * Note:	Should not be called from atomic context
- */
-int ipa_add_rt_rule(struct ipa_ioc_add_rt_rule *rules);
-
-/**
- * ipa_put_rt_tbl() - Release the specified routing table handle
- * @rt_tbl_hdl:	[in] the routing table handle to release
- *
- * Returns:	0 on success, negative on failure
- *
- * Note:	Should not be called from atomic context
- */
-int ipa_put_rt_tbl(u32 rt_tbl_hdl);
-
-/*
- * Interface
- */
-int ipa_register_intf(const char *name,
-	const struct ipa_tx_intf *tx,
-	const struct ipa_rx_intf *rx);
-
-/*
- * Aggregation
- */
-
-/**
- * ipa_set_aggr_mode() - Set the aggregation mode which is a global setting
- * @mode:	[in] the desired aggregation mode for e.g. straight MBIM, QCNCM,
- * etc
- *
- * Returns:	0 on success
- */
-
-int ipa_set_aggr_mode(enum ipa_aggr_mode mode);
-
-/**
- * ipa_set_qcncm_ndp_sig() - Set the NDP signature used for QCNCM aggregation
- * mode
- * @sig:	[in] the first 3 bytes of QCNCM NDP signature (expected to be
- * "QND")
- *
- * Set the NDP signature used for QCNCM aggregation mode. The fourth byte
- * (expected to be 'P') needs to be set using the header addition mechanism
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_set_qcncm_ndp_sig(char sig[3]);
-
-/**
- * ipa_set_single_ndp_per_mbim() - Enable/disable single NDP per MBIM frame
- * configuration
- * @enable:	[in] true for single NDP/MBIM; false otherwise
- *
- * Returns:	0 on success
- */
-int ipa_set_single_ndp_per_mbim(bool enable);
-
-/*
- * interrupts
- */
-
-/**
- * ipa_add_interrupt_handler() - Adds handler to an interrupt type
- * @interrupt:		Interrupt type
- * @handler:		The handler to be added
- * @deferred_flag:	whether the handler processing should be deferred in
- *			a workqueue
- * @private_data:	the client's private data
- *
- * Adds handler to an interrupt type and enable the specific bit
- * in IRQ_EN register, associated interrupt in IRQ_STTS register will be enabled
- */
-
-int ipa_add_interrupt_handler(enum ipa_irq_type interrupt,
-	ipa_irq_handler_t handler,
-	bool deferred_flag,
-	void *private_data);
-
-/**
- * ipa_restore_suspend_handler() - restores the original suspend IRQ handler
- * as it was registered in the IPA init sequence.
- * Return codes:
- * 0: success
- * -EPERM: failed to remove current handler or failed to add original handler
- */
-int ipa_restore_suspend_handler(void);
-
-/*
- * Messaging
- */
-
-/**
- * ipa_send_msg() - Send "message" from kernel client to IPA driver
- * @meta: [in] message meta-data
- * @buff: [in] the payload for message
- * @callback: [in] free callback
- *
- * Client supplies the message meta-data and payload which IPA driver buffers
- * till read by user-space. After read from user space IPA driver invokes the
- * callback supplied to free the message payload. Client must not touch/free
- * the message payload after calling this API.
- *
- * Returns:	0 on success, negative on failure
- *
- * Note:	Should not be called from atomic context
- */
-int ipa_send_msg(struct ipa_msg_meta *meta, void *buff,
-		  ipa_msg_free_fn callback);
-
-/*
- * Data path
- */
-
-/**
- * ipa_tx_dp() - Data-path tx handler
- * @dst:	[in] which IPA destination to route tx packets to
- * @skb:	[in] the packet to send
- * @metadata:	[in] TX packet meta-data
- *
- * Data-path tx handler, this is used for both SW data-path which by-passes most
- * IPA HW blocks AND the regular HW data-path for WLAN AMPDU traffic only. If
- * dst is a "valid" CONS type, then SW data-path is used. If dst is the
- * WLAN_AMPDU PROD type, then HW data-path for WLAN AMPDU is used. Anything else
- * is an error. For errors, client needs to free the skb as needed. For success,
- * IPA driver will later invoke client callback if one was supplied. That
- * callback should free the skb. If no callback supplied, IPA driver will free
- * the skb internally
- *
- * The function will use two descriptors for this send command
- * (for A5_WLAN_AMPDU_PROD only one desciprtor will be sent),
- * the first descriptor will be used to inform the IPA hardware that
- * apps need to push data into the IPA (IP_PACKET_INIT immediate command).
- * Once this send was done from SPS point-of-view the IPA driver will
- * get notified by the supplied callback - ipa_sps_irq_tx_comp()
- *
- * ipa_sps_irq_tx_comp will call to the user supplied
- * callback (from ipa_connect)
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
-		struct ipa_tx_meta *metadata);
-
-/*
- * ipa_rmnet_ctl_xmit - QMAP Flow control TX
- *
- * @skb - tx QMAP control packet
- *
- * Note: This need to be called after client receive rmnet_ctl_
- * ready_cb and want to send TX flow control message.
- *
- * This funciton will return 0 on success, -EAGAIN if pipe if full.
- */
-int ipa_rmnet_ctl_xmit(struct sk_buff *skb);
-
-void ipa_free_skb(struct ipa_rx_data *data);
-
-/*
- * System pipes
- */
-
-/**
- * ipa_setup_sys_pipe() - Setup an IPA end-point in system-BAM mode and perform
- * IPA EP configuration
- * @sys_in:	[in] input needed to setup BAM pipe and configure EP
- * @clnt_hdl:	[out] client handle
- *
- *  - configure the end-point registers with the supplied
- *    parameters from the user.
- *  - call SPS APIs to create a system-to-bam connection with IPA.
- *  - allocate descriptor FIFO
- *  - register callback function(ipa_sps_irq_rx_notify or
- *    ipa_sps_irq_tx_notify - depends on client type) in case the driver is
- *    not configured to pulling mode
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl);
-
-/**
- * ipa_teardown_sys_pipe() - Teardown the system-BAM pipe and cleanup IPA EP
- * @clnt_hdl:	[in] the handle obtained from ipa_setup_sys_pipe
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_teardown_sys_pipe(u32 clnt_hdl);
-
-int ipa_connect_wdi_pipe(struct ipa_wdi_in_params *in,
-		struct ipa_wdi_out_params *out);
-int ipa_disconnect_wdi_pipe(u32 clnt_hdl);
-int ipa_enable_wdi_pipe(u32 clnt_hdl);
-int ipa_disable_wdi_pipe(u32 clnt_hdl);
-int ipa_resume_wdi_pipe(u32 clnt_hdl);
-int ipa_suspend_wdi_pipe(u32 clnt_hdl);
-
-/**
- * ipa_get_wdi_stats() - Query WDI statistics from uc
- * @stats:	[inout] stats blob from client populated by driver
- *
- * Returns:	0 on success, negative on failure
- *
- * @note Cannot be called from atomic context
- *
- */
-int ipa_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats);
-int ipa_uc_bw_monitor(struct ipa_wdi_bw_info *info);
-
-/**
- * ipa_broadcast_wdi_quota_reach_ind() - quota reach
- * @uint32_t fid: [in] input netdev ID
- * @uint64_t num_bytes: [in] used bytes
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_broadcast_wdi_quota_reach_ind(uint32_t fid,
-		uint64_t num_bytes);
-
-/*
- * To retrieve doorbell physical address of
- * wlan pipes
- */
-int ipa_uc_wdi_get_dbpa(struct ipa_wdi_db_params *out);
-
-/*
- * IPADMA
- */
- /**
-  * ipa_dma_init() -Initialize IPADMA.
-  *
-  * This function initialize all IPADMA internal data and connect in dma:
-  *	MEMCPY_DMA_SYNC_PROD ->MEMCPY_DMA_SYNC_CONS
-  *	MEMCPY_DMA_ASYNC_PROD->MEMCPY_DMA_SYNC_CONS
-  *
-  * Return codes: 0: success
-  *		-EFAULT: IPADMA is already initialized
-  *		-ENOMEM: allocating memory error
-  *		-EPERM: pipe connection failed
-  */
-int ipa_dma_init(void);
-
-/**
- * ipa_dma_enable() -Vote for IPA clocks.
- *
- *Return codes: 0: success
- *		-EINVAL: IPADMA is not initialized
- *		-EPERM: Operation not permitted as ipa_dma is already
- *		 enabled
- */
-int ipa_dma_enable(void);
-
-
-/**
- * ipa_dma_disable()- Unvote for IPA clocks.
- *
- * enter to power save mode.
- *
- * Return codes: 0: success
- *		-EINVAL: IPADMA is not initialized
- *		-EPERM: Operation not permitted as ipa_dma is already
- *			diabled
- *		-EFAULT: can not disable ipa_dma as there are pending
- *			memcopy works
- */
-int ipa_dma_disable(void);
-
-/**
- * ipa_dma_sync_memcpy()- Perform synchronous memcpy using IPA.
- *
- * @dest: physical address to store the copied data.
- * @src: physical address of the source data to copy.
- * @len: number of bytes to copy.
- *
- * Return codes: 0: success
- *		-EINVAL: invalid params
- *		-EPERM: operation not permitted as ipa_dma isn't enable or
- *			initialized
- *		-SPS_ERROR: on sps faliures
- *		-EFAULT: other
- */
-int ipa_dma_sync_memcpy(u64 dest, u64 src, int len);
-
-/**
- * ipa_dma_async_memcpy()- Perform asynchronous memcpy using IPA.
- *
- * @dest: physical address to store the copied data.
- * @src: physical address of the source data to copy.
- * @len: number of bytes to copy.
- * @user_cb: callback function to notify the client when the copy was done.
- * @user_param: cookie for user_cb.
- *
- * Return codes: 0: success
- *		-EINVAL: invalid params
- *		-EPERM: operation not permitted as ipa_dma isn't enable or
- *			initialized
- *		-SPS_ERROR: on sps faliures
- *		-EFAULT: descr fifo is full.
- */
-int ipa_dma_async_memcpy(u64 dest, u64 src, int len,
-			void (*user_cb)(void *user1), void *user_param);
-
-
-/**
- * ipa_dma_destroy() -teardown IPADMA pipes and release ipadma.
- *
- * this is a blocking function, returns just after destroying IPADMA.
- */
-void ipa_dma_destroy(void);
-
-/*
- * Miscellaneous
- */
-
-int ipa_get_ep_mapping(enum ipa_client_type client);
-
-bool ipa_is_ready(void);
-
-enum ipa_hw_type ipa_get_hw_type(void);
-
-const struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(
-	enum ipa_client_type client);
-
-int ipa_stop_gsi_channel(u32 clnt_hdl);
-
-typedef void (*ipa_ready_cb)(void *user_data);
-
-typedef void (*ipa_rmnet_ctl_ready_cb)(void *user_data);
-
-typedef void (*ipa_rmnet_ctl_stop_cb)(void *user_data);
-
-typedef void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data, void *rx_data);
-
-/**
- * ipa_register_ipa_ready_cb() - register a callback to be invoked
- * when IPA core driver initialization is complete.
- *
- * @ipa_ready_cb:    CB to be triggered.
- * @user_data:       Data to be sent to the originator of the CB.
- *
- * Note: This function is expected to be utilized when ipa_is_ready
- * function returns false.
- * An IPA client may also use this function directly rather than
- * calling ipa_is_ready beforehand, as if this API returns -EEXIST,
- * this means IPA initialization is complete (and no callback will
- * be triggered).
- * When the callback is triggered, the client MUST perform his
- * operations in a different context.
- *
- * The function will return 0 on success, -ENOMEM on memory issues and
- * -EEXIST if IPA initialization is complete already.
- */
-int ipa_register_ipa_ready_cb(void (*ipa_ready_cb)(void *user_data),
-			      void *user_data);
-
-/**
- * ipa_register_rmnet_ctl_cb() - register callbacks to be invoked
- * to rmnet_ctl for qmap flow control pipes setup/teardown/rx_notify.
- *
- * @ipa_rmnet_ctl_ready_cb:  CB to be called when pipes setup.
- * @user_data1: user_data for ipa_rmnet_ctl_ready_cb.
- * @ipa_rmnet_ctl_stop_cb: CB to be called when pipes teardown.
- * @user_data2: user_data for ipa_rmnet_ctl_stop_cb.
- * @ipa_rmnet_ctl_rx_notify_cb: CB to be called when receive rx pkts.
- * @user_data3: user_data for ipa_rmnet_ctl_rx_notify_cb.
- * @rx_data: RX data buffer.
- *
- * Note: This function is expected to be utilized for rmnet_ctl
- * module when new qmap flow control is enabled.
- *
- * The function will return 0 on success, -EAGAIN if IPA not ready,
- * -ENXIO is feature is not enabled, -EEXIST if already called.
- */
-int ipa_register_rmnet_ctl_cb(
-	void (*ipa_rmnet_ctl_ready_cb)(void *user_data1),
-	void *user_data1,
-	void (*ipa_rmnet_ctl_stop_cb)(void *user_data2),
-	void *user_data2,
-	void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data3, void *rx_data),
-	void *user_data3);
-
-/**
- * ipa_unregister_rmnet_ctl_cb() - unregister callbacks to be
- * invoked to rmnet_ctl for qmap flow control pipes
- * setup/teardown/rx_notify.
- *
- * Note: This function is expected to be utilized for rmnet_ctl
- * module when new qmap flow control is enabled.
- *
- * The function will return 0 on success, -EAGAIN if IPA not ready,
- * -ENXIO is feature is not enabled.
- */
-int ipa_unregister_rmnet_ctl_cb(void);
-
-int ipa_get_smmu_params(struct ipa_smmu_in_params *in,
-	struct ipa_smmu_out_params *out);
-/**
- * ipa_is_vlan_mode - check if a LAN driver should load in VLAN mode
- * @iface - type of vlan capable device
- * @res - query result: true for vlan mode, false for non vlan mode
- *
- * API must be called after ipa_is_ready() returns true, otherwise it will fail
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_is_vlan_mode(enum ipa_vlan_ifaces iface, bool *res);
-
-/**
- * ipa_get_lan_rx_napi - returns true if NAPI is enabled in the LAN RX dp
- */
-bool ipa_get_lan_rx_napi(void);
-
-int ipa_mhi_handle_ipa_config_req(struct ipa_config_req_msg_v01 *config_req);
-int ipa_wigig_save_regs(void);
-
-/*
- * this function needs to be removed, but wlan driver is checking return value
- * to see if IPA is present, so we can't return -EPERM
- */
-static inline int ipa_uc_reg_rdyCB(
-	struct ipa_wdi_uc_ready_params *inout)
-{
-	return -EFAULT;
-}
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-/*
- * Configuration
- */
-static inline int ipa_cfg_ep_ctrl(u32 clnt_hdl,
-	const struct ipa_ep_cfg_ctrl *ep_ctrl)
-{
-	return -EPERM;
-}
-
-/*
- * Routing
- */
-static inline int ipa_add_rt_rule(struct ipa_ioc_add_rt_rule *rules)
-{
-	return -EPERM;
-}
-
-static inline int ipa_put_rt_tbl(u32 rt_tbl_hdl)
-{
-	return -EPERM;
-}
-
-/*
- * Interface
- */
-static inline int ipa_register_intf(const char *name,
-	const struct ipa_tx_intf *tx,
-	const struct ipa_rx_intf *rx)
-{
-	return -EPERM;
-}
-
-/*
- * Aggregation
- */
-static inline int ipa_set_aggr_mode(enum ipa_aggr_mode mode)
-{
-	return -EPERM;
-}
-
-static inline int ipa_set_qcncm_ndp_sig(char sig[3])
-{
-	return -EPERM;
-}
-
-static inline int ipa_set_single_ndp_per_mbim(bool enable)
-{
-	return -EPERM;
-}
-
-/*
- * interrupts
- */
-static inline int ipa_add_interrupt_handler(enum ipa_irq_type interrupt,
-	ipa_irq_handler_t handler,
-	bool deferred_flag,
-	void *private_data)
-{
-	return -EPERM;
-}
-
-static inline int ipa_restore_suspend_handler(void)
-{
-	return -EPERM;
-}
-
-/*
- * Messaging
- */
-static inline int ipa_send_msg(struct ipa_msg_meta *meta, void *buff,
-		ipa_msg_free_fn callback)
-{
-	return -EPERM;
-}
-
-/*
- * Data path
- */
-static inline int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
-		struct ipa_tx_meta *metadata)
-{
-	return -EPERM;
-}
-
-/*
- * QMAP Flow control TX
- */
-static inline int ipa_rmnet_ctl_xmit(struct sk_buff *skb)
-{
-	return -EPERM;
-}
-
-static inline void ipa_free_skb(struct ipa_rx_data *rx_in)
-{
-}
-
-/*
- * System pipes
- */
-
-static inline int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in,
-		u32 *clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_teardown_sys_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_connect_wdi_pipe(struct ipa_wdi_in_params *in,
-		struct ipa_wdi_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_disconnect_wdi_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_enable_wdi_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_disable_wdi_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_resume_wdi_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_suspend_wdi_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_broadcast_wdi_quota_reach_ind(uint32_t fid,
-		uint64_t num_bytes)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_wdi_get_dbpa(
-	struct ipa_wdi_db_params *out)
-{
-	return -EPERM;
-}
-
-/*
- * IPADMA
- */
-static inline int ipa_dma_init(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_dma_enable(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_dma_disable(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_dma_sync_memcpy(phys_addr_t dest, phys_addr_t src
-			, int len)
-{
-	return -EPERM;
-}
-
-static inline int ipa_dma_async_memcpy(phys_addr_t dest, phys_addr_t src
-			, int len, void (*user_cb)(void *user1),
-			void *user_param)
-{
-	return -EPERM;
-}
-
-static inline void ipa_dma_destroy(void)
-{
-}
-
-/*
- * Miscellaneous
- */
-static inline int ipa_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_bw_monitor(struct ipa_wdi_bw_info *info)
-{
-	return -EPERM;
-}
-
-static inline int ipa_get_ep_mapping(enum ipa_client_type client)
-{
-	return -EPERM;
-}
-
-static inline bool ipa_is_ready(void)
-{
-	return false;
-}
-
-static inline enum ipa_hw_type ipa_get_hw_type(void)
-{
-	return IPA_HW_None;
-}
-
-static inline int ipa_register_ipa_ready_cb(
-	void (*ipa_ready_cb)(void *user_data),
-	void *user_data)
-{
-	return -EPERM;
-}
-
-static inline int ipa_get_smmu_params(struct ipa_smmu_in_params *in,
-	struct ipa_smmu_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_is_vlan_mode(enum ipa_vlan_ifaces iface, bool *res)
-{
-	return -EPERM;
-}
-
-static inline bool ipa_get_lan_rx_napi(void)
-{
-	return false;
-}
-
-static inline const struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(
-	enum ipa_client_type client)
-{
-	return NULL;
-}
-
-static inline int ipa_stop_gsi_channel(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_register_rmnet_ctl_cb(
-	void (*ipa_rmnet_ctl_ready_cb)(void *user_data1),
-	void *user_data1,
-	void (*ipa_rmnet_ctl_stop_cb)(void *user_data2),
-	void *user_data2,
-	void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data3, void *rx_data),
-	void *user_data3)
-{
-	return -EPERM;
-}
-
-static inline int ipa_unregister_rmnet_ctl_cb(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_reg_rdyCB(
-	struct ipa_wdi_uc_ready_params *inout)
-{
-	return -EPERM;
-}
-
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-
-/* stubs - to be removed once dependent drivers remove references */
-static inline int ipa_reset_endpoint(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_clear_endpoint_delay(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_commit_hdr(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_put_hdr(u32 hdr_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_copy_hdr(struct ipa_ioc_copy_hdr *copy)
-{
-	return -EPERM;
-}
-
-static inline int ipa_register_pull_msg(struct ipa_msg_meta *meta,
-	ipa_msg_pull_fn callback)
-{
-	return -EPERM;
-}
-
-static inline int ipa_deregister_pull_msg(struct ipa_msg_meta *meta)
-{
-	return -EPERM;
-}
-
-static inline int ipa_register_intf_ext(const char *name,
-	const struct ipa_tx_intf *tx,
-	const struct ipa_rx_intf *rx,
-	const struct ipa_ext_intf *ext)
-{
-	return -EPERM;
-}
-
-static inline int ipa_tx_dp_mul(enum ipa_client_type src,
-	struct ipa_tx_data_desc *data_desc)
-{
-	return -EPERM;
-}
-
-static inline u16 ipa_get_smem_restr_bytes(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_create_wdi_mapping(u32 num_buffers,
-	struct ipa_wdi_buffer_info *info)
-{
-	return -EPERM;
-}
-
-static inline int ipa_release_wdi_mapping(u32 num_buffers,
-	struct ipa_wdi_buffer_info *info)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_create_resource(
-	struct ipa_rm_create_params *create_params)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_delete_resource(
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_register(enum ipa_rm_resource_name resource_name,
-	struct ipa_rm_register_params *reg_params)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_deregister(
-	enum ipa_rm_resource_name resource_name,
-	struct ipa_rm_register_params *reg_params)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_set_perf_profile(
-	enum ipa_rm_resource_name resource_name,
-	struct ipa_rm_perf_profile *profile)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_add_dependency(
-	enum ipa_rm_resource_name resource_name,
-	enum ipa_rm_resource_name depends_on_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_add_dependency_sync(
-	enum ipa_rm_resource_name resource_name,
-	enum ipa_rm_resource_name depends_on_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_delete_dependency(
-	enum ipa_rm_resource_name resource_name,
-	enum ipa_rm_resource_name depends_on_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_request_resource(
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_inactivity_timer_init(
-	enum ipa_rm_resource_name resource_name,
-	unsigned long msecs)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_release_resource(
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_notify_completion(enum ipa_rm_event event,
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_inactivity_timer_destroy(
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_inactivity_timer_request_resource(
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_rm_inactivity_timer_release_resource(
-	enum ipa_rm_resource_name resource_name)
-{
-	return -EPERM;
-}
-
-static inline enum ipa_rm_resource_name ipa_get_rm_resource_from_ep(
-	int pipe_idx)
-{
-	return -EPERM;
-}
-
-static inline void ipa_bam_reg_dump(void)
-{
-}
-
-static inline void ipa_proxy_clk_vote(void)
-{
-}
-
-static inline void ipa_proxy_clk_unvote(void)
-{
-}
-
-static inline bool ipa_is_client_handle_valid(u32 clnt_hdl)
-{
-	return false;
-}
-
-static inline enum ipa_client_type ipa_get_client_mapping(int pipe_idx)
-{
-	return -EPERM;
-}
-
-static inline bool ipa_get_modem_cfg_emb_pipe_flt(void)
-{
-	return false;
-}
-
-static inline enum ipa_transport_type ipa_get_transport_type(void)
-{
-	return IPA_TRANSPORT_TYPE_GSI;
-}
-
-static inline struct device *ipa_get_dma_dev(void)
-{
-	return NULL;
-}
-
-static inline struct iommu_domain *ipa_get_smmu_domain(void)
-{
-	return NULL;
-}
-
-static inline int ipa_disable_apps_wan_cons_deaggr(
-	uint32_t agg_size, uint32_t agg_count)
-{
-	return -EPERM;
-}
-
-static inline int ipa_add_hdr(struct ipa_ioc_add_hdr *hdrs)
-{
-	return -EPERM;
-}
-
-static inline int ipa_del_hdr(struct ipa_ioc_del_hdr *hdls)
-{
-	return -EPERM;
-}
-
-static inline int ipa_get_hdr(struct ipa_ioc_get_hdr *lookup)
-{
-	return -EPERM;
-}
-
-static inline int ipa_deregister_intf(const char *name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_dereg_rdyCB(void)
-{
-	return -EPERM;
-}
-
-#endif /* _IPA_H_ */

+ 1 - 1
drivers/platform/msm/ipa/ipa_clients/ecm_ipa.h

@@ -6,7 +6,7 @@
 #ifndef _ECM_IPA_H_
 #define _ECM_IPA_H_
 
-#include "ipa.h"
+#include <linux/ipa.h>
 
 /*
  * @priv: private data given upon ipa_connect

+ 0 - 324
drivers/platform/msm/ipa/ipa_clients/ipa_fmwk.h

@@ -1,324 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2018 - 2020, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_FMWK_H_
-#define _IPA_FMWK_H_
-
-#include <linux/types.h>
-#include "ipa.h"
-#include "ipa_uc_offload.h"
-#include "ipa_mhi.h"
-#include "ipa_wigig.h"
-#include "ipa_wdi3.h"
-#include "ipa_usb.h"
-#include "ipa_odu_bridge.h"
-#include <linux/ipa_qmi_service_v01.h>
-
-struct ipa_core_data {
-	int (*ipa_tx_dp)(enum ipa_client_type dst, struct sk_buff *skb,
-		struct ipa_tx_meta *metadata);
-
-	enum ipa_hw_type (*ipa_get_hw_type)(void);
-
-	int (*ipa_get_smmu_params)(struct ipa_smmu_in_params *in,
-		struct ipa_smmu_out_params *out);
-
-	int (*ipa_is_vlan_mode)(enum ipa_vlan_ifaces iface, bool *res);
-
-	bool (*ipa_get_lan_rx_napi)(void);
-
-	int (*ipa_dma_init)(void);
-
-	int (*ipa_dma_enable)(void);
-
-	int (*ipa_dma_disable)(void);
-
-	int (*ipa_dma_sync_memcpy)(u64 dest, u64 src, int len);
-
-	int (*ipa_dma_async_memcpy)(u64 dest, u64 src, int len,
-		void (*user_cb)(void *user1), void *user_param);
-
-	void (*ipa_dma_destroy)(void);
-
-	int (*ipa_get_ep_mapping)(enum ipa_client_type client);
-
-	int (*ipa_send_msg)(struct ipa_msg_meta *meta, void *buff,
-		ipa_msg_free_fn callback);
-
-	void (*ipa_free_skb)(struct ipa_rx_data *data);
-
-	int (*ipa_setup_sys_pipe)(struct ipa_sys_connect_params *sys_in,
-		u32 *clnt_hdl);
-
-	int (*ipa_teardown_sys_pipe)(u32 clnt_hdl);
-
-	int (*ipa_get_wdi_stats)(struct IpaHwStatsWDIInfoData_t *stats);
-
-	int (*ipa_uc_bw_monitor)(struct ipa_wdi_bw_info *info);
-
-	int (*ipa_broadcast_wdi_quota_reach_ind)(uint32_t fid,
-		uint64_t num_bytes);
-
-	int (*ipa_uc_wdi_get_dbpa)(struct ipa_wdi_db_params *out);
-
-	int (*ipa_cfg_ep_ctrl)(u32 clnt_hdl,
-		const struct ipa_ep_cfg_ctrl *ep_ctrl);
-
-	int (*ipa_add_rt_rule)(struct ipa_ioc_add_rt_rule *rules);
-
-	int (*ipa_put_rt_tbl)(u32 rt_tbl_hdl);
-
-	int (*ipa_register_intf)(const char *name,
-		const struct ipa_tx_intf *tx,
-		const struct ipa_rx_intf *rx);
-
-	int (*ipa_set_aggr_mode)(enum ipa_aggr_mode mode);
-
-	int (*ipa_set_qcncm_ndp_sig)(char sig[3]);
-
-	int (*ipa_set_single_ndp_per_mbim)(bool enable);
-
-	int (*ipa_add_interrupt_handler)(enum ipa_irq_type interrupt,
-		ipa_irq_handler_t handler,
-		bool deferred_flag,
-		void *private_data);
-
-	int (*ipa_restore_suspend_handler)(void);
-
-	const struct ipa_gsi_ep_config *(*ipa_get_gsi_ep_info)(
-		enum ipa_client_type client);
-
-	int (*ipa_stop_gsi_channel)(u32 clnt_hdl);
-
-	int (*ipa_rmnet_ctl_xmit)(struct sk_buff *skb);
-
-	int (*ipa_register_rmnet_ctl_cb)(
-		void (*ipa_rmnet_ctl_ready_cb)(void *user_data1),
-		void *user_data1,
-		void (*ipa_rmnet_ctl_stop_cb)(void *user_data2),
-		void *user_data2,
-		void (*ipa_rmnet_ctl_rx_notify_cb)(
-			void *user_data3, void *rx_data),
-		void *user_data3);
-
-	int (*ipa_unregister_rmnet_ctl_cb)(void);
-};
-
-struct ipa_usb_data {
-	int (*ipa_usb_init_teth_prot)(enum ipa_usb_teth_prot teth_prot,
-		struct ipa_usb_teth_params *teth_params,
-		int (*ipa_usb_notify_cb)(enum ipa_usb_notify_event,
-			void *),
-		void *user_data);
-
-	int (*ipa_usb_xdci_connect)(
-		struct ipa_usb_xdci_chan_params *ul_chan_params,
-		struct ipa_usb_xdci_chan_params *dl_chan_params,
-		struct ipa_req_chan_out_params *ul_out_params,
-		struct ipa_req_chan_out_params *dl_out_params,
-		struct ipa_usb_xdci_connect_params *connect_params);
-
-	int (*ipa_usb_xdci_disconnect)(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-		enum ipa_usb_teth_prot teth_prot);
-
-	int (*ipa_usb_deinit_teth_prot)(enum ipa_usb_teth_prot teth_prot);
-
-	int (*ipa_usb_xdci_suspend)(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-		enum ipa_usb_teth_prot teth_prot,
-		bool with_remote_wakeup);
-
-	int (*ipa_usb_xdci_resume)(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-		enum ipa_usb_teth_prot teth_prot);
-};
-
-struct ipa_wdi3_data {
-	int (*ipa_wdi_init)(struct ipa_wdi_init_in_params *in,
-		struct ipa_wdi_init_out_params *out);
-
-	int (*ipa_wdi_cleanup)(void);
-
-	int (*ipa_wdi_reg_intf)(
-		struct ipa_wdi_reg_intf_in_params *in);
-
-	int (*ipa_wdi_dereg_intf)(const char *netdev_name);
-
-	int (*ipa_wdi_conn_pipes)(struct ipa_wdi_conn_in_params *in,
-		struct ipa_wdi_conn_out_params *out);
-
-	int (*ipa_wdi_disconn_pipes)(void);
-
-	int (*ipa_wdi_enable_pipes)(void);
-
-	int (*ipa_wdi_disable_pipes)(void);
-
-	int (*ipa_wdi_set_perf_profile)(struct ipa_wdi_perf_profile *profile);
-
-	int (*ipa_wdi_create_smmu_mapping)(u32 num_buffers,
-		struct ipa_wdi_buffer_info *info);
-
-	int (*ipa_wdi_release_smmu_mapping)(u32 num_buffers,
-		struct ipa_wdi_buffer_info *info);
-
-	int (*ipa_wdi_get_stats)(struct IpaHwStatsWDIInfoData_t *stats);
-
-	int (*ipa_wdi_bw_monitor)(struct ipa_wdi_bw_info *info);
-
-	int (*ipa_wdi_sw_stats)(struct ipa_wdi_tx_info *info);
-};
-
-struct ipa_gsb_data {
-	int (*ipa_bridge_init)(struct ipa_bridge_init_params *params, u32 *hdl);
-
-	int (*ipa_bridge_connect)(u32 hdl);
-
-	int (*ipa_bridge_set_perf_profile)(u32 hdl, u32 bandwidth);
-
-	int (*ipa_bridge_disconnect)(u32 hdl);
-
-	int (*ipa_bridge_suspend)(u32 hdl);
-
-	int (*ipa_bridge_resume)(u32 hdl);
-
-	int (*ipa_bridge_tx_dp)(u32 hdl, struct sk_buff *skb,
-		struct ipa_tx_meta *metadata);
-
-	int (*ipa_bridge_cleanup)(u32 hdl);
-};
-
-struct ipa_uc_offload_data {
-	int (*ipa_uc_offload_reg_intf)(
-		struct ipa_uc_offload_intf_params *in,
-		struct ipa_uc_offload_out_params *out);
-
-	int (*ipa_uc_offload_cleanup)(u32 clnt_hdl);
-
-	int (*ipa_uc_offload_conn_pipes)(
-		struct ipa_uc_offload_conn_in_params *in,
-		struct ipa_uc_offload_conn_out_params *out);
-
-	int (*ipa_uc_offload_disconn_pipes)(u32 clnt_hdl);
-
-	int (*ipa_set_perf_profile)(struct ipa_perf_profile *profile);
-
-	int (*ipa_uc_offload_reg_rdyCB)(struct ipa_uc_ready_params *param);
-
-	void (*ipa_uc_offload_dereg_rdyCB)(enum ipa_uc_offload_proto proto);
-};
-
-struct ipa_mhi_data {
-	int (*ipa_mhi_init)(struct ipa_mhi_init_params *params);
-
-	int (*ipa_mhi_start)(struct ipa_mhi_start_params *params);
-
-	int (*ipa_mhi_connect_pipe)(struct ipa_mhi_connect_params *in,
-		u32 *clnt_hdl);
-
-	int (*ipa_mhi_disconnect_pipe)(u32 clnt_hdl);
-
-	int (*ipa_mhi_suspend)(bool force);
-
-	int (*ipa_mhi_resume)(void);
-
-	void (*ipa_mhi_destroy)(void);
-
-	int (*ipa_mhi_handle_ipa_config_req)(
-		struct ipa_config_req_msg_v01 *config_req);
-};
-
-struct ipa_wigig_data {
-	int (*ipa_wigig_init)(struct ipa_wigig_init_in_params *in,
-	struct ipa_wigig_init_out_params *out);
-
-	int (*ipa_wigig_cleanup)(void);
-
-	bool (*ipa_wigig_is_smmu_enabled)(void);
-
-	int (*ipa_wigig_reg_intf)(struct ipa_wigig_reg_intf_in_params *in);
-
-	int (*ipa_wigig_dereg_intf)(const char *netdev_name);
-
-	int (*ipa_wigig_conn_rx_pipe)(struct ipa_wigig_conn_rx_in_params *in,
-		struct ipa_wigig_conn_out_params *out);
-
-	int (*ipa_wigig_conn_rx_pipe_smmu)(
-		struct ipa_wigig_conn_rx_in_params_smmu *in,
-		struct ipa_wigig_conn_out_params *out);
-
-	int (*ipa_wigig_conn_client)(struct ipa_wigig_conn_tx_in_params *in,
-		struct ipa_wigig_conn_out_params *out);
-
-	int (*ipa_wigig_conn_client_smmu)(
-		struct ipa_wigig_conn_tx_in_params_smmu *in,
-		struct ipa_wigig_conn_out_params *out);
-
-	int (*ipa_wigig_disconn_pipe)(enum ipa_client_type client);
-
-	int (*ipa_wigig_enable_pipe)(enum ipa_client_type client);
-
-	int (*ipa_wigig_disable_pipe)(enum ipa_client_type client);
-
-	int (*ipa_wigig_tx_dp)(enum ipa_client_type dst, struct sk_buff *skb);
-
-	int (*ipa_wigig_set_perf_profile)(u32 max_supported_bw_mbps);
-
-	int (*ipa_wigig_save_regs)(void);
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-int ipa_fmwk_register_ipa(const struct ipa_core_data *in);
-
-int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in);
-
-int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in);
-
-int ipa_fmwk_register_gsb(const struct ipa_gsb_data *in);
-
-int ipa_fmwk_register_uc_offload(const struct ipa_uc_offload_data *in);
-
-int ipa_fmwk_register_ipa_mhi(const struct ipa_mhi_data *in);
-
-int ipa_fmwk_register_ipa_wigig(const struct ipa_wigig_data *in);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-int ipa_fmwk_register_ipa(const struct ipa_core_data *in)
-{
-	return -EPERM;
-}
-
-int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in)
-{
-	return -EPERM;
-}
-
-int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in)
-{
-	return -EPERM;
-}
-
-int ipa_fmwk_register_gsb(const struct ipa_gsb_data *in)
-{
-	return -EPERM;
-}
-
-int ipa_fmwk_register_uc_offload(const struct ipa_uc_offload_data *in)
-{
-	return -EPERM;
-}
-
-int ipa_fmwk_register_ipa_mhi(const struct ipa_mhi_data *in)
-{
-	return -EPERM;
-}
-
-int ipa_fmwk_register_ipa_wigig(const struct ipa_wigig_data *in)
-{
-	return -EPERM;
-}
-
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-
-#endif /* _IPA_FMWK_H_ */

+ 3 - 3
drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c

@@ -16,13 +16,13 @@
 #include <linux/types.h>
 #include <linux/ipv6.h>
 #include <net/addrconf.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/cdev.h>
-#include "ipa_odu_bridge.h"
+#include <linux/ipa_odu_bridge.h>
 #include "ipa_common_i.h"
 #include "ipa_pm.h"
 #include "ipa_i.h"
-#include "ipa_fmwk.h"
+#include <linux/ipa_fmwk.h>
 
 #define IPA_GSB_DRV_NAME "ipa_gsb"
 

+ 0 - 154
drivers/platform/msm/ipa/ipa_clients/ipa_mhi.h

@@ -1,154 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
- */
-
-#ifndef IPA_MHI_H_
-#define IPA_MHI_H_
-
-#include "ipa.h"
-#include <linux/types.h>
-
-/**
- * enum ipa_mhi_event_type - event type for mhi callback
- *
- * @IPA_MHI_EVENT_READY: IPA MHI is ready and IPA uC is loaded. After getting
- *	this event MHI client is expected to call to ipa_mhi_start() API
- * @IPA_MHI_EVENT_DATA_AVAILABLE: downlink data available on MHI channel
- */
-enum ipa_mhi_event_type {
-	IPA_MHI_EVENT_READY,
-	IPA_MHI_EVENT_DATA_AVAILABLE,
-	IPA_MHI_EVENT_MAX,
-};
-
-typedef void (*mhi_client_cb)(void *priv, enum ipa_mhi_event_type event,
-	unsigned long data);
-
-/**
- * struct ipa_mhi_msi_info - parameters for MSI (Message Signaled Interrupts)
- * @addr_low: MSI lower base physical address
- * @addr_hi: MSI higher base physical address
- * @data: Data Pattern to use when generating the MSI
- * @mask: Mask indicating number of messages assigned by the host to device
- *
- * msi value is written according to this formula:
- *	((data & ~mask) | (mmio.msiVec & mask))
- */
-struct ipa_mhi_msi_info {
-	u32 addr_low;
-	u32 addr_hi;
-	u32 data;
-	u32 mask;
-};
-
-/**
- * struct ipa_mhi_init_params - parameters for IPA MHI initialization API
- *
- * @msi: MSI (Message Signaled Interrupts) parameters
- * @mmio_addr: MHI MMIO physical address
- * @first_ch_idx: First channel ID for hardware accelerated channels.
- * @first_er_idx: First event ring ID for hardware accelerated channels.
- * @assert_bit40: should assert bit 40 in order to access host space.
- *	if PCIe iATU is configured then not need to assert bit40
- * @notify: client callback
- * @priv: client private data to be provided in client callback
- * @test_mode: flag to indicate if IPA MHI is in unit test mode
- */
-struct ipa_mhi_init_params {
-	struct ipa_mhi_msi_info msi;
-	u32 mmio_addr;
-	u32 first_ch_idx;
-	u32 first_er_idx;
-	bool assert_bit40;
-	mhi_client_cb notify;
-	void *priv;
-	bool test_mode;
-};
-
-/**
- * struct ipa_mhi_start_params - parameters for IPA MHI start API
- *
- * @host_ctrl_addr: Base address of MHI control data structures
- * @host_data_addr: Base address of MHI data buffers
- * @channel_context_addr: channel context array address in host address space
- * @event_context_addr: event context array address in host address space
- */
-struct ipa_mhi_start_params {
-	u32 host_ctrl_addr;
-	u32 host_data_addr;
-	u64 channel_context_array_addr;
-	u64 event_context_array_addr;
-};
-
-/**
- * struct ipa_mhi_connect_params - parameters for IPA MHI channel connect API
- *
- * @sys: IPA EP configuration info
- * @channel_id: MHI channel id
- */
-struct ipa_mhi_connect_params {
-	struct ipa_sys_connect_params sys;
-	u8 channel_id;
-};
-
-/* bit #40 in address should be asserted for MHI transfers over pcie */
-#define IPA_MHI_HOST_ADDR(addr) ((addr) | BIT_ULL(40))
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-int ipa_mhi_init(struct ipa_mhi_init_params *params);
-
-int ipa_mhi_start(struct ipa_mhi_start_params *params);
-
-int ipa_mhi_connect_pipe(struct ipa_mhi_connect_params *in, u32 *clnt_hdl);
-
-int ipa_mhi_disconnect_pipe(u32 clnt_hdl);
-
-int ipa_mhi_suspend(bool force);
-
-int ipa_mhi_resume(void);
-
-void ipa_mhi_destroy(void);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-static inline int ipa_mhi_init(struct ipa_mhi_init_params *params)
-{
-	return -EPERM;
-}
-
-static inline int ipa_mhi_start(struct ipa_mhi_start_params *params)
-{
-	return -EPERM;
-}
-
-static inline int ipa_mhi_connect_pipe(struct ipa_mhi_connect_params *in,
-	u32 *clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_mhi_disconnect_pipe(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_mhi_suspend(bool force)
-{
-	return -EPERM;
-}
-
-static inline int ipa_mhi_resume(void)
-{
-	return -EPERM;
-}
-
-static inline void ipa_mhi_destroy(void)
-{
-
-}
-
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-
-#endif /* IPA_MHI_H_ */

+ 4 - 4
drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c

@@ -8,14 +8,14 @@
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include "ipa.h"
-#include "msm_gsi.h"
-#include "ipa_mhi.h"
+#include <linux/ipa.h>
+#include <linux/msm_gsi.h>
+#include <linux/ipa_mhi.h>
 #include "gsi.h"
 #include "ipa_common_i.h"
 #include "ipa_pm.h"
 #include "ipa_i.h"
-#include "ipa_fmwk.h"
+#include <linux/ipa_fmwk.h>
 
 #define IPA_MHI_DRV_NAME "ipa_mhi_client"
 

+ 0 - 140
drivers/platform/msm/ipa/ipa_clients/ipa_odu_bridge.h

@@ -1,140 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_ODO_BRIDGE_H_
-#define _IPA_ODO_BRIDGE_H_
-
-#include "ipa.h"
-
-/**
- * struct odu_bridge_params - parameters for odu bridge initialization API
- *
- * @netdev_name: network interface name
- * @priv: private data that will be supplied to client's callback
- * @tx_dp_notify: callback for handling SKB. the following event are supported:
- *	IPA_WRITE_DONE:	will be called after client called to odu_bridge_tx_dp()
- *			Client is expected to free the skb.
- *	IPA_RECEIVE:	will be called for delivering skb to APPS.
- *			Client is expected to deliver the skb to network stack.
- * @send_dl_skb: callback for sending skb on downlink direction to adapter.
- *		Client is expected to free the skb.
- * @device_ethaddr: device Ethernet address in network order.
- * @ipa_desc_size: IPA Sys Pipe Desc Size
- */
-struct odu_bridge_params {
-	const char *netdev_name;
-	void *priv;
-	ipa_notify_cb tx_dp_notify;
-	int (*send_dl_skb)(void *priv, struct sk_buff *skb);
-	u8 device_ethaddr[ETH_ALEN];
-	u32 ipa_desc_size;
-};
-
-/**
- * struct ipa_bridge_init_params - parameters for IPA bridge initialization API
- *
- * @info: structure contains initialization information
- * @wakeup_request: callback to client to indicate there is downlink data
- *	available. Client is expected to call ipa_bridge_resume() to start
- *	receiving data
- */
-struct ipa_bridge_init_params {
-	struct odu_bridge_params info;
-	void (*wakeup_request)(void *cl_priv);
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-int ipa_bridge_init(struct ipa_bridge_init_params *params, u32 *hdl);
-
-int ipa_bridge_connect(u32 hdl);
-
-int ipa_bridge_set_perf_profile(u32 hdl, u32 bandwidth);
-
-int ipa_bridge_disconnect(u32 hdl);
-
-int ipa_bridge_suspend(u32 hdl);
-
-int ipa_bridge_resume(u32 hdl);
-
-int ipa_bridge_tx_dp(u32 hdl, struct sk_buff *skb,
-	struct ipa_tx_meta *metadata);
-
-int ipa_bridge_cleanup(u32 hdl);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-static inline int ipa_bridge_init(struct odu_bridge_params *params, u32 *hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_connect(u32 hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_set_perf_profile(u32 hdl, u32 bandwidth)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_disconnect(u32 hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_suspend(u32 hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_resume(u32 hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_tx_dp(u32 hdl, struct sk_buff *skb,
-struct ipa_tx_meta *metadata)
-{
-	return -EPERM;
-}
-
-static inline int ipa_bridge_cleanup(u32 hdl)
-{
-	return -EPERM;
-}
-
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-
-/* Below API is deprecated. Please use the API above */
-
-static inline int odu_bridge_init(struct odu_bridge_params *params)
-{
-	return -EPERM;
-}
-
-static inline int odu_bridge_disconnect(void)
-{
-	return -EPERM;
-}
-
-static inline int odu_bridge_connect(void)
-{
-	return -EPERM;
-}
-
-static inline int odu_bridge_tx_dp(struct sk_buff *skb,
-						struct ipa_tx_meta *metadata)
-{
-	return -EPERM;
-}
-
-static inline int odu_bridge_cleanup(void)
-{
-	return -EPERM;
-}
-
-#endif /* _IPA_ODO_BRIDGE_H */

+ 2 - 2
drivers/platform/msm/ipa/ipa_clients/ipa_uc_offload.c

@@ -3,12 +3,12 @@
  * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa_uc_offload.h"
+#include <linux/ipa_uc_offload.h>
 #include <linux/msm_ipa.h>
 #include <linux/if_vlan.h>
 #include "ipa_common_i.h"
 #include "ipa_pm.h"
-#include "ipa_fmwk.h"
+#include <linux/ipa_fmwk.h>
 
 #define IPA_NTN_DMA_POOL_ALIGNMENT 8
 #define OFFLOAD_DRV_NAME "ipa_uc_offload"

+ 0 - 314
drivers/platform/msm/ipa/ipa_clients/ipa_uc_offload.h

@@ -1,314 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_UC_OFFLOAD_H_
-#define _IPA_UC_OFFLOAD_H_
-
-#include "ipa.h"
-
-/**
- * enum ipa_uc_offload_proto
- * Protocol type: either WDI or Neutrino
- *
- * @IPA_UC_WDI: wdi Protocol
- * @IPA_UC_NTN: Neutrino Protocol
- */
-enum ipa_uc_offload_proto {
-	IPA_UC_INVALID = 0,
-	IPA_UC_WDI = 1,
-	IPA_UC_NTN = 2,
-	IPA_UC_MAX_PROT_SIZE
-};
-
-/**
- * struct ipa_hdr_info - Header to install on IPA HW
- *
- * @hdr: header to install on IPA HW
- * @hdr_len: length of header
- * @dst_mac_addr_offset: destination mac address offset
- * @hdr_type: layer two header type
- */
-struct ipa_hdr_info {
-	u8 *hdr;
-	u8 hdr_len;
-	u8 dst_mac_addr_offset;
-	enum ipa_hdr_l2_type hdr_type;
-};
-
-/**
- * struct ipa_uc_offload_intf_params - parameters for uC offload
- *	interface registration
- *
- * @netdev_name: network interface name
- * @notify:	callback for exception/embedded packets
- * @priv: callback cookie
- * @hdr_info: header information
- * @meta_data: meta data if any
- * @meta_data_mask: meta data mask
- * @proto: uC offload protocol type
- * @alt_dst_pipe: alternate routing output pipe
- */
-struct ipa_uc_offload_intf_params {
-	const char *netdev_name;
-	ipa_notify_cb notify;
-	void *priv;
-	struct ipa_hdr_info hdr_info[IPA_IP_MAX];
-	u8 is_meta_data_valid;
-	u32 meta_data;
-	u32 meta_data_mask;
-	enum ipa_uc_offload_proto proto;
-	enum ipa_client_type alt_dst_pipe;
-};
-
-/**
- * struct ntn_buff_smmu_map -  IPA iova->pa SMMU mapping
- * @iova: virtual address of the data buffer
- * @pa: physical address of the data buffer
- */
-struct ntn_buff_smmu_map {
-	dma_addr_t iova;
-	phys_addr_t pa;
-};
-
-/**
- * struct  ipa_ntn_setup_info - NTN TX/Rx configuration
- * @client: type of "client" (IPA_CLIENT_ODU#_PROD/CONS)
- * @smmu_enabled: SMMU is enabled for uC or not
- * @ring_base_pa: physical address of the base of the Tx/Rx ring
- * @ring_base_iova: virtual address of the base of the Tx/Rx ring
- * @ring_base_sgt:Scatter table for ntn_rings,contains valid non NULL
- *			value when ENAC S1-SMMU enabed, else NULL.
- * @ntn_ring_size: size of the Tx/Rx ring (in terms of elements)
- * @buff_pool_base_pa: physical address of the base of the Tx/Rx buffer pool
- * @buff_pool_base_iova: virtual address of the base of the Tx/Rx buffer pool
- * @buff_pool_base_sgt: Scatter table for buffer pools,contains valid non NULL
- *			 value when EMAC S1-SMMU enabed, else NULL.
- * @num_buffers: Rx/Tx buffer pool size (in terms of elements)
- * @data_buff_size: size of the each data buffer allocated in DDR
- * @ntn_reg_base_ptr_pa: physical address of the Tx/Rx NTN Ring's
- *						tail pointer
- */
-struct ipa_ntn_setup_info {
-	enum ipa_client_type client;
-	bool smmu_enabled;
-	phys_addr_t ring_base_pa;
-	dma_addr_t ring_base_iova;
-	struct sg_table *ring_base_sgt;
-
-	u32 ntn_ring_size;
-
-	phys_addr_t buff_pool_base_pa;
-	dma_addr_t buff_pool_base_iova;
-	struct sg_table *buff_pool_base_sgt;
-
-	struct ntn_buff_smmu_map *data_buff_list;
-
-	u32 num_buffers;
-
-	u32 data_buff_size;
-
-	phys_addr_t ntn_reg_base_ptr_pa;
-};
-
-/**
- * struct ipa_uc_offload_out_params - out parameters for uC offload
- *
- * @clnt_hndl: Handle that client need to pass during
- *	further operations
- */
-struct ipa_uc_offload_out_params {
-	u32 clnt_hndl;
-};
-
-/**
- * struct  ipa_ntn_conn_in_params - NTN TX/Rx connect parameters
- * @ul: parameters to connect UL pipe(from Neutrino to IPA)
- * @dl: parameters to connect DL pipe(from IPA to Neutrino)
- */
-struct ipa_ntn_conn_in_params {
-	struct ipa_ntn_setup_info ul;
-	struct ipa_ntn_setup_info dl;
-};
-
-/**
- * struct  ipa_ntn_conn_out_params - information provided
- *				to uC offload client
- * @ul_uc_db_pa: physical address of IPA uc doorbell for UL
- * @dl_uc_db_pa: physical address of IPA uc doorbell for DL
- * @clnt_hdl: opaque handle assigned to offload client
- */
-struct ipa_ntn_conn_out_params {
-	phys_addr_t ul_uc_db_pa;
-	phys_addr_t dl_uc_db_pa;
-};
-
-/**
- * struct  ipa_uc_offload_conn_in_params - information provided by
- *		uC offload client
- * @clnt_hndl: Handle that return as part of reg interface
- * @proto: Protocol to use for offload data path
- * @ntn: uC RX/Tx configuration info
- */
-struct ipa_uc_offload_conn_in_params {
-	u32 clnt_hndl;
-	union {
-		struct ipa_ntn_conn_in_params ntn;
-	} u;
-};
-
-/**
- * struct  ipa_uc_offload_conn_out_params - information provided
- *		to uC offload client
- * @ul_uc_db_pa: physical address of IPA uc doorbell for UL
- * @dl_uc_db_pa: physical address of IPA uc doorbell for DL
- * @clnt_hdl: opaque handle assigned to offload client
- */
-struct ipa_uc_offload_conn_out_params {
-	union {
-		struct ipa_ntn_conn_out_params ntn;
-	} u;
-};
-
-/**
- * struct  ipa_perf_profile - To set BandWidth profile
- *
- * @client: type of "client" (IPA_CLIENT_ODU#_PROD/CONS)
- * @max_supported_bw_mbps: maximum bandwidth needed (in Mbps)
- */
-struct ipa_perf_profile {
-	enum ipa_client_type client;
-	u32 max_supported_bw_mbps;
-};
-
-/**
- * struct  ipa_uc_ready_params - uC ready CB parameters
- * @is_uC_ready: uC loaded or not
- * @priv : callback cookie
- * @notify:	callback
- * @proto: uC offload protocol type
- */
-struct ipa_uc_ready_params {
-	bool is_uC_ready;
-	void *priv;
-	ipa_uc_ready_cb notify;
-	enum ipa_uc_offload_proto proto;
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-/**
- * ipa_uc_offload_reg_intf - Client should call this function to
- * init uC offload data path
- *
- * @init:	[in] initialization parameters
- *
- * Note: Should not be called from atomic context and only
- * after checking IPA readiness using ipa_register_ipa_ready_cb()
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_uc_offload_reg_intf(
-	struct ipa_uc_offload_intf_params *in,
-	struct ipa_uc_offload_out_params *out);
-
-/**
- * ipa_uc_offload_cleanup - Client Driver should call this
- * function before unload and after disconnect
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_uc_offload_cleanup(u32 clnt_hdl);
-
-/**
- * ipa_uc_offload_conn_pipes - Client should call this
- * function to connect uC pipe for offload data path
- *
- * @in:	[in] input parameters from client
- * @out: [out] output params to client
- *
- * Note: Should not be called from atomic context and only
- * after checking IPA readiness using ipa_register_ipa_ready_cb()
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_uc_offload_conn_pipes(struct ipa_uc_offload_conn_in_params *in,
-			struct ipa_uc_offload_conn_out_params *out);
-
-/**
- * ipa_uc_offload_disconn_pipes() - Client should call this
- *		function to disconnect uC pipe to disable offload data path
- * @clnt_hdl:	[in] opaque client handle assigned by IPA to client
- *
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_uc_offload_disconn_pipes(u32 clnt_hdl);
-
-/**
- * ipa_set_perf_profile() - Client should call this function to
- *		set IPA clock Band Width based on data rates
- * @profile: [in] BandWidth profile to use
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_set_perf_profile(struct ipa_perf_profile *profile);
-
-
-/*
- * To register uC ready callback if uC not ready
- * and also check uC readiness
- * if uC not ready only, register callback
- */
-int ipa_uc_offload_reg_rdyCB(struct ipa_uc_ready_params *param);
-
-/*
- * To de-register uC ready callback
- */
-void ipa_uc_offload_dereg_rdyCB(enum ipa_uc_offload_proto proto);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-static inline int ipa_uc_offload_reg_intf(
-		struct ipa_uc_offload_intf_params *in,
-		struct ipa_uc_offload_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uC_offload_cleanup(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_offload_conn_pipes(
-		struct ipa_uc_offload_conn_in_params *in,
-		struct ipa_uc_offload_conn_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_offload_disconn_pipes(u32 clnt_hdl)
-{
-	return -EPERM;
-}
-
-static inline int ipa_set_perf_profile(struct ipa_perf_profile *profile)
-{
-	return -EPERM;
-}
-
-static inline int ipa_uc_offload_reg_rdyCB(struct ipa_uc_ready_params *param)
-{
-	return -EPERM;
-}
-
-static inline void ipa_uc_offload_dereg_rdyCB(enum ipa_uc_offload_proto proto)
-{
-}
-
-#endif /* CONFIG_IPA3 */
-
-#endif /* _IPA_UC_OFFLOAD_H_ */

+ 3 - 3
drivers/platform/msm/ipa/ipa_clients/ipa_usb.c

@@ -7,9 +7,9 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/debugfs.h>
-#include "ipa.h"
-#include "ipa_usb.h"
-#include "ipa_fmwk.h"
+#include <linux/ipa.h>
+#include <linux/ipa_usb.h>
+#include <linux/ipa_fmwk.h>
 #include "rndis_ipa.h"
 #include "ecm_ipa.h"
 #include "ipa_i.h"

+ 0 - 335
drivers/platform/msm/ipa/ipa_clients/ipa_usb.h

@@ -1,335 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_USB_H_
-#define _IPA_USB_H_
-
-#include <linux/if_ether.h>
-#include "ipa.h"
-#include "msm_gsi.h"
-#include <linux/msm_ipa.h>
-#include <linux/types.h>
-
-enum ipa_usb_teth_prot {
-	IPA_USB_RNDIS = 0,
-	IPA_USB_ECM = 1,
-	IPA_USB_RMNET = 2,
-	IPA_USB_MBIM = 3,
-	IPA_USB_DIAG = 4,
-	IPA_USB_MAX_TETH_PROT_SIZE
-};
-
-/**
- * ipa_usb_teth_params - parameters for RDNIS/ECM initialization API
- *
- * @host_ethaddr:        host Ethernet address in network order
- * @device_ethaddr:      device Ethernet address in network order
- */
-struct ipa_usb_teth_params {
-	u8 host_ethaddr[ETH_ALEN];
-	u8 device_ethaddr[ETH_ALEN];
-};
-
-enum ipa_usb_notify_event {
-	IPA_USB_DEVICE_READY,
-	IPA_USB_REMOTE_WAKEUP,
-	IPA_USB_SUSPEND_COMPLETED
-};
-
-enum ipa_usb_max_usb_packet_size {
-	IPA_USB_FULL_SPEED_64B = 64,
-	IPA_USB_HIGH_SPEED_512B = 512,
-	IPA_USB_SUPER_SPEED_1024B = 1024
-};
-
-/**
- * ipa_usb_teth_prot_params - parameters for connecting RNDIS
- *
- * @max_xfer_size_bytes_to_dev:   max size of UL packets in bytes
- * @max_packet_number_to_dev:     max number of UL aggregated packets
- * @max_xfer_size_bytes_to_host:  max size of DL packets in bytes
- *
- */
-struct ipa_usb_teth_prot_params {
-	u32 max_xfer_size_bytes_to_dev;
-	u32 max_packet_number_to_dev;
-	u32 max_xfer_size_bytes_to_host;
-};
-
-/**
- * ipa_usb_xdci_connect_params - parameters required to start IN, OUT
- * channels, and connect RNDIS/ECM/teth_bridge
- *
- * @max_pkt_size:          USB speed (full/high/super/super-speed plus)
- * @ipa_to_usb_xferrscidx: Transfer Resource Index (XferRscIdx) for IN channel.
- *                         The hardware-assigned transfer resource index for the
- *                         transfer, which was returned in response to the
- *                         Start Transfer command. This field is used for
- *                         "Update Transfer" command.
- *                         Should be 0 =< ipa_to_usb_xferrscidx <= 127.
- * @ipa_to_usb_xferrscidx_valid: true if xferRscIdx should be updated for IN
- *                         channel
- * @usb_to_ipa_xferrscidx: Transfer Resource Index (XferRscIdx) for OUT channel
- *                         Should be 0 =< usb_to_ipa_xferrscidx <= 127.
- * @usb_to_ipa_xferrscidx_valid: true if xferRscIdx should be updated for OUT
- *                         channel
- * @teth_prot:             tethering protocol
- * @teth_prot_params:      parameters for connecting the tethering protocol.
- * @max_supported_bandwidth_mbps: maximum bandwidth need of the client in Mbps
- */
-struct ipa_usb_xdci_connect_params {
-	enum ipa_usb_max_usb_packet_size max_pkt_size;
-	u8 ipa_to_usb_xferrscidx;
-	bool ipa_to_usb_xferrscidx_valid;
-	u8 usb_to_ipa_xferrscidx;
-	bool usb_to_ipa_xferrscidx_valid;
-	enum ipa_usb_teth_prot teth_prot;
-	struct ipa_usb_teth_prot_params teth_prot_params;
-	u32 max_supported_bandwidth_mbps;
-};
-
-/**
- * ipa_usb_xdci_chan_scratch - xDCI protocol SW config area of
- * channel scratch
- *
- * @last_trb_addr_iova:  Address (iova LSB - based on alignment restrictions) of
- *                       last TRB in queue. Used to identify roll over case
- * @const_buffer_size:   TRB buffer size in KB (similar to IPA aggregation
- *                       configuration). Must be aligned to max USB Packet Size.
- *                       Should be 1 <= const_buffer_size <= 31.
- * @depcmd_low_addr:     Used to generate "Update Transfer" command
- * @depcmd_hi_addr:      Used to generate "Update Transfer" command.
- */
-struct ipa_usb_xdci_chan_scratch {
-	u16 last_trb_addr_iova;
-	u8 const_buffer_size;
-	u32 depcmd_low_addr;
-	u8 depcmd_hi_addr;
-};
-
-/**
- * ipa_usb_xdci_chan_params - xDCI channel related properties
- *
- * @client:              type of "client"
- * @ipa_ep_cfg:          IPA EP configuration
- * @keep_ipa_awake:      when true, IPA will not be clock gated
- * @teth_prot:           tethering protocol for which the channel is created
- * @gevntcount_low_addr: GEVNCOUNT low address for event scratch
- * @gevntcount_hi_addr:  GEVNCOUNT high address for event scratch
- * @dir:                 channel direction
- * @xfer_ring_len:       length of transfer ring in bytes (must be integral
- *                       multiple of transfer element size - 16B for xDCI)
- * @xfer_scratch:        parameters for xDCI channel scratch
- * @xfer_ring_base_addr_iova: IO virtual address mapped to pysical base address
- * @data_buff_base_len:  length of data buffer allocated by USB driver
- * @data_buff_base_addr_iova:  IO virtual address mapped to pysical base address
- * @sgt_xfer_rings:      Scatter table for Xfer rings,contains valid non NULL
- *			 value
- *                       when USB S1-SMMU enabed, else NULL.
- * @sgt_data_buff:       Scatter table for data buffs,contains valid non NULL
- *			 value
- *                       when USB S1-SMMU enabed, else NULL.
- *
- */
-struct ipa_usb_xdci_chan_params {
-	/* IPA EP params */
-	enum ipa_client_type client;
-	struct ipa_ep_cfg ipa_ep_cfg;
-	bool keep_ipa_awake;
-	enum ipa_usb_teth_prot teth_prot;
-	/* event ring params */
-	u32 gevntcount_low_addr;
-	u8 gevntcount_hi_addr;
-	/* transfer ring params */
-	enum gsi_chan_dir dir;
-	u16 xfer_ring_len;
-	struct ipa_usb_xdci_chan_scratch xfer_scratch;
-	u64 xfer_ring_base_addr_iova;
-	u32 data_buff_base_len;
-	u64 data_buff_base_addr_iova;
-	struct sg_table *sgt_xfer_rings;
-	struct sg_table *sgt_data_buff;
-};
-
-/**
- * ipa_usb_chan_out_params - out parameters for channel request
- *
- * @clnt_hdl:            opaque client handle assigned by IPA to client
- * @db_reg_phs_addr_lsb: Physical address of doorbell register where the 32
- *                       LSBs of the doorbell value should be written
- * @db_reg_phs_addr_msb: Physical address of doorbell register where the 32
- *                       MSBs of the doorbell value should be written
- *
- */
-struct ipa_req_chan_out_params {
-	u32 clnt_hdl;
-	u32 db_reg_phs_addr_lsb;
-	u32 db_reg_phs_addr_msb;
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-/**
- * ipa_usb_init_teth_prot - Peripheral should call this function to initialize
- * RNDIS/ECM/teth_bridge/DPL, prior to calling ipa_usb_xdci_connect()
- *
- * @usb_teth_type: tethering protocol type
- * @teth_params:   pointer to tethering protocol parameters.
- *                 Should be struct ipa_usb_teth_params for RNDIS/ECM,
- *                 or NULL for teth_bridge
- * @ipa_usb_notify_cb: will be called to notify USB driver on certain events
- * @user_data:     cookie used for ipa_usb_notify_cb
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_init_teth_prot(enum ipa_usb_teth_prot teth_prot,
-			   struct ipa_usb_teth_params *teth_params,
-			   int (*ipa_usb_notify_cb)(enum ipa_usb_notify_event,
-			   void *),
-			   void *user_data);
-
-/**
- * ipa_usb_xdci_connect - Peripheral should call this function to start IN &
- * OUT xDCI channels, and connect RNDIS/ECM/MBIM/RMNET.
- * For DPL, only starts IN channel.
- *
- * @ul_chan_params: parameters for allocating UL xDCI channel. containing
- *              required info on event and transfer rings, and IPA EP
- *              configuration
- * @ul_out_params: [out] opaque client handle assigned by IPA to client & DB
- *              registers physical address for UL channel
- * @dl_chan_params: parameters for allocating DL xDCI channel. containing
- *              required info on event and transfer rings, and IPA EP
- *              configuration
- * @dl_out_params: [out] opaque client handle assigned by IPA to client & DB
- *              registers physical address for DL channel
- * @connect_params: handles and scratch params of the required channels,
- *              tethering protocol and the tethering protocol parameters.
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_connect(struct ipa_usb_xdci_chan_params *ul_chan_params,
-			 struct ipa_usb_xdci_chan_params *dl_chan_params,
-			 struct ipa_req_chan_out_params *ul_out_params,
-			 struct ipa_req_chan_out_params *dl_out_params,
-			 struct ipa_usb_xdci_connect_params *connect_params);
-
-/**
- * ipa_usb_xdci_disconnect - Peripheral should call this function to stop
- * IN & OUT xDCI channels
- * For DPL, only stops IN channel.
- *
- * @ul_clnt_hdl:    client handle received from ipa_usb_xdci_connect()
- *                  for OUT channel
- * @dl_clnt_hdl:    client handle received from ipa_usb_xdci_connect()
- *                  for IN channel
- * @teth_prot:      tethering protocol
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-			    enum ipa_usb_teth_prot teth_prot);
-
-/**
- * ipa_usb_deinit_teth_prot - Peripheral should call this function to deinit
- * RNDIS/ECM/MBIM/RMNET
- *
- * @teth_prot: tethering protocol
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot);
-
-/**
- * ipa_usb_xdci_suspend - Peripheral should call this function to suspend
- * IN & OUT or DPL xDCI channels
- *
- * @ul_clnt_hdl: client handle previously obtained from
- *               ipa_usb_xdci_connect() for OUT channel
- * @dl_clnt_hdl: client handle previously obtained from
- *               ipa_usb_xdci_connect() for IN channel
- * @teth_prot:   tethering protocol
- * @with_remote_wakeup: Does host support remote wakeup?
- *
- * Note: Should not be called from atomic context
- * Note: for DPL, the ul will be ignored as irrelevant
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-			 enum ipa_usb_teth_prot teth_prot,
-			 bool with_remote_wakeup);
-
-/**
- * ipa_usb_xdci_resume - Peripheral should call this function to resume
- * IN & OUT or DPL xDCI channels
- *
- * @ul_clnt_hdl:   client handle received from ipa_usb_xdci_connect()
- *                 for OUT channel
- * @dl_clnt_hdl:   client handle received from ipa_usb_xdci_connect()
- *                 for IN channel
- * @teth_prot:   tethering protocol
- *
- * Note: Should not be called from atomic context
- * Note: for DPL, the ul will be ignored as irrelevant
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-			enum ipa_usb_teth_prot teth_prot);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-static inline int ipa_usb_init_teth_prot(enum ipa_usb_teth_prot teth_prot,
-			   struct ipa_usb_teth_params *teth_params,
-			   int (*ipa_usb_notify_cb)(enum ipa_usb_notify_event,
-			   void *),
-			   void *user_data)
-{
-	return -EPERM;
-}
-
-static inline int ipa_usb_xdci_connect(
-			 struct ipa_usb_xdci_chan_params *ul_chan_params,
-			 struct ipa_usb_xdci_chan_params *dl_chan_params,
-			 struct ipa_req_chan_out_params *ul_out_params,
-			 struct ipa_req_chan_out_params *dl_out_params,
-			 struct ipa_usb_xdci_connect_params *connect_params)
-{
-	return -EPERM;
-}
-
-static inline int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-			    enum ipa_usb_teth_prot teth_prot)
-{
-	return -EPERM;
-}
-
-static inline int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot)
-{
-	return -EPERM;
-}
-
-static inline int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-			 enum ipa_usb_teth_prot teth_prot,
-			 bool with_remote_wakeup)
-{
-	return -EPERM;
-}
-
-static inline int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
-			enum ipa_usb_teth_prot teth_prot)
-{
-	return -EPERM;
-}
-
-
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-
-#endif /* _IPA_USB_H_ */

+ 1 - 1
drivers/platform/msm/ipa/ipa_clients/ipa_wdi3.c

@@ -3,7 +3,7 @@
  * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa_wdi3.h"
+#include <linux/ipa_wdi3.h>
 #include <linux/msm_ipa.h>
 #include <linux/string.h>
 #include "ipa_common_i.h"

+ 0 - 453
drivers/platform/msm/ipa/ipa_clients/ipa_wdi3.h

@@ -1,453 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2018 - 2019, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_WDI3_H_
-#define _IPA_WDI3_H_
-
-#include "ipa.h"
-
-#define IPA_HW_WDI3_TCL_DATA_CMD_ER_DESC_SIZE 32
-#define IPA_HW_WDI3_IPA2FW_ER_DESC_SIZE 8
-
-#define IPA_HW_WDI3_MAX_ER_DESC_SIZE \
-	(((IPA_HW_WDI3_TCL_DATA_CMD_ER_DESC_SIZE) > \
-	(IPA_HW_WDI3_IPA2FW_ER_DESC_SIZE)) ?  \
-	(IPA_HW_WDI3_TCL_DATA_CMD_ER_DESC_SIZE) : \
-	(IPA_HW_WDI3_IPA2FW_ER_DESC_SIZE))
-
-#define IPA_WDI_MAX_SUPPORTED_SYS_PIPE 3
-
-enum ipa_wdi_version {
-	IPA_WDI_1,
-	IPA_WDI_2,
-	IPA_WDI_3
-};
-
-#define IPA_WDI3_TX_DIR 1
-#define IPA_WDI3_RX_DIR 2
-
-/**
- * struct ipa_wdi_init_in_params - wdi init input parameters
- *
- * @wdi_version: wdi version
- * @notify: uc ready callback
- * @priv: uc ready callback cookie
- */
-struct ipa_wdi_init_in_params {
-	enum ipa_wdi_version wdi_version;
-	ipa_uc_ready_cb notify;
-	void *priv;
-#ifdef IPA_WAN_MSG_IPv6_ADDR_GW_LEN
-	ipa_wdi_meter_notifier_cb wdi_notify;
-#endif
-};
-
-/**
- * struct ipa_wdi_init_out_params - wdi init output parameters
- *
- * @is_uC_ready: is uC ready. No API should be called until uC
-    is ready.
- * @is_smmu_enable: is smmu enabled
- * @is_over_gsi: is wdi over GSI or uC
- */
-struct ipa_wdi_init_out_params {
-	bool is_uC_ready;
-	bool is_smmu_enabled;
-	bool is_over_gsi;
-};
-
-/**
- * struct ipa_wdi_hdr_info - Header to install on IPA HW
- *
- * @hdr: header to install on IPA HW
- * @hdr_len: length of header
- * @dst_mac_addr_offset: destination mac address offset
- * @hdr_type: layer two header type
- */
-struct ipa_wdi_hdr_info {
-	u8 *hdr;
-	u8 hdr_len;
-	u8 dst_mac_addr_offset;
-	enum ipa_hdr_l2_type hdr_type;
-};
-
-/**
- * struct ipa_wdi_reg_intf_in_params - parameters for uC offload
- *	interface registration
- *
- * @netdev_name: network interface name
- * @hdr_info: header information
- * @is_meta_data_valid: if meta data is valid
- * @meta_data: meta data if any
- * @meta_data_mask: meta data mask
- */
-struct ipa_wdi_reg_intf_in_params {
-	const char *netdev_name;
-	struct ipa_wdi_hdr_info hdr_info[IPA_IP_MAX];
-	enum ipa_client_type alt_dst_pipe;
-	u8 is_meta_data_valid;
-	u32 meta_data;
-	u32 meta_data_mask;
-};
-
-/**
- * struct  ipa_wdi_pipe_setup_info - WDI TX/Rx configuration
- * @ipa_ep_cfg: ipa endpoint configuration
- * @client: type of "client"
- * @transfer_ring_base_pa:  physical address of the base of the transfer ring
- * @transfer_ring_size:  size of the transfer ring
- * @transfer_ring_doorbell_pa:  physical address of the doorbell that
-	IPA uC will update the tailpointer of the transfer ring
- * @is_txr_rn_db_pcie_addr: Bool indicated txr ring DB is pcie or not
- * @event_ring_base_pa:  physical address of the base of the event ring
- * @event_ring_size:  event ring size
- * @event_ring_doorbell_pa:  physical address of the doorbell that IPA uC
-	will update the headpointer of the event ring
- * @is_evt_rn_db_pcie_addr: Bool indicated evt ring DB is pcie or not
- * @num_pkt_buffers:  Number of pkt buffers allocated. The size of the event
-	ring and the transfer ring has to be atleast ( num_pkt_buffers + 1)
- * @pkt_offset: packet offset (wdi header length)
- * @desc_format_template[IPA_HW_WDI3_MAX_ER_DESC_SIZE]:  Holds a cached
-	template of the desc format
- */
-struct ipa_wdi_pipe_setup_info {
-	struct ipa_ep_cfg ipa_ep_cfg;
-	enum ipa_client_type client;
-	phys_addr_t  transfer_ring_base_pa;
-	u32  transfer_ring_size;
-	phys_addr_t  transfer_ring_doorbell_pa;
-	bool is_txr_rn_db_pcie_addr;
-
-	phys_addr_t  event_ring_base_pa;
-	u32  event_ring_size;
-	phys_addr_t  event_ring_doorbell_pa;
-	bool is_evt_rn_db_pcie_addr;
-	u16  num_pkt_buffers;
-
-	u16 pkt_offset;
-
-	u32  desc_format_template[IPA_HW_WDI3_MAX_ER_DESC_SIZE];
-};
-
-/**
- * struct  ipa_wdi_pipe_setup_info_smmu - WDI TX/Rx configuration
- * @ipa_ep_cfg: ipa endpoint configuration
- * @client: type of "client"
- * @transfer_ring_base_pa:  physical address of the base of the transfer ring
- * @transfer_ring_size:  size of the transfer ring
- * @transfer_ring_doorbell_pa:  physical address of the doorbell that
-	IPA uC will update the tailpointer of the transfer ring
- * @is_txr_rn_db_pcie_addr: Bool indicated  txr ring DB is pcie or not
- * @event_ring_base_pa:  physical address of the base of the event ring
- * @event_ring_size:  event ring size
- * @event_ring_doorbell_pa:  physical address of the doorbell that IPA uC
-	will update the headpointer of the event ring
- * @is_evt_rn_db_pcie_addr: Bool indicated evt ring DB is pcie or not
- * @num_pkt_buffers:  Number of pkt buffers allocated. The size of the event
-	ring and the transfer ring has to be atleast ( num_pkt_buffers + 1)
- * @pkt_offset: packet offset (wdi header length)
- * @desc_format_template[IPA_HW_WDI3_MAX_ER_DESC_SIZE]:  Holds a cached
-	template of the desc format
- */
-struct ipa_wdi_pipe_setup_info_smmu {
-	struct ipa_ep_cfg ipa_ep_cfg;
-	enum ipa_client_type client;
-	struct sg_table  transfer_ring_base;
-	u32  transfer_ring_size;
-	phys_addr_t  transfer_ring_doorbell_pa;
-	bool is_txr_rn_db_pcie_addr;
-
-	struct sg_table  event_ring_base;
-	u32  event_ring_size;
-	phys_addr_t  event_ring_doorbell_pa;
-	bool is_evt_rn_db_pcie_addr;
-	u16  num_pkt_buffers;
-
-	u16 pkt_offset;
-
-	u32  desc_format_template[IPA_HW_WDI3_MAX_ER_DESC_SIZE];
-};
-
-/**
- * struct  ipa_wdi_conn_in_params - information provided by
- *		uC offload client
- * @notify: client callback function
- * @priv: client cookie
- * @is_smmu_enabled: if smmu is enabled
- * @num_sys_pipe_needed: number of sys pipe needed
- * @sys_in: parameters to setup sys pipe in mcc mode
- * @tx: parameters to connect TX pipe(from IPA to WLAN)
- * @tx_smmu: smmu parameters to connect TX pipe(from IPA to WLAN)
- * @rx: parameters to connect RX pipe(from WLAN to IPA)
- * @rx_smmu: smmu parameters to connect RX pipe(from WLAN to IPA)
- */
-struct ipa_wdi_conn_in_params {
-	ipa_notify_cb notify;
-	void *priv;
-	bool is_smmu_enabled;
-	u8 num_sys_pipe_needed;
-	struct ipa_sys_connect_params sys_in[IPA_WDI_MAX_SUPPORTED_SYS_PIPE];
-	union {
-		struct ipa_wdi_pipe_setup_info tx;
-		struct ipa_wdi_pipe_setup_info_smmu tx_smmu;
-	} u_tx;
-	union {
-		struct ipa_wdi_pipe_setup_info rx;
-		struct ipa_wdi_pipe_setup_info_smmu rx_smmu;
-	} u_rx;
-};
-
-/**
- * struct  ipa_wdi_conn_out_params - information provided
- *				to WLAN driver
- * @tx_uc_db_pa: physical address of IPA uC doorbell for TX
- * @rx_uc_db_pa: physical address of IPA uC doorbell for RX
- */
-struct ipa_wdi_conn_out_params {
-	phys_addr_t tx_uc_db_pa;
-	phys_addr_t rx_uc_db_pa;
-};
-
-/**
- * struct  ipa_wdi_perf_profile - To set BandWidth profile
- *
- * @client: type of client
- * @max_supported_bw_mbps: maximum bandwidth needed (in Mbps)
- */
-struct ipa_wdi_perf_profile {
-	enum ipa_client_type client;
-	u32 max_supported_bw_mbps;
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-/**
- * ipa_wdi_init - Client should call this function to
- * init WDI IPA offload data path
- *
- * Note: Should not be called from atomic context and only
- * after checking IPA readiness using ipa_register_ipa_ready_cb()
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wdi_init(struct ipa_wdi_init_in_params *in,
-	struct ipa_wdi_init_out_params *out);
-
-/**
- * ipa_wdi_cleanup - Client should call this function to
- * clean up WDI IPA offload data path
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wdi_cleanup(void);
-
-/**
- * ipa_wdi_reg_intf - Client should call this function to
- * register interface
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wdi_reg_intf(
-	struct ipa_wdi_reg_intf_in_params *in);
-
-/**
- * ipa_wdi_dereg_intf - Client Driver should call this
- * function to deregister before unload and after disconnect
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wdi_dereg_intf(const char *netdev_name);
-
-/**
- * ipa_wdi_conn_pipes - Client should call this
- * function to connect pipes
- *
- * @in:	[in] input parameters from client
- * @out: [out] output params to client
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wdi_conn_pipes(struct ipa_wdi_conn_in_params *in,
-	struct ipa_wdi_conn_out_params *out);
-
-/**
- * ipa_wdi_disconn_pipes() - Client should call this
- *		function to disconnect pipes
- *
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wdi_disconn_pipes(void);
-
-/**
- * ipa_wdi_enable_pipes() - Client should call this
- *		function to enable IPA offload data path
- *
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wdi_enable_pipes(void);
-
-/**
- * ipa_wdi_disable_pipes() - Client should call this
- *		function to disable IPA offload data path
- *
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wdi_disable_pipes(void);
-
-/**
- * ipa_wdi_set_perf_profile() - Client should call this function to
- *		set IPA clock bandwidth based on data rates
- *
- * @profile: [in] BandWidth profile to use
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wdi_set_perf_profile(struct ipa_wdi_perf_profile *profile);
-
-/**
- * ipa_wdi_create_smmu_mapping() - Create smmu mapping
- *
- * @num_buffers: number of buffers
- *
- * @info: wdi buffer info
- */
-int ipa_wdi_create_smmu_mapping(u32 num_buffers,
-	struct ipa_wdi_buffer_info *info);
-
-/**
- * ipa_wdi_release_smmu_mapping() - Release smmu mapping
- *
- * @num_buffers: number of buffers
- *
- * @info: wdi buffer info
- */
-int ipa_wdi_release_smmu_mapping(u32 num_buffers,
-	struct ipa_wdi_buffer_info *info);
-
-/**
- * ipa_wdi_get_stats() - Query WDI statistics
- * @stats:	[inout] stats blob from client populated by driver
- *
- * Returns:	0 on success, negative on failure
- *
- * @note Cannot be called from atomic context
- *
- */
-int ipa_wdi_get_stats(struct IpaHwStatsWDIInfoData_t *stats);
-
-
-/**
- * ipa_wdi_bw_monitor() - set wdi BW monitoring
- * @info:	[inout] info blob from client populated by driver
- *
- * Returns:	0 on success, negative on failure
- *
- * @note Cannot be called from atomic context
- *
- */
-int ipa_wdi_bw_monitor(struct ipa_wdi_bw_info *info);
-
-/**
- * ipa_wdi_sw_stats() - set wdi BW monitoring
- * @info:	[inout] info blob from client populated by driver
- *
- * Returns:	0 on success, negative on failure
- *
- * @note Cannot be called from atomic context
- *
- */
-int ipa_wdi_sw_stats(struct ipa_wdi_tx_info *info);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-
-static inline int ipa_wdi_init(struct ipa_wdi_init_in_params *in,
-	struct ipa_wdi_init_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_cleanup(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_reg_intf(
-	struct ipa_wdi_reg_intf_in_params *in)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_dereg_intf(const char *netdev_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_conn_pipes(struct ipa_wdi_conn_in_params *in,
-	struct ipa_wdi_conn_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_disconn_pipes(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_enable_pipes(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_disable_pipes(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_set_perf_profile(
-	struct ipa_wdi_perf_profile *profile)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_create_smmu_mapping(u32 num_buffers,
-	struct ipa_wdi_buffer_info *info)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_release_smmu_mapping(u32 num_buffers,
-	struct ipa_wdi_buffer_info *info)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_get_stats(struct IpaHwStatsWDIInfoData_t *stats)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_bw_monitor(struct ipa_wdi_bw_info *info)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wdi_sw_stats(struct ipa_wdi_tx_info *info)
-{
-	return -EPERM;
-}
-
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-
-#endif /* _IPA_WDI3_H_ */

+ 2 - 2
drivers/platform/msm/ipa/ipa_clients/ipa_wigig.c

@@ -3,12 +3,12 @@
  * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa_wigig.h"
+#include <linux/ipa_wigig.h>
 #include <linux/debugfs.h>
 #include <linux/string.h>
 #include "ipa_common_i.h"
 #include "ipa_pm.h"
-#include "ipa_fmwk.h"
+#include <linux/ipa_fmwk.h>
 
 #define OFFLOAD_DRV_NAME "ipa_wigig"
 #define IPA_WIGIG_DBG(fmt, args...) \

+ 0 - 486
drivers/platform/msm/ipa/ipa_clients/ipa_wigig.h

@@ -1,486 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
- */
-
-#ifndef _IPA_WIGIG_H_
-#define _IPA_WIGIG_H_
-
-#include <linux/msm_ipa.h>
-#include "ipa.h"
-
-typedef void (*ipa_wigig_misc_int_cb)(void *priv);
-
-/*
- * struct ipa_wigig_init_in_params - wigig init input parameters
- *
- * @periph_baddr_pa: physical address of wigig HW base
- * @pseudo_cause_pa: physical address of wigig HW pseudo_cause register
- * @int_gen_tx_pa: physical address of wigig HW int_gen_tx register
- * @int_gen_rx_pa: physical address of wigig HW int_gen_rx register
- * @dma_ep_misc_pa: physical address of wigig HW dma_ep_misc register
- * @notify: uc ready callback
- * @int_notify: wigig misc interrupt callback
- * @priv: uc ready callback cookie
- */
-struct ipa_wigig_init_in_params {
-	phys_addr_t periph_baddr_pa;
-	phys_addr_t pseudo_cause_pa;
-	phys_addr_t int_gen_tx_pa;
-	phys_addr_t int_gen_rx_pa;
-	phys_addr_t dma_ep_misc_pa;
-	ipa_uc_ready_cb notify;
-	ipa_wigig_misc_int_cb int_notify;
-	void *priv;
-};
-
-/*
- * struct ipa_wigig_init_out_params - wigig init output parameters
- *
- * @is_uC_ready: is uC ready. No API should be called until uC is ready.
- * @uc_db_pa: physical address of IPA uC doorbell
- * @lan_rx_napi_enable: if we use NAPI in the LAN rx
- */
-struct ipa_wigig_init_out_params {
-	bool is_uc_ready;
-	phys_addr_t uc_db_pa;
-	bool lan_rx_napi_enable;
-};
-
-/*
- * struct ipa_wigig_hdr_info - Header to install on IPA HW
- *
- * @hdr: header to install on IPA HW
- * @hdr_len: length of header
- * @dst_mac_addr_offset: destination mac address offset
- * @hdr_type: layer two header type
- */
-struct ipa_wigig_hdr_info {
-	u8 *hdr;
-	u8 hdr_len;
-	u8 dst_mac_addr_offset;
-	enum ipa_hdr_l2_type hdr_type;
-};
-
-/*
- * struct ipa_wigig_reg_intf_in_params - parameters for offload interface
- *	registration
- *
- * @netdev_name: network interface name
- * @netdev_mac: netdev mac address
- * @hdr_info: header information
- */
-struct ipa_wigig_reg_intf_in_params {
-	const char *netdev_name;
-	u8 netdev_mac[IPA_MAC_ADDR_SIZE];
-	struct ipa_wigig_hdr_info hdr_info[IPA_IP_MAX];
-};
-
-/*
- * struct ipa_wigig_pipe_setup_info - WIGIG TX/Rx configuration
- * @desc_ring_base_pa: physical address of the base of the descriptor ring
- * @desc_ring_size: size of the descriptor ring in bytes
- * @desc_ring_HWHEAD_pa: physical address of the wigig descriptor ring HWHEAD
- * @desc_ring_HWTAIL_pa: physical address of the wigig descriptor ring HWTAIL
- * @status_ring_base_pa: physical address of the base of the status ring
- * @status_ring_size: status ring size in bytes
- * @desc_ring_HWHEAD_pa: physical address of the wigig descriptor ring HWHEAD
- * @desc_ring_HWTAIL_pa: physical address of the wigig descriptor ring HWTAIL
- */
-struct ipa_wigig_pipe_setup_info {
-	phys_addr_t desc_ring_base_pa;
-	u16 desc_ring_size;
-	phys_addr_t desc_ring_HWHEAD_pa;
-	phys_addr_t desc_ring_HWTAIL_pa;
-
-	phys_addr_t status_ring_base_pa;
-	u16 status_ring_size;
-	phys_addr_t status_ring_HWHEAD_pa;
-	phys_addr_t status_ring_HWTAIL_pa;
-};
-
-/*
- * struct ipa_wigig_pipe_setup_info_smmu - WIGIG TX/Rx configuration smmu mode
- * @desc_ring_base: sg_table of the base of the descriptor ring
- * @desc_ring_base_iova: IO virtual address mapped to physical base address
- * @desc_ring_size: size of the descriptor ring in bytes
- * @desc_ring_HWHEAD_pa: physical address of the wigig descriptor ring HWHEAD
- * @desc_ring_HWTAIL_pa: physical address of the wigig descriptor ring HWTAIL
- * @status_ring_base: sg_table of the base of the status ring
- * @status_ring_base_iova: IO virtual address mapped to physical base address
- * @status_ring_size: status ring size in bytes
- * @desc_ring_HWHEAD_pa: physical address of the wigig descriptor ring HWHEAD
- * @desc_ring_HWTAIL_pa: physical address of the wigig descriptor ring HWTAIL
- */
-struct ipa_wigig_pipe_setup_info_smmu {
-	struct sg_table desc_ring_base;
-	u64 desc_ring_base_iova;
-	u16 desc_ring_size;
-	phys_addr_t desc_ring_HWHEAD_pa;
-	phys_addr_t desc_ring_HWTAIL_pa;
-
-	struct sg_table status_ring_base;
-	u64 status_ring_base_iova;
-	u16 status_ring_size;
-	phys_addr_t status_ring_HWHEAD_pa;
-	phys_addr_t status_ring_HWTAIL_pa;
-};
-
-/*
- * struct ipa_wigig_rx_pipe_data_buffer_info - WIGIG Rx data buffer
- *	configuration
- * @data_buffer_base_pa: physical address of the physically contiguous
- *			Rx data buffer
- * @data_buffer_size: size of the data buffer
- */
-struct ipa_wigig_rx_pipe_data_buffer_info {
-	phys_addr_t data_buffer_base_pa;
-	u32 data_buffer_size;
-};
-
-/*
- * struct ipa_wigig_rx_pipe_data_buffer_info_smmu - WIGIG Rx data buffer
- *	configuration smmu mode
- * @data_buffer_base: sg_table of the physically contiguous
- *			Rx data buffer
- * @data_buffer_base_iova: IO virtual address mapped to physical base address
- * @data_buffer_size: size of the data buffer
- */
-struct ipa_wigig_rx_pipe_data_buffer_info_smmu {
-	struct sg_table data_buffer_base;
-	u64 data_buffer_base_iova;
-	u32 data_buffer_size;
-};
-
-/*
- * struct ipa_wigig_conn_rx_in_params - information provided by
- *				WIGIG offload client for Rx pipe
- * @notify: client callback function
- * @priv: client cookie
- * @pipe: parameters to connect Rx pipe (WIGIG to IPA)
- * @dbuff: Rx data buffer info
- */
-struct ipa_wigig_conn_rx_in_params {
-	ipa_notify_cb notify;
-	void *priv;
-	struct ipa_wigig_pipe_setup_info pipe;
-	struct ipa_wigig_rx_pipe_data_buffer_info dbuff;
-};
-
-/*
- * struct ipa_wigig_conn_rx_in_params_smmu - information provided by
- *				WIGIG offload client for Rx pipe
- * @notify: client callback function
- * @priv: client cookie
- * @pipe_smmu: parameters to connect Rx pipe (WIGIG to IPA) smmu mode
- * @dbuff_smmu: Rx data buffer info smmu mode
- */
-struct ipa_wigig_conn_rx_in_params_smmu {
-	ipa_notify_cb notify;
-	void *priv;
-	struct ipa_wigig_pipe_setup_info_smmu pipe_smmu;
-	struct ipa_wigig_rx_pipe_data_buffer_info_smmu dbuff_smmu;
-};
-
-/*
- * struct ipa_wigig_conn_out_params - information provided
- *				to WIGIG driver
- * @client: client type allocated by IPA driver
- */
-struct ipa_wigig_conn_out_params {
-	enum ipa_client_type client;
-};
-
-/*
- * struct ipa_wigig_tx_pipe_data_buffer_info - WIGIG Tx data buffer
- *	configuration
- * @data_buffer_size: size of a single data buffer
- */
-struct ipa_wigig_tx_pipe_data_buffer_info {
-	u32 data_buffer_size;
-};
-
-/*
- * struct ipa_wigig_tx_pipe_data_buffer_info_smmu - WIGIG Tx data buffer
- *				configuration smmu mode
- * @data_buffer_base_pa: sg_tables of the Tx data buffers
- * @data_buffer_base_iova: IO virtual address mapped to physical base address
- * @num_buffers: number of buffers
- * @data_buffer_size: size of a single data buffer
- */
-struct ipa_wigig_tx_pipe_data_buffer_info_smmu {
-	struct sg_table *data_buffer_base;
-	u64 *data_buffer_base_iova;
-	u32 num_buffers;
-	u32 data_buffer_size;
-};
-
-/*
- * struct ipa_wigig_conn_tx_in_params - information provided by
- *		wigig offload client for Tx pipe
- * @pipe: parameters to connect Tx pipe (IPA to WIGIG)
- * @dbuff: Tx data buffer info
- * @int_gen_tx_bit_num: bit in int_gen_tx register associated with this client
- * @client_mac: MAC address of client to be connected
- */
-struct ipa_wigig_conn_tx_in_params {
-	struct ipa_wigig_pipe_setup_info pipe;
-	struct ipa_wigig_tx_pipe_data_buffer_info dbuff;
-	u8 int_gen_tx_bit_num;
-	u8 client_mac[IPA_MAC_ADDR_SIZE];
-};
-
-/*
- * struct ipa_wigig_conn_tx_in_params_smmu - information provided by
- *		wigig offload client for Tx pipe
- * @pipe_smmu: parameters to connect Tx pipe (IPA to WIGIG) smmu mode
- * @dbuff_smmu: Tx data buffer info smmu mode
- * @int_gen_tx_bit_num: bit in int_gen_tx register associated with this client
- * @client_mac: MAC address of client to be connected
- */
-struct ipa_wigig_conn_tx_in_params_smmu {
-	struct ipa_wigig_pipe_setup_info_smmu pipe_smmu;
-	struct ipa_wigig_tx_pipe_data_buffer_info_smmu dbuff_smmu;
-	u8 int_gen_tx_bit_num;
-	u8 client_mac[IPA_MAC_ADDR_SIZE];
-};
-
-#if IS_ENABLED(CONFIG_IPA3)
-
-/*
- * ipa_wigig_init - Client should call this function to
- * init WIGIG IPA offload data path
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_init(struct ipa_wigig_init_in_params *in,
-	struct ipa_wigig_init_out_params *out);
-
-/*
- * ipa_wigig_cleanup - Client should call this function to
- * clean up WIGIG IPA offload data path
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_cleanup(void);
-
-/*
- * ipa_wigig_is_smmu_enabled - get smmu state
- *
- * @Return true if smmu is enabled, false if disabled
- */
-bool ipa_wigig_is_smmu_enabled(void);
-
-/*
- * ipa_wigig_reg_intf - Client should call this function to
- * register interface
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_reg_intf(struct ipa_wigig_reg_intf_in_params *in);
-
-/*
- * ipa_wigig_dereg_intf - Client Driver should call this
- * function to deregister before unload and after disconnect
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_dereg_intf(const char *netdev_name);
-
-/*
- * ipa_wigig_conn_rx_pipe - Client should call this
- * function to connect the rx (UL) pipe
- *
- * @in: [in] input parameters from client
- * @out: [out] output params to client
- *
- * Note: Non SMMU mode only, Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_conn_rx_pipe(struct ipa_wigig_conn_rx_in_params *in,
-	struct ipa_wigig_conn_out_params *out);
-
-/*
- * ipa_wigig_conn_rx_pipe_smmu - Client should call this
- * function to connect the rx (UL) pipe
- *
- * @in: [in] input parameters from client
- * @out: [out] output params to client
- *
- * Note: SMMU mode only, Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_conn_rx_pipe_smmu(struct ipa_wigig_conn_rx_in_params_smmu *in,
-	struct ipa_wigig_conn_out_params *out);
-
-/*
- * ipa_wigig_conn_client - Client should call this
- * function to connect one of the tx (DL) pipes when a WIGIG client connects
- *
- * @in: [in] input parameters from client
- * @out: [out] output params to client
- *
- * Note: Non SMMU mode only, Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_conn_client(struct ipa_wigig_conn_tx_in_params *in,
-	struct ipa_wigig_conn_out_params *out);
-
-/*
- * ipa_wigig_conn_client_smmu - Client should call this
- * function to connect one of the tx (DL) pipes when a WIGIG client connects
- *
- * @in: [in] input parameters from client
- * @out: [out] output params to client
- *
- * Note: SMMU mode only, Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_wigig_conn_client_smmu(struct ipa_wigig_conn_tx_in_params_smmu *in,
-	struct ipa_wigig_conn_out_params *out);
-
-/*
- * ipa_wigig_disconn_pipe() - Client should call this
- *		function to disconnect a pipe
- *
- * @client: [in] pipe to be disconnected
- *
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wigig_disconn_pipe(enum ipa_client_type client);
-
-/*
- * ipa_wigig_enable_pipe() - Client should call this
- *		function to enable IPA offload data path
- *
- * @client: [in] pipe to be enabled
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-
-int ipa_wigig_enable_pipe(enum ipa_client_type client);
-
-/*
- * ipa_wigig_disable_pipe() - Client should call this
- *		function to disable IPA offload data path
- *
- * @client: [in] pipe to be disabled
- * Note: Should not be called from atomic context
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wigig_disable_pipe(enum ipa_client_type client);
-
-/*
- * ipa_wigig_tx_dp() - transmit tx packet through IPA to 11ad HW
- *
- * @dst: [in] destination ipa client pipe to be used
- * @skb: [in] skb to be transmitted
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wigig_tx_dp(enum ipa_client_type dst, struct sk_buff *skb);
-
-/**
- * ipa_wigig_set_perf_profile() - Client should call this function to
- *		set IPA clock bandwidth based on data rates
- *
- * @max_supported_bw_mbps: [in] maximum bandwidth needed (in Mbps)
- *
- * Returns: 0 on success, negative on failure
- */
-int ipa_wigig_set_perf_profile(u32 max_supported_bw_mbps);
-
-#else /* IS_ENABLED(CONFIG_IPA3) */
-static inline int ipa_wigig_init(struct ipa_wigig_init_in_params *in,
-	struct ipa_wigig_init_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_cleanup(void)
-{
-	return -EPERM;
-}
-
-static inline bool ipa_wigig_is_smmu_enabled(void)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_reg_intf(struct ipa_wigig_reg_intf_in_params *in)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_dereg_intf(const char *netdev_name)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_conn_rx_pipe(
-	struct ipa_wigig_conn_rx_in_params *in,
-	struct ipa_wigig_conn_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_conn_rx_pipe_smmu(
-	struct ipa_wigig_conn_rx_in_params_smmu *in,
-	struct ipa_wigig_conn_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_conn_client(
-	struct ipa_wigig_conn_tx_in_params *in,
-	struct ipa_wigig_conn_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_conn_client_smmu(
-	struct ipa_wigig_conn_tx_in_params_smmu *in,
-	struct ipa_wigig_conn_out_params *out)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_disconn_pipe(enum ipa_client_type client)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_enable_pipe(enum ipa_client_type client)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_disable_pipe(enum ipa_client_type client)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_tx_dp(enum ipa_client_type dst,
-	struct sk_buff *skb)
-{
-	return -EPERM;
-}
-
-static inline int ipa_wigig_set_perf_profile(u32 max_supported_bw_mbps)
-{
-	return -EPERM;
-}
-#endif /* IS_ENABLED(CONFIG_IPA3) */
-#endif /* _IPA_WIGIG_H_ */

+ 1 - 1
drivers/platform/msm/ipa/ipa_clients/rndis_ipa.c

@@ -17,7 +17,7 @@
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <linux/sched.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/random.h>
 #include <linux/workqueue.h>
 #include "rndis_ipa.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_clients/rndis_ipa.h

@@ -6,7 +6,7 @@
 #ifndef _RNDIS_IPA_H_
 #define _RNDIS_IPA_H_
 
-#include "ipa.h"
+#include <linux/ipa.h>
 
 /*
  * @priv: private data given upon ipa_connect

+ 5 - 5
drivers/platform/msm/ipa/ipa_common_i.h

@@ -5,14 +5,14 @@
 
 #ifndef _IPA_COMMON_I_H_
 #define _IPA_COMMON_I_H_
-#include "ipa_mhi.h"
+#include <linux/ipa_mhi.h>
 #include <linux/ipa_qmi_service_v01.h>
 #include <linux/errno.h>
 #include <linux/ipc_logging.h>
-#include "ipa.h"
-#include "ipa_uc_offload.h"
-#include "ipa_wdi3.h"
-#include "ipa_wigig.h"
+#include <linux/ipa.h>
+#include <linux/ipa_uc_offload.h>
+#include <linux/ipa_wdi3.h>
+#include <linux/ipa_wigig.h>
 #include <linux/ratelimit.h>
 #include "gsi.h"
 

+ 1 - 1
drivers/platform/msm/ipa/ipa_rm.c

@@ -5,7 +5,7 @@
 
 #include <linux/slab.h>
 #include <linux/workqueue.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_rm_dependency_graph.h"
 #include "ipa_rm_i.h"
 #include "ipa_common_i.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_rm_dependency_graph.h

@@ -7,7 +7,7 @@
 #define _IPA_RM_DEPENDENCY_GRAPH_H_
 
 #include <linux/list.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_rm_resource.h"
 
 struct ipa_rm_dep_graph {

+ 1 - 1
drivers/platform/msm/ipa/ipa_rm_i.h

@@ -7,7 +7,7 @@
 #define _IPA_RM_I_H_
 
 #include <linux/workqueue.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_rm_resource.h"
 #include "ipa_common_i.h"
 

+ 1 - 1
drivers/platform/msm/ipa/ipa_rm_inactivity_timer.c

@@ -10,7 +10,7 @@
 #include <linux/timer.h>
 #include <linux/unistd.h>
 #include <linux/workqueue.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_rm_i.h"
 
 #define MAX_WS_NAME 20

+ 1 - 1
drivers/platform/msm/ipa/ipa_rm_resource.h

@@ -7,7 +7,7 @@
 #define _IPA_RM_RESOURCE_H_
 
 #include <linux/list.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_rm_peers_list.h"
 
 /**

+ 1 - 1
drivers/platform/msm/ipa/ipa_uc_offload_common_i.h

@@ -3,7 +3,7 @@
  * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa_mhi.h"
+#include <linux/ipa_mhi.h>
 #include <linux/ipa_qmi_service_v01.h>
 
 #ifndef _IPA_UC_OFFLOAD_COMMON_I_H_

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -22,7 +22,7 @@
 #include <linux/interconnect.h>
 #include <linux/netdevice.h>
 #include <linux/delay.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include <linux/time.h>
 #include <linux/hashtable.h>
 #include <linux/jhash.h>

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_client.c

@@ -7,7 +7,7 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include "ipa_i.h"
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include "gsi.h"
 
 /*

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_defs.h

@@ -5,7 +5,7 @@
 
 #ifndef _IPA_DEFS_H_
 #define _IPA_DEFS_H_
-#include "ipa.h"
+#include <linux/ipa.h>
 
 /**
  * struct ipa_rt_rule_i - attributes of a routing rule

+ 2 - 2
drivers/platform/msm/ipa/ipa_v3/ipa_dma.c

@@ -10,8 +10,8 @@
 #include <linux/kernel.h>
 #include <linux/msm_ipa.h>
 #include <linux/mutex.h>
-#include "ipa.h"
-#include "msm_gsi.h"
+#include <linux/ipa.h>
+#include <linux/msm_gsi.h>
 #include <linux/dmapool.h>
 #include "ipa_i.h"
 #include "gsi.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

@@ -9,7 +9,7 @@
 #include <linux/dmapool.h>
 #include <linux/list.h>
 #include <linux/netdevice.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include <net/sock.h>
 #include "gsi.h"
 #include "ipa_i.h"

+ 3 - 3
drivers/platform/msm/ipa/ipa_v3/ipa_i.h

@@ -17,8 +17,8 @@
 #include <linux/notifier.h>
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
-#include "ipa.h"
-#include "ipa_usb.h"
+#include <linux/ipa.h>
+#include <linux/ipa_usb.h>
 #include <linux/iommu.h>
 #include <linux/platform_device.h>
 #include <linux/firmware.h>
@@ -34,7 +34,7 @@
 #include <linux/mailbox_client.h>
 #include <linux/mailbox/qmp.h>
 #include <linux/rmnet_ipa_fd_ioctl.h>
-#include "ipa_fmwk.h"
+#include <linux/ipa_fmwk.h>
 #include "ipa_uc_holb_monitor.h"
 
 #define IPA_DEV_NAME_MAX_LEN 15

+ 3 - 3
drivers/platform/msm/ipa/ipa_v3/ipa_mhi.c

@@ -8,9 +8,9 @@
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include "ipa.h"
-#include "msm_gsi.h"
-#include "ipa_mhi.h"
+#include <linux/ipa.h>
+#include <linux/msm_gsi.h>
+#include <linux/ipa_mhi.h>
 #include "gsi.h"
 #include "ipa_common_i.h"
 #include "ipa_i.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c

@@ -9,7 +9,7 @@
 #include <linux/device.h>
 #include <linux/module.h>
 #include <linux/mhi.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/gfp.h>

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c

@@ -11,7 +11,7 @@
 #include <linux/delay.h>
 #include <linux/uaccess.h>
 #include <soc/qcom/subsystem_restart.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/vmalloc.h>
 
 #include "ipa_qmi_service.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.h

@@ -6,7 +6,7 @@
 #ifndef IPA_QMI_SERVICE_H
 #define IPA_QMI_SERVICE_H
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/ipa_qmi_service_v01.h>
 #include <uapi/linux/msm_rmnet.h>
 #include <linux/soc/qcom/qmi.h>

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_uc_mhi.c

@@ -3,7 +3,7 @@
  * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_i.h"
 
 /* MHI uC interface definitions */

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_uc_offload_i.h

@@ -6,7 +6,7 @@
 #ifndef _IPA_UC_OFFLOAD_I_H_
 #define _IPA_UC_OFFLOAD_I_H_
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_i.h"
 
 /*

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -8,7 +8,7 @@
 #include <linux/io.h>
 #include <linux/ratelimit.h>
 #include <linux/interconnect.h>
-#include "msm_gsi.h"
+#include <linux/msm_gsi.h>
 #include <linux/elf.h>
 #include "ipa_i.h"
 #include "ipahal.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_wdi3_i.c

@@ -4,7 +4,7 @@
  */
 
 #include "ipa_i.h"
-#include "ipa_wdi3.h"
+#include <linux/ipa_wdi3.h>
 
 #define UPDATE_RP_MODERATION_CONFIG 1
 #define UPDATE_RP_MODERATION_THRESHOLD 8

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_wigig_i.c

@@ -7,7 +7,7 @@
 #include <linux/if_ether.h>
 #include <linux/log2.h>
 #include <linux/debugfs.h>
-#include "ipa_wigig.h"
+#include <linux/ipa_wigig.h>
 
 #define IPA_WIGIG_DESC_RING_EL_SIZE	32
 #define IPA_WIGIG_STATUS_RING_EL_SIZE	16

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_fltrt.c

@@ -3,7 +3,7 @@
  * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/errno.h>
 #include <linux/ipc_logging.h>
 #include <linux/debugfs.h>

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_hw_stats.h

@@ -6,7 +6,7 @@
 #ifndef _IPAHAL_HW_STATS_H_
 #define _IPAHAL_HW_STATS_H_
 
-#include "ipa.h"
+#include <linux/ipa.h>
 
 #define IPAHAL_MAX_PIPES 32
 #define IPAHAL_MAX_RULE_ID_32 (1024 / 32) /* 10 bits of rule id */

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_i.h

@@ -6,7 +6,7 @@
 #ifndef _IPAHAL_I_H_
 #define _IPAHAL_I_H_
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_common_i.h"
 
 #define IPAHAL_DRV_NAME "ipahal"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c

@@ -4,7 +4,7 @@
  */
 
 #include <linux/init.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/kernel.h>
 #include <linux/msm_ipa.h>
 #include "ipahal_i.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.h

@@ -6,7 +6,7 @@
 #ifndef _IPAHAL_REG_H_
 #define _IPAHAL_REG_H_
 
-#include "ipa.h"
+#include <linux/ipa.h>
 
 /*
  * Registers names

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/rmnet_ctl_ipa.c

@@ -6,7 +6,7 @@
 #include <linux/string.h>
 #include <linux/skbuff.h>
 #include <linux/workqueue.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <uapi/linux/msm_rmnet.h>
 #include "ipa_i.h"
 

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c

@@ -26,7 +26,7 @@
 #include <soc/qcom/subsystem_notif.h>
 #include "ipa_qmi_service.h"
 #include <linux/rmnet_ipa_fd_ioctl.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <uapi/linux/msm_rmnet.h>
 #include <net/rmnet_config.h>
 #include "ipa_mhi_proxy.h"

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/teth_bridge.c

@@ -15,7 +15,7 @@
 #include <linux/mutex.h>
 #include <linux/skbuff.h>
 #include <linux/types.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include <linux/netdevice.h>
 #include "ipa_i.h"
 

+ 1 - 1
drivers/platform/msm/ipa/test/ipa_pm_ut.c

@@ -3,7 +3,7 @@
  * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_pm.h"
 #include "ipa_i.h"
 #include "ipa_ut_framework.h"

+ 1 - 1
drivers/platform/msm/ipa/test/ipa_test_dma.c

@@ -3,7 +3,7 @@
  * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
  */
 
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_i.h"
 #include "ipa_ut_framework.h"
 

+ 2 - 2
drivers/platform/msm/ipa/test/ipa_test_mhi.c

@@ -4,8 +4,8 @@
  */
 
 #include <linux/delay.h>
-#include "ipa_mhi.h"
-#include "ipa.h"
+#include <linux/ipa_mhi.h>
+#include <linux/ipa.h>
 #include "ipa_i.h"
 #include "gsi.h"
 #include "gsi_reg.h"

+ 2 - 2
drivers/platform/msm/ipa/test/ipa_test_wdi3.c

@@ -4,8 +4,8 @@
  */
 
 #include "ipa_ut_framework.h"
-#include "ipa_wdi3.h"
-#include "ipa.h"
+#include <linux/ipa_wdi3.h>
+#include <linux/ipa.h>
 #include <linux/delay.h>
 #include "ipa_i.h"
 

+ 1 - 1
drivers/platform/msm/ipa/test/ipa_ut_framework.c

@@ -7,7 +7,7 @@
 #include <linux/module.h>
 #include <linux/debugfs.h>
 #include <linux/device.h>
-#include "ipa.h"
+#include <linux/ipa.h>
 #include "ipa_i.h"
 #include "ipa_ut_framework.h"
 #include "ipa_ut_suite_list.h"