Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 094b5855 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric 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: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 21dcda60
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)