summaryrefslogtreecommitdiff
path: root/drivers/staging/qlge
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-06-30 15:07:50 +0000
committerDavid S. Miller <davem@davemloft.net>2022-07-02 16:22:25 +0100
commit504148fedb854299972d164b001357b888a9193e (patch)
tree6039f99c8ba79b59026808ea7d9de215d1c59903 /drivers/staging/qlge
parent04740c53cac4bf93b5233a0d774d7f39620378e1 (diff)
net: add skb_[inner_]tcp_all_headers helpers
Most drivers use "skb_transport_offset(skb) + tcp_hdrlen(skb)" to compute headers length for a TCP packet, but others use more convoluted (but equivalent) ways. Add skb_tcp_all_headers() and skb_inner_tcp_all_headers() helpers to harmonize this a bit. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/staging/qlge')
-rw-r--r--drivers/staging/qlge/qlge_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 113a3efd12e9..6cd7fc9589c3 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -2461,7 +2461,7 @@ static int qlge_tso(struct sk_buff *skb, struct qlge_ob_mac_tso_iocb_req *mac_io
mac_iocb_ptr->flags3 |= OB_MAC_TSO_IOCB_IC;
mac_iocb_ptr->frame_len = cpu_to_le32((u32)skb->len);
mac_iocb_ptr->total_hdrs_len =
- cpu_to_le16(skb_transport_offset(skb) + tcp_hdrlen(skb));
+ cpu_to_le16(skb_tcp_all_headers(skb));
mac_iocb_ptr->net_trans_offset =
cpu_to_le16(skb_network_offset(skb) |
skb_transport_offset(skb)