aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 6537574a9cda..0fba8f190762 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -35,6 +35,8 @@
35#include "netxen_nic_hw.h" 35#include "netxen_nic_hw.h"
36#include "netxen_nic_phan_reg.h" 36#include "netxen_nic_phan_reg.h"
37 37
38#include <net/ip.h>
39
38/* PCI Windowing for DDR regions. */ 40/* PCI Windowing for DDR regions. */
39 41
40#define ADDR_IN_RANGE(addr, low, high) \ 42#define ADDR_IN_RANGE(addr, low, high) \
@@ -371,22 +373,21 @@ void netxen_tso_check(struct netxen_adapter *adapter,
371 struct cmd_desc_type0 *desc, struct sk_buff *skb) 373 struct cmd_desc_type0 *desc, struct sk_buff *skb)
372{ 374{
373 if (desc->mss) { 375 if (desc->mss) {
374 desc->total_hdr_length = sizeof(struct ethhdr) + 376 desc->total_hdr_length = (sizeof(struct ethhdr) +
375 ((skb->nh.iph)->ihl * sizeof(u32)) + 377 ip_hdrlen(skb) + tcp_hdrlen(skb));
376 ((skb->h.th)->doff * sizeof(u32));
377 netxen_set_cmd_desc_opcode(desc, TX_TCP_LSO); 378 netxen_set_cmd_desc_opcode(desc, TX_TCP_LSO);
378 } else if (skb->ip_summed == CHECKSUM_PARTIAL) { 379 } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
379 if (skb->nh.iph->protocol == IPPROTO_TCP) { 380 if (ip_hdr(skb)->protocol == IPPROTO_TCP) {
380 netxen_set_cmd_desc_opcode(desc, TX_TCP_PKT); 381 netxen_set_cmd_desc_opcode(desc, TX_TCP_PKT);
381 } else if (skb->nh.iph->protocol == IPPROTO_UDP) { 382 } else if (ip_hdr(skb)->protocol == IPPROTO_UDP) {
382 netxen_set_cmd_desc_opcode(desc, TX_UDP_PKT); 383 netxen_set_cmd_desc_opcode(desc, TX_UDP_PKT);
383 } else { 384 } else {
384 return; 385 return;
385 } 386 }
386 } 387 }
387 adapter->stats.xmitcsummed++; 388 adapter->stats.xmitcsummed++;
388 desc->tcp_hdr_offset = skb->h.raw - skb->data; 389 desc->tcp_hdr_offset = skb_transport_offset(skb);
389 desc->ip_hdr_offset = skb->nh.raw - skb->data; 390 desc->ip_hdr_offset = skb_network_offset(skb);
390} 391}
391 392
392int netxen_is_flash_supported(struct netxen_adapter *adapter) 393int netxen_is_flash_supported(struct netxen_adapter *adapter)