summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpa
diff options
context:
space:
mode:
authorRotariu Marian Cristian-B44860 <marian.rotariu@freescale.com>2014-10-08 12:48:36 (GMT)
committerMadalin-Cristian Bucur <madalin.bucur@freescale.com>2015-03-11 13:30:17 (GMT)
commitd9078b1495b94f6dcb62376b0f4f4f677346b648 (patch)
treea6a335be617bec6a01763d8e992684d863646332 /drivers/net/ethernet/freescale/dpa
parent88ef592b1d1e81bf7e7115787eab843ae351d01a (diff)
downloadlinux-fsl-qoriq-d9078b1495b94f6dcb62376b0f4f4f677346b648.tar.xz
dpaa_eth: remove unnecessary conversion
Protocol and nexthdr, variables from ipv4 and ipv6 layers, are 1 byte long, therefore no byte order conversion is needed. Change-Id: I487b044d9ad942cf39ccbb500318ae8d7d0d9e08 Signed-off-by: Rotariu Marian Cristian-B44860 <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/20934 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32493
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
index 370381a..3e1e615 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
@@ -1611,8 +1611,8 @@ int dpa_enable_tx_csum(struct dpa_priv_s *priv,
fm_prs_result_t *parse_result;
struct iphdr *iph;
struct ipv6hdr *ipv6h = NULL;
- int l4_proto;
- int ethertype = ntohs(skb->protocol);
+ u8 l4_proto;
+ u16 ethertype = ntohs(skb->protocol);
int retval = 0;
if (skb->ip_summed != CHECKSUM_PARTIAL)
@@ -1644,13 +1644,13 @@ int dpa_enable_tx_csum(struct dpa_priv_s *priv,
parse_result->l3r = FM_L3_PARSE_RESULT_IPV4;
iph = ip_hdr(skb);
DPA_BUG_ON(iph == NULL);
- l4_proto = ntohs(iph->protocol);
+ l4_proto = iph->protocol;
break;
case ETH_P_IPV6:
parse_result->l3r = FM_L3_PARSE_RESULT_IPV6;
ipv6h = ipv6_hdr(skb);
DPA_BUG_ON(ipv6h == NULL);
- l4_proto = ntohs(ipv6h->nexthdr);
+ l4_proto = ipv6h->nexthdr;
break;
default:
/* We shouldn't even be here */