o skb->mac_header is not set, so machine panics while using function eth_hdr.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
struct qlcnic_skb_frag *buffrag;
struct cmd_desc_type0 *hwdesc, *first_desc;
struct pci_dev *pdev;
+ struct ethhdr *phdr;
int i, k;
u32 producer;
}
if (adapter->flags & QLCNIC_MACSPOOF) {
- if (compare_ether_addr(eth_hdr(skb)->h_source,
+ phdr = (struct ethhdr *)skb->data;
+ if (compare_ether_addr(phdr->h_source,
adapter->mac_addr))
goto drop_packet;
}