From: Rémi Denis-Courmont Date: Thu, 17 Nov 2011 02:58:55 +0000 (+0000) Subject: f_phonet: fix page offset of first received fragment X-Git-Tag: v3.2-rc3~25^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38ff1edb52f737d490126728e3d5ba2b8d2f3ba0;p=profile%2Fivi%2Fkernel-x86-ivi.git f_phonet: fix page offset of first received fragment We pull one byte (the MAC header) from the first fragment before the fragment is actually appended. So the socket buffer length is 1, not 0. Signed-off-by: Rémi Denis-Courmont Signed-off-by: David S. Miller --- diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c index 34907703333..16a509ae517 100644 --- a/drivers/usb/gadget/f_phonet.c +++ b/drivers/usb/gadget/f_phonet.c @@ -346,7 +346,7 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req) } skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page, - skb->len == 0, req->actual); + skb->len <= 1, req->actual); page = NULL; if (req->actual < req->length) { /* Last fragment */