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>
This commit is contained in:
Родитель
21dcda6083
Коммит
094b5855bf
|
@ -165,13 +165,13 @@ static void rx_complete(struct urb *req)
|
||||||
memcpy(skb_put(skb, 1), page_address(page), 1);
|
memcpy(skb_put(skb, 1), page_address(page), 1);
|
||||||
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
||||||
page, 1, req->actual_length,
|
page, 1, req->actual_length,
|
||||||
req->actual_length);
|
PAGE_SIZE);
|
||||||
page = NULL;
|
page = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
|
||||||
page, 0, req->actual_length,
|
page, 0, req->actual_length,
|
||||||
req->actual_length);
|
PAGE_SIZE);
|
||||||
page = NULL;
|
page = NULL;
|
||||||
}
|
}
|
||||||
if (req->actual_length < PAGE_SIZE)
|
if (req->actual_length < PAGE_SIZE)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче