|
@@ -1330,18 +1330,6 @@ static struct tx_agg *r8152_get_tx_agg(struct r8152 *tp)
|
|
return agg;
|
|
return agg;
|
|
}
|
|
}
|
|
|
|
|
|
-static inline __be16 get_protocol(struct sk_buff *skb)
|
|
|
|
-{
|
|
|
|
- __be16 protocol;
|
|
|
|
-
|
|
|
|
- if (skb->protocol == htons(ETH_P_8021Q))
|
|
|
|
- protocol = vlan_eth_hdr(skb)->h_vlan_encapsulated_proto;
|
|
|
|
- else
|
|
|
|
- protocol = skb->protocol;
|
|
|
|
-
|
|
|
|
- return protocol;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/* r8152_csum_workaround()
|
|
/* r8152_csum_workaround()
|
|
* The hw limites the value the transport offset. When the offset is out of the
|
|
* The hw limites the value the transport offset. When the offset is out of the
|
|
* range, calculate the checksum by sw.
|
|
* range, calculate the checksum by sw.
|
|
@@ -1447,7 +1435,7 @@ static int r8152_tx_csum(struct r8152 *tp, struct tx_desc *desc,
|
|
goto unavailable;
|
|
goto unavailable;
|
|
}
|
|
}
|
|
|
|
|
|
- switch (get_protocol(skb)) {
|
|
|
|
|
|
+ switch (vlan_get_protocol(skb)) {
|
|
case htons(ETH_P_IP):
|
|
case htons(ETH_P_IP):
|
|
opts1 |= GTSENDV4;
|
|
opts1 |= GTSENDV4;
|
|
break;
|
|
break;
|
|
@@ -1478,7 +1466,7 @@ static int r8152_tx_csum(struct r8152 *tp, struct tx_desc *desc,
|
|
goto unavailable;
|
|
goto unavailable;
|
|
}
|
|
}
|
|
|
|
|
|
- switch (get_protocol(skb)) {
|
|
|
|
|
|
+ switch (vlan_get_protocol(skb)) {
|
|
case htons(ETH_P_IP):
|
|
case htons(ETH_P_IP):
|
|
opts2 |= IPV4_CS;
|
|
opts2 |= IPV4_CS;
|
|
ip_protocol = ip_hdr(skb)->protocol;
|
|
ip_protocol = ip_hdr(skb)->protocol;
|