aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bna/bnad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bna/bnad.c')
-rw-r--r--drivers/net/bna/bnad.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
index 8e6ceab9f4d..7d25a97d33f 100644
--- a/drivers/net/bna/bnad.c
+++ b/drivers/net/bna/bnad.c
@@ -23,6 +23,7 @@
23#include <linux/if_vlan.h> 23#include <linux/if_vlan.h>
24#include <linux/if_ether.h> 24#include <linux/if_ether.h>
25#include <linux/ip.h> 25#include <linux/ip.h>
26#include <linux/prefetch.h>
26 27
27#include "bnad.h" 28#include "bnad.h"
28#include "bna.h" 29#include "bna.h"
@@ -501,7 +502,7 @@ bnad_poll_cq(struct bnad *bnad, struct bna_ccb *ccb, int budget)
501 502
502 skb_put(skb, ntohs(cmpl->length)); 503 skb_put(skb, ntohs(cmpl->length));
503 if (likely 504 if (likely
504 (bnad->rx_csum && 505 ((bnad->netdev->features & NETIF_F_RXCSUM) &&
505 (((flags & BNA_CQ_EF_IPV4) && 506 (((flags & BNA_CQ_EF_IPV4) &&
506 (flags & BNA_CQ_EF_L3_CKSUM_OK)) || 507 (flags & BNA_CQ_EF_L3_CKSUM_OK)) ||
507 (flags & BNA_CQ_EF_IPV6)) && 508 (flags & BNA_CQ_EF_IPV6)) &&
@@ -2902,23 +2903,20 @@ bnad_netdev_init(struct bnad *bnad, bool using_dac)
2902{ 2903{
2903 struct net_device *netdev = bnad->netdev; 2904 struct net_device *netdev = bnad->netdev;
2904 2905
2905 netdev->features |= NETIF_F_IPV6_CSUM; 2906 netdev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
2906 netdev->features |= NETIF_F_TSO; 2907 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
2907 netdev->features |= NETIF_F_TSO6; 2908 NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_VLAN_TX;
2908 2909
2909 netdev->features |= NETIF_F_GRO; 2910 netdev->vlan_features = NETIF_F_SG | NETIF_F_HIGHDMA |
2910 pr_warn("bna: GRO enabled, using kernel stack GRO\n"); 2911 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
2912 NETIF_F_TSO | NETIF_F_TSO6;
2911 2913
2912 netdev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; 2914 netdev->features |= netdev->hw_features |
2915 NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER;
2913 2916
2914 if (using_dac) 2917 if (using_dac)
2915 netdev->features |= NETIF_F_HIGHDMA; 2918 netdev->features |= NETIF_F_HIGHDMA;
2916 2919
2917 netdev->features |=
2918 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
2919 NETIF_F_HW_VLAN_FILTER;
2920
2921 netdev->vlan_features = netdev->features;
2922 netdev->mem_start = bnad->mmio_start; 2920 netdev->mem_start = bnad->mmio_start;
2923 netdev->mem_end = bnad->mmio_start + bnad->mmio_len - 1; 2921 netdev->mem_end = bnad->mmio_start + bnad->mmio_len - 1;
2924 2922
@@ -2969,7 +2967,6 @@ bnad_init(struct bnad *bnad,
2969 2967
2970 bnad->txq_depth = BNAD_TXQ_DEPTH; 2968 bnad->txq_depth = BNAD_TXQ_DEPTH;
2971 bnad->rxq_depth = BNAD_RXQ_DEPTH; 2969 bnad->rxq_depth = BNAD_RXQ_DEPTH;
2972 bnad->rx_csum = true;
2973 2970
2974 bnad->tx_coalescing_timeo = BFI_TX_COALESCING_TIMEO; 2971 bnad->tx_coalescing_timeo = BFI_TX_COALESCING_TIMEO;
2975 bnad->rx_coalescing_timeo = BFI_RX_COALESCING_TIMEO; 2972 bnad->rx_coalescing_timeo = BFI_RX_COALESCING_TIMEO;