aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sk98lin/skge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sk98lin/skge.c')
-rw-r--r--drivers/net/sk98lin/skge.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index e94ab256b540..e0a93005e6dc 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -1562,10 +1562,10 @@ struct sk_buff *pMessage) /* pointer to send-message */
1562 pTxd->pMBuf = pMessage; 1562 pTxd->pMBuf = pMessage;
1563 1563
1564 if (pMessage->ip_summed == CHECKSUM_PARTIAL) { 1564 if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
1565 u16 hdrlen = pMessage->h.raw - pMessage->data; 1565 u16 hdrlen = skb_transport_offset(pMessage);
1566 u16 offset = hdrlen + pMessage->csum_offset; 1566 u16 offset = hdrlen + pMessage->csum_offset;
1567 1567
1568 if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) && 1568 if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) &&
1569 (pAC->GIni.GIChipRev == 0) && 1569 (pAC->GIni.GIChipRev == 0) &&
1570 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { 1570 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1571 pTxd->TBControl = BMU_TCP_CHECK; 1571 pTxd->TBControl = BMU_TCP_CHECK;
@@ -1681,7 +1681,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
1681 ** Does the HW need to evaluate checksum for TCP or UDP packets? 1681 ** Does the HW need to evaluate checksum for TCP or UDP packets?
1682 */ 1682 */
1683 if (pMessage->ip_summed == CHECKSUM_PARTIAL) { 1683 if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
1684 u16 hdrlen = pMessage->h.raw - pMessage->data; 1684 u16 hdrlen = skb_transport_offset(pMessage);
1685 u16 offset = hdrlen + pMessage->csum_offset; 1685 u16 offset = hdrlen + pMessage->csum_offset;
1686 1686
1687 Control = BMU_STFWD; 1687 Control = BMU_STFWD;
@@ -1691,7 +1691,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
1691 ** opcode for udp is not working in the hardware yet 1691 ** opcode for udp is not working in the hardware yet
1692 ** (Revision 2.0) 1692 ** (Revision 2.0)
1693 */ 1693 */
1694 if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) && 1694 if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) &&
1695 (pAC->GIni.GIChipRev == 0) && 1695 (pAC->GIni.GIChipRev == 0) &&
1696 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { 1696 (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
1697 Control |= BMU_TCP_CHECK; 1697 Control |= BMU_TCP_CHECK;
@@ -2127,7 +2127,7 @@ rx_start:
2127 (dma_addr_t) PhysAddr, 2127 (dma_addr_t) PhysAddr,
2128 FrameLength, 2128 FrameLength,
2129 PCI_DMA_FROMDEVICE); 2129 PCI_DMA_FROMDEVICE);
2130 memcpy(pNewMsg->data, pMsg, FrameLength); 2130 skb_copy_to_linear_data(pNewMsg, pMsg, FrameLength);
2131 2131
2132 pci_dma_sync_single_for_device(pAC->PciDev, 2132 pci_dma_sync_single_for_device(pAC->PciDev,
2133 (dma_addr_t) PhysAddr, 2133 (dma_addr_t) PhysAddr,
@@ -2193,7 +2193,6 @@ rx_start:
2193 SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC, 2193 SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,
2194 FrameLength, pRxPort->PortIndex); 2194 FrameLength, pRxPort->PortIndex);
2195 2195
2196 pMsg->dev = pAC->dev[pRxPort->PortIndex];
2197 pMsg->protocol = eth_type_trans(pMsg, 2196 pMsg->protocol = eth_type_trans(pMsg,
2198 pAC->dev[pRxPort->PortIndex]); 2197 pAC->dev[pRxPort->PortIndex]);
2199 netif_rx(pMsg); 2198 netif_rx(pMsg);
@@ -2246,7 +2245,6 @@ rx_start:
2246 (IFF_PROMISC | IFF_ALLMULTI)) != 0 || 2245 (IFF_PROMISC | IFF_ALLMULTI)) != 0 ||
2247 (ForRlmt & SK_RLMT_RX_PROTOCOL) == 2246 (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
2248 SK_RLMT_RX_PROTOCOL) { 2247 SK_RLMT_RX_PROTOCOL) {
2249 pMsg->dev = pAC->dev[pRxPort->PortIndex];
2250 pMsg->protocol = eth_type_trans(pMsg, 2248 pMsg->protocol = eth_type_trans(pMsg,
2251 pAC->dev[pRxPort->PortIndex]); 2249 pAC->dev[pRxPort->PortIndex]);
2252 netif_rx(pMsg); 2250 netif_rx(pMsg);