summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>2011-11-17 02:58:55 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-17 17:03:02 -0500
commit38ff1edb52f737d490126728e3d5ba2b8d2f3ba0 (patch)
tree86110190e30a060bbd0cc5f490a81d5402e1b00c /drivers
parent102463b18d922dd55c29fbfa222e0355ecf3e42f (diff)
downloadlinux-stable-38ff1edb52f737d490126728e3d5ba2b8d2f3ba0.tar.gz
linux-stable-38ff1edb52f737d490126728e3d5ba2b8d2f3ba0.tar.bz2
linux-stable-38ff1edb52f737d490126728e3d5ba2b8d2f3ba0.zip
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 <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/f_phonet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 349077033338..16a509ae517b 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 */