Skip to content

Commit

Permalink
tg3: Use skb_is_gso_v6()
Browse files Browse the repository at this point in the history
This patch converts the driver to prefer the skb_is_gso_v6() helper over
the explicit inlined version.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Sep 15, 2010
1 parent 8fea32b commit 02e9608
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5574,9 +5574,9 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb,
goto out_unlock;
}

if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
if (skb_is_gso_v6(skb)) {
hdrlen = skb_headlen(skb) - ETH_HLEN;
else {
} else {
struct iphdr *iph = ip_hdr(skb);

tcp_opt_len = tcp_optlen(skb);
Expand Down Expand Up @@ -5798,7 +5798,7 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
iph = ip_hdr(skb);
tcp_opt_len = tcp_optlen(skb);

if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) {
if (skb_is_gso_v6(skb)) {
hdr_len = skb_headlen(skb) - ETH_HLEN;
} else {
u32 ip_tcp_len;
Expand Down

0 comments on commit 02e9608

Please sign in to comment.