Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89ec4a55 authored by Lena Salman's avatar Lena Salman Committed by Stephen Boyd
Browse files

usb: Add support for multiple RMNETs via IPA



This change adds full support for up to 4 RMNET instances
on via IPA BAM2BAM pipes. Per each RMNET instance
there is a pipe connection accordingly.

Change-Id: I6c94674555d102395b31ab20bb69ae10caf8d41a
Signed-off-by: default avatarLena Salman <esalman@codeaurora.org>
Signed-off-by: default avatarIdo Shayevitz <idos@codeaurora.org>
parent a557d4ef
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ struct usb_bam_connect_ipa_params {
	u32 prod_clnt_hdl;
	u32 cons_clnt_hdl;
	/* params assigned by the CD */
	enum ipa_client_type client;
	enum ipa_client_type src_client;
	enum ipa_client_type dst_client;
	struct ipa_ep_cfg ipa_ep_cfg;
	void *priv;
	void (*notify)(void *priv, enum ipa_dp_evt_type evt,
@@ -101,11 +102,17 @@ struct usb_bam_event_info {
* @desc_mem_buf: descriptor fifo buffer.
* @event: event for wakeup.
* @enabled: true if pipe is enabled.
* @suspended: true if pipe is suspended.
* @cons_stopped: true is pipe has consumer requests stopped.
* @prod_stopped: true if pipe has producer requests stopped.
* @ipa_clnt_hdl : pipe handle to ipa api.
* @priv: private data to return upon activity_notify
*	or inactivity_notify callbacks.
* @activity_notify: callback to invoke on activity on one of the in pipes.
* @inactivity_notify: callback to invoke on inactivity on all pipes.
* @start: callback to invoke to enqueue transfers on a pipe.
* @stop: callback to invoke on dequeue transfers on a pipe.
* @start_stop_param: param for the start/stop callbacks.
*/
struct usb_bam_pipe_connect {
	const char *name;
@@ -127,10 +134,15 @@ struct usb_bam_pipe_connect {
	struct usb_bam_event_info event;
	bool enabled;
	bool suspended;
	bool cons_stopped;
	bool prod_stopped;
	int ipa_clnt_hdl;
	void *priv;
	int (*activity_notify)(void *priv);
	int (*inactivity_notify)(void *priv);
	void (*start)(void *, enum usb_bam_pipe_dir);
	void (*stop)(void *, enum usb_bam_pipe_dir);
	void *start_stop_param;
};

/**
@@ -226,6 +238,8 @@ int usb_bam_register_peer_reset_cb(int (*callback)(void *), void *param);
/**
 * Register callbacks for start/stop of transfers.
 *
 * @idx - Connection index
 *
 * @start - the callback function that will be called in USB
 *				driver to start transfers
 * @stop - the callback function that will be called in USB
@@ -237,6 +251,7 @@ int usb_bam_register_peer_reset_cb(int (*callback)(void *), void *param);
 *
 */
int usb_bam_register_start_stop_cbs(
	u8 idx,
	void (*start)(void *, enum usb_bam_pipe_dir),
	void (*stop)(void *, enum usb_bam_pipe_dir),
	void *param);
@@ -378,6 +393,7 @@ static inline int usb_bam_register_peer_reset_cb(
}

static inline int usb_bam_register_start_stop_cbs(
	u8 idx,
	void (*start)(void *, enum usb_bam_pipe_dir),
	void (*stop)(void *, enum usb_bam_pipe_dir),
	void *param)
Loading