diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 77cb7555e794..d51729c619c0 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c | |||
@@ -1054,7 +1054,8 @@ static int bcmgenet_xmit_frag(struct net_device *dev, | |||
1054 | /* Reallocate the SKB to put enough headroom in front of it and insert | 1054 | /* Reallocate the SKB to put enough headroom in front of it and insert |
1055 | * the transmit checksum offsets in the descriptors | 1055 | * the transmit checksum offsets in the descriptors |
1056 | */ | 1056 | */ |
1057 | static int bcmgenet_put_tx_csum(struct net_device *dev, struct sk_buff *skb) | 1057 | static struct sk_buff *bcmgenet_put_tx_csum(struct net_device *dev, |
1058 | struct sk_buff *skb) | ||
1058 | { | 1059 | { |
1059 | struct status_64 *status = NULL; | 1060 | struct status_64 *status = NULL; |
1060 | struct sk_buff *new_skb; | 1061 | struct sk_buff *new_skb; |
@@ -1072,7 +1073,7 @@ static int bcmgenet_put_tx_csum(struct net_device *dev, struct sk_buff *skb) | |||
1072 | if (!new_skb) { | 1073 | if (!new_skb) { |
1073 | dev->stats.tx_errors++; | 1074 | dev->stats.tx_errors++; |
1074 | dev->stats.tx_dropped++; | 1075 | dev->stats.tx_dropped++; |
1075 | return -ENOMEM; | 1076 | return NULL; |
1076 | } | 1077 | } |
1077 | skb = new_skb; | 1078 | skb = new_skb; |
1078 | } | 1079 | } |
@@ -1090,7 +1091,7 @@ static int bcmgenet_put_tx_csum(struct net_device *dev, struct sk_buff *skb) | |||
1090 | ip_proto = ipv6_hdr(skb)->nexthdr; | 1091 | ip_proto = ipv6_hdr(skb)->nexthdr; |
1091 | break; | 1092 | break; |
1092 | default: | 1093 | default: |
1093 | return 0; | 1094 | return skb; |
1094 | } | 1095 | } |
1095 | 1096 | ||
1096 | offset = skb_checksum_start_offset(skb) - sizeof(*status); | 1097 | offset = skb_checksum_start_offset(skb) - sizeof(*status); |
@@ -1111,7 +1112,7 @@ static int bcmgenet_put_tx_csum(struct net_device *dev, struct sk_buff *skb) | |||
1111 | status->tx_csum_info = tx_csum_info; | 1112 | status->tx_csum_info = tx_csum_info; |
1112 | } | 1113 | } |
1113 | 1114 | ||
1114 | return 0; | 1115 | return skb; |
1115 | } | 1116 | } |
1116 | 1117 | ||
1117 | static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) | 1118 | static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) |
@@ -1158,8 +1159,8 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1158 | 1159 | ||
1159 | /* set the SKB transmit checksum */ | 1160 | /* set the SKB transmit checksum */ |
1160 | if (priv->desc_64b_en) { | 1161 | if (priv->desc_64b_en) { |
1161 | ret = bcmgenet_put_tx_csum(dev, skb); | 1162 | skb = bcmgenet_put_tx_csum(dev, skb); |
1162 | if (ret) { | 1163 | if (!skb) { |
1163 | ret = NETDEV_TX_OK; | 1164 | ret = NETDEV_TX_OK; |
1164 | goto out; | 1165 | goto out; |
1165 | } | 1166 | } |