aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/jme.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r--drivers/net/jme.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index c57d9a43ceca..e97ebef3cf47 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -135,7 +135,7 @@ jme_reset_phy_processor(struct jme_adapter *jme)
135 135
136static void 136static void
137jme_setup_wakeup_frame(struct jme_adapter *jme, 137jme_setup_wakeup_frame(struct jme_adapter *jme,
138 u32 *mask, u32 crc, int fnr) 138 const u32 *mask, u32 crc, int fnr)
139{ 139{
140 int i; 140 int i;
141 141
@@ -163,7 +163,7 @@ jme_setup_wakeup_frame(struct jme_adapter *jme,
163static inline void 163static inline void
164jme_reset_mac_processor(struct jme_adapter *jme) 164jme_reset_mac_processor(struct jme_adapter *jme)
165{ 165{
166 u32 mask[WAKEUP_FRAME_MASK_DWNR] = {0, 0, 0, 0}; 166 static const u32 mask[WAKEUP_FRAME_MASK_DWNR] = {0, 0, 0, 0};
167 u32 crc = 0xCDCDCDCD; 167 u32 crc = 0xCDCDCDCD;
168 u32 gpreg0; 168 u32 gpreg0;
169 int i; 169 int i;
@@ -2076,12 +2076,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
2076 } 2076 }
2077 2077
2078 if (new_mtu > 1900) { 2078 if (new_mtu > 1900) {
2079 netdev->features &= ~(NETIF_F_HW_CSUM | 2079 netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
2080 NETIF_F_TSO | 2080 NETIF_F_TSO | NETIF_F_TSO6);
2081 NETIF_F_TSO6);
2082 } else { 2081 } else {
2083 if (test_bit(JME_FLAG_TXCSUM, &jme->flags)) 2082 if (test_bit(JME_FLAG_TXCSUM, &jme->flags))
2084 netdev->features |= NETIF_F_HW_CSUM; 2083 netdev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
2085 if (test_bit(JME_FLAG_TSO, &jme->flags)) 2084 if (test_bit(JME_FLAG_TSO, &jme->flags))
2086 netdev->features |= NETIF_F_TSO | NETIF_F_TSO6; 2085 netdev->features |= NETIF_F_TSO | NETIF_F_TSO6;
2087 } 2086 }
@@ -2514,10 +2513,12 @@ jme_set_tx_csum(struct net_device *netdev, u32 on)
2514 if (on) { 2513 if (on) {
2515 set_bit(JME_FLAG_TXCSUM, &jme->flags); 2514 set_bit(JME_FLAG_TXCSUM, &jme->flags);
2516 if (netdev->mtu <= 1900) 2515 if (netdev->mtu <= 1900)
2517 netdev->features |= NETIF_F_HW_CSUM; 2516 netdev->features |=
2517 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
2518 } else { 2518 } else {
2519 clear_bit(JME_FLAG_TXCSUM, &jme->flags); 2519 clear_bit(JME_FLAG_TXCSUM, &jme->flags);
2520 netdev->features &= ~NETIF_F_HW_CSUM; 2520 netdev->features &=
2521 ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
2521 } 2522 }
2522 2523
2523 return 0; 2524 return 0;
@@ -2797,7 +2798,8 @@ jme_init_one(struct pci_dev *pdev,
2797 netdev->netdev_ops = &jme_netdev_ops; 2798 netdev->netdev_ops = &jme_netdev_ops;
2798 netdev->ethtool_ops = &jme_ethtool_ops; 2799 netdev->ethtool_ops = &jme_ethtool_ops;
2799 netdev->watchdog_timeo = TX_TIMEOUT; 2800 netdev->watchdog_timeo = TX_TIMEOUT;
2800 netdev->features = NETIF_F_HW_CSUM | 2801 netdev->features = NETIF_F_IP_CSUM |
2802 NETIF_F_IPV6_CSUM |
2801 NETIF_F_SG | 2803 NETIF_F_SG |
2802 NETIF_F_TSO | 2804 NETIF_F_TSO |
2803 NETIF_F_TSO6 | 2805 NETIF_F_TSO6 |