237
237
cmd->phy_address = 0;
239
239
if (netif_carrier_ok(netdev)) {
240
cmd->speed = SPEED_10000;
240
ethtool_cmd_speed_set(cmd, SPEED_10000);
241
241
cmd->duplex = DUPLEX_FULL;
243
ethtool_cmd_speed_set(cmd, -1);
244
244
cmd->duplex = -1;
246
246
cmd->transceiver = XCVR_EXTERNAL;
256
256
/* 10G full duplex setting supported only */
257
257
if (cmd->autoneg == AUTONEG_ENABLE)
258
258
return -EOPNOTSUPP; else {
259
if ((cmd->speed == SPEED_10000) && (cmd->duplex == DUPLEX_FULL))
259
if ((ethtool_cmd_speed(cmd) == SPEED_10000)
260
&& (cmd->duplex == DUPLEX_FULL))
810
bnad_get_rx_csum(struct net_device *netdev)
813
struct bnad *bnad = netdev_priv(netdev);
815
rx_csum = bnad->rx_csum;
820
bnad_set_rx_csum(struct net_device *netdev, u32 rx_csum)
822
struct bnad *bnad = netdev_priv(netdev);
824
mutex_lock(&bnad->conf_mutex);
825
bnad->rx_csum = rx_csum;
826
mutex_unlock(&bnad->conf_mutex);
831
bnad_set_tx_csum(struct net_device *netdev, u32 tx_csum)
833
struct bnad *bnad = netdev_priv(netdev);
835
mutex_lock(&bnad->conf_mutex);
837
netdev->features |= NETIF_F_IP_CSUM;
838
netdev->features |= NETIF_F_IPV6_CSUM;
840
netdev->features &= ~NETIF_F_IP_CSUM;
841
netdev->features &= ~NETIF_F_IPV6_CSUM;
843
mutex_unlock(&bnad->conf_mutex);
848
bnad_set_tso(struct net_device *netdev, u32 tso)
850
struct bnad *bnad = netdev_priv(netdev);
852
mutex_lock(&bnad->conf_mutex);
854
netdev->features |= NETIF_F_TSO;
855
netdev->features |= NETIF_F_TSO6;
857
netdev->features &= ~NETIF_F_TSO;
858
netdev->features &= ~NETIF_F_TSO6;
860
mutex_unlock(&bnad->conf_mutex);
865
811
bnad_get_strings(struct net_device *netdev, u32 stringset, u8 * string)
1256
1202
.set_ringparam = bnad_set_ringparam,
1257
1203
.get_pauseparam = bnad_get_pauseparam,
1258
1204
.set_pauseparam = bnad_set_pauseparam,
1259
.get_rx_csum = bnad_get_rx_csum,
1260
.set_rx_csum = bnad_set_rx_csum,
1261
.get_tx_csum = ethtool_op_get_tx_csum,
1262
.set_tx_csum = bnad_set_tx_csum,
1263
.get_sg = ethtool_op_get_sg,
1264
.set_sg = ethtool_op_set_sg,
1265
.get_tso = ethtool_op_get_tso,
1266
.set_tso = bnad_set_tso,
1267
1205
.get_strings = bnad_get_strings,
1268
1206
.get_ethtool_stats = bnad_get_ethtool_stats,
1269
1207
.get_sset_count = bnad_get_sset_count