diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-03-27 05:17:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-28 04:50:55 +0200 |
commit | 094b5855bf37eae4b297bc47bb5bc5454f1f6fab (patch) | |
tree | b3ec026e256c2ea20a755b13f36e541dbf11df5d | |
parent | f_phonet: fix skb truesize underestimation (diff) | |
download | linux-094b5855bf37eae4b297bc47bb5bc5454f1f6fab.tar.xz linux-094b5855bf37eae4b297bc47bb5bc5454f1f6fab.zip |
cdc-phonet: fix skb truesize underestimation
Now skb_add_rx_frag() has a truesize parameter, we can fix cdc-phonet to
properly account truesize of each fragment : a full page.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/usb/cdc-phonet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 3886b30ed373..3e41b00c6806 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c @@ -165,13 +165,13 @@ static void rx_complete(struct urb *req) memcpy(skb_put(skb, 1), page_address(page), 1); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page, 1, req->actual_length, - req->actual_length); + PAGE_SIZE); page = NULL; } } else { skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page, 0, req->actual_length, - req->actual_length); + PAGE_SIZE); page = NULL; } if (req->actual_length < PAGE_SIZE) |