usb: gadget: f_ncm: add support for no_skb_reserve
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 22 Aug 2016 08:48:27 +0000 (17:48 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 31 Aug 2016 07:06:03 +0000 (10:06 +0300)
This patch adds to support no_skb_reserve function to improve
performance for some platforms. About the detail, please refer to
the commit log of "quirk_avoids_skb_reserve" in
include/linux/usb/gadget.h.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_ncm.c

index 08cff49..6396037 100644 (file)
@@ -924,6 +924,8 @@ static int ncm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
                         */
                        ncm->port.is_zlp_ok =
                                gadget_is_zlp_supported(cdev->gadget);
+                       ncm->port.no_skb_reserve =
+                               gadget_avoids_skb_reserve(cdev->gadget);
                        ncm->port.cdc_filter = DEFAULT_FILTER;
                        DBG(cdev, "activate ncm\n");
                        net = gether_connect(&ncm->port);