equal
deleted
inserted
replaced
376 |
376 |
377 static int e1000_set_rx_csum(struct net_device *netdev, u32 data) |
377 static int e1000_set_rx_csum(struct net_device *netdev, u32 data) |
378 { |
378 { |
379 struct e1000_adapter *adapter = netdev_priv(netdev); |
379 struct e1000_adapter *adapter = netdev_priv(netdev); |
380 |
380 |
|
381 if (adapter->ecdev) |
|
382 return -EBUSY; |
|
383 |
381 if (data) |
384 if (data) |
382 adapter->flags |= FLAG_RX_CSUM_ENABLED; |
385 adapter->flags |= FLAG_RX_CSUM_ENABLED; |
383 else |
386 else |
384 adapter->flags &= ~FLAG_RX_CSUM_ENABLED; |
387 adapter->flags &= ~FLAG_RX_CSUM_ENABLED; |
385 |
388 |
395 return ((netdev->features & NETIF_F_HW_CSUM) != 0); |
398 return ((netdev->features & NETIF_F_HW_CSUM) != 0); |
396 } |
399 } |
397 |
400 |
398 static int e1000_set_tx_csum(struct net_device *netdev, u32 data) |
401 static int e1000_set_tx_csum(struct net_device *netdev, u32 data) |
399 { |
402 { |
400 struct e1000_adapter *adapter = netdev_priv(netdev); |
|
401 if (adapter->ecdev) |
|
402 return -EBUSY; |
|
403 |
|
404 if (data) |
403 if (data) |
405 netdev->features |= NETIF_F_HW_CSUM; |
404 netdev->features |= NETIF_F_HW_CSUM; |
406 else |
405 else |
407 netdev->features &= ~NETIF_F_HW_CSUM; |
406 netdev->features &= ~NETIF_F_HW_CSUM; |
408 |
407 |
1943 } |
1942 } |
1944 |
1943 |
1945 static int e1000_nway_reset(struct net_device *netdev) |
1944 static int e1000_nway_reset(struct net_device *netdev) |
1946 { |
1945 { |
1947 struct e1000_adapter *adapter = netdev_priv(netdev); |
1946 struct e1000_adapter *adapter = netdev_priv(netdev); |
|
1947 |
|
1948 if (adapter->ecdev) |
|
1949 return -EBUSY; |
|
1950 |
1948 if (netif_running(netdev)) |
1951 if (netif_running(netdev)) |
1949 e1000e_reinit_locked(adapter); |
1952 e1000e_reinit_locked(adapter); |
1950 return 0; |
1953 return 0; |
1951 } |
1954 } |
1952 |
1955 |