Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[deliverable/linux.git] / drivers / net / ehea / ehea_main.c
index 15401af30108bfc26ef4b307f2d6b85acb917055..bb7d306fb44656c3070fa3c20e2ef7b0759c73fc 100644 (file)
@@ -533,8 +533,15 @@ static inline void ehea_fill_skb(struct net_device *dev,
        int length = cqe->num_bytes_transfered - 4;     /*remove CRC */
 
        skb_put(skb, length);
-       skb->ip_summed = CHECKSUM_UNNECESSARY;
        skb->protocol = eth_type_trans(skb, dev);
+
+       /* The packet was not an IPV4 packet so a complemented checksum was
+          calculated. The value is found in the Internet Checksum field. */
+       if (cqe->status & EHEA_CQE_BLIND_CKSUM) {
+               skb->ip_summed = CHECKSUM_COMPLETE;
+               skb->csum = csum_unfold(~cqe->inet_checksum_value);
+       } else
+               skb->ip_summed = CHECKSUM_UNNECESSARY;
 }
 
 static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array,
@@ -1918,7 +1925,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable)
        struct hcp_ehea_port_cb7 *cb7;
        u64 hret;
 
-       if ((enable && port->promisc) || (!enable && !port->promisc))
+       if (enable == port->promisc)
                return;
 
        cb7 = (void *)get_zeroed_page(GFP_ATOMIC);
@@ -2272,7 +2279,7 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
        pr->swqe_id_counter += 1;
 
-       if (port->vgrp && vlan_tx_tag_present(skb)) {
+       if (vlan_tx_tag_present(skb)) {
                swqe->tx_control |= EHEA_SWQE_VLAN_INSERT;
                swqe->vlan_tag = vlan_tx_tag_get(skb);
        }
This page took 0.026193 seconds and 5 git commands to generate.