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

Commit 0f1b0356 authored by Shilpa Suresh's avatar Shilpa Suresh Committed by Chetan C R
Browse files

usb: gadget: f_qc_rndis: Add RNDIS support using IPA over BAM2BAM



On some targets RNDIS function uses BAM to BAM transport,
and is handled by the f_qc_rndis driver. This change
adds RNDIS support using IPA over BAM2BAM.
This is snapshot of the qcrndis driver as of kernel
msm-4.9 'commit e4c6a37f8770697d4 ("msm: vidc: avoid OOB
write while accessing memory")'.

Change-Id: I34e9ab6ca25ea515a36ffd54216a09177e5fa746
Signed-off-by: default avatarShilpa Suresh <sbsure@codeaurora.org>
Signed-off-by: default avatarChetan C R <cchinnad@codeaurora.org>
Signed-off-by: default avatarSwetha Chikkaboraiah <schikk@codeaurora.org>
parent ddb64845
Loading
Loading
Loading
Loading
+1774 −116

File changed.

Preview size limit exceeded, changes collapsed.

+27 −0
Original line number Diff line number Diff line
@@ -190,6 +190,9 @@ config USB_RNDIS
config USB_F_RNDIS
	tristate

config USB_F_QCRNDIS
	tristate

config USB_F_MASS_STORAGE
	tristate

@@ -247,6 +250,9 @@ config USB_F_MTP
config USB_F_PTP
	tristate

config USB_F_RMNET_BAM
        tristate

# this first set of drivers all depend on bulk-capable hardware.

config USB_CONFIGFS
@@ -331,6 +337,15 @@ config USB_CONFIGFS_ECM_SUBSET
	  On hardware that can't implement the full protocol,
	  a simple CDC subset is used, placing fewer demands on USB.

config USB_CONFIGFS_QCRNDIS
	bool "QCRNDIS"
	depends on USB_CONFIGFS
	depends on NET
	depends on RNDIS_IPA
	select USB_U_ETHER
	select USB_RNDIS
	select USB_F_QCRNDIS

config USB_CONFIGFS_RNDIS
	bool "RNDIS"
	depends on USB_CONFIGFS
@@ -348,6 +363,18 @@ config USB_CONFIGFS_RNDIS
	   XP, you'll need to download drivers from Microsoft's website; a URL
	   is given in comments found in that info file.

config USB_CONFIGFS_RMNET_BAM
	bool "RMNET_BAM"
	depends on USB_CONFIGFS
	select USB_F_RMNET_BAM
	help
	   RmNet interface is a new logical device in QMI framework for data
	   services. RmNet in accordance with QMI architecture uses Data I/O
	   channel for IP data transfer and control I/O channel for QMI
	   messaging (functionality similar to AT commands).
	   RmNet interface is an alternative to standard CDC-ECM and windows
	   RNDIS.

config USB_CONFIGFS_EEM
	bool "Ethernet Emulation Model (EEM)"
	depends on USB_CONFIGFS
+2 −0
Original line number Diff line number Diff line
@@ -69,3 +69,5 @@ usb_f_mtp-y := f_mtp.o
obj-$(CONFIG_USB_F_MTP)		+= usb_f_mtp.o
usb_f_ptp-y			:= f_ptp.o
obj-$(CONFIG_USB_F_PTP)		+= usb_f_ptp.o
usb_f_qcrndis-y			:= f_qc_rndis.o u_data_ipa.o
obj-$(CONFIG_USB_F_QCRNDIS)	+= usb_f_qcrndis.o
+1556 −0

File added.

Preview size limit exceeded, changes collapsed.

+12 −0
Original line number Diff line number Diff line
@@ -1006,6 +1006,18 @@ int rndis_set_param_medium(struct rndis_params *params, u32 medium, u32 speed)
}
EXPORT_SYMBOL_GPL(rndis_set_param_medium);

u32 rndis_get_dl_max_xfer_size(struct rndis_params *params)
{
	pr_debug("%s:\n", __func__);
	return params->dl_max_xfer_size;
}

u32 rndis_get_ul_max_xfer_size(struct rndis_params *params)
{
	pr_debug("%s:\n", __func__);
	return params->ul_max_xfer_size;
}

void rndis_set_max_pkt_xfer(struct rndis_params *params, u8 max_pkt_per_xfer)
{
	pr_debug("%s:\n", __func__);
Loading