Merge branch imgsystems/4.1-imgsystems into aosp/master

Conflicts:
    arch/mips/boot/dts/pistachio/Makefile
    arch/mips/boot/dts/pistachio/pistachio_marduk.dts

Change-Id: Ibddb2db255830eb640d1df21b282b6a51369ea7c
diff --git a/drivers/usb/gadget/function/rndis.c b/drivers/usb/gadget/function/rndis.c
index 3b23042..dfdc41c 100644
--- a/drivers/usb/gadget/function/rndis.c
+++ b/drivers/usb/gadget/function/rndis.c
@@ -973,8 +973,10 @@
 	params->dev = dev;
 	params->filter = cdc_filter;
 
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
 	rndis_ul_max_xfer_size_rcvd = 0;
 	rndis_ul_max_pkt_per_xfer_rcvd = 0;
+#endif
 	return 0;
 }
 EXPORT_SYMBOL_GPL(rndis_set_param_dev);
@@ -1007,11 +1009,11 @@
 }
 EXPORT_SYMBOL_GPL(rndis_set_param_medium);
 
-void rndis_set_max_pkt_xfer(u8 configNr, u8 max_pkt_per_xfer)
+void rndis_set_max_pkt_xfer(struct rndis_params *params, u8 max_pkt_per_xfer)
 {
 	pr_debug("%s:\n", __func__);
 
-	rndis_per_dev_params[configNr].max_pkt_per_xfer = max_pkt_per_xfer;
+	params->max_pkt_per_xfer = max_pkt_per_xfer;
 }
 
 void rndis_add_hdr(struct sk_buff *skb)
@@ -1088,8 +1090,10 @@
 {
 	int num_pkts = 1;
 
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
 	if (skb->len > rndis_ul_max_xfer_size_rcvd)
 		rndis_ul_max_xfer_size_rcvd = skb->len;
+#endif
 
 	while (skb->len) {
 		struct rndis_packet_msg_type *hdr;
@@ -1151,8 +1155,10 @@
 		num_pkts++;
 	}
 
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
 	if (num_pkts > rndis_ul_max_pkt_per_xfer_rcvd)
 		rndis_ul_max_pkt_per_xfer_rcvd = num_pkts;
+#endif
 
 	skb_queue_tail(list, skb);
 	return 0;
diff --git a/drivers/usb/gadget/function/rndis.h b/drivers/usb/gadget/function/rndis.h
index 9e94041..310cac3 100644
--- a/drivers/usb/gadget/function/rndis.h
+++ b/drivers/usb/gadget/function/rndis.h
@@ -207,7 +207,7 @@
 			    const char *vendorDescr);
 int  rndis_set_param_medium(struct rndis_params *params, u32 medium,
 			     u32 speed);
-void rndis_set_max_pkt_xfer(struct rndir_params *params, u8 max_pkt_per_xfer);
+void rndis_set_max_pkt_xfer(struct rndis_params *params, u8 max_pkt_per_xfer);
 void rndis_add_hdr(struct sk_buff *skb);
 int rndis_rm_hdr(struct gether *port, struct sk_buff *skb,
 			struct sk_buff_head *list);