aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ps3_gelic_net.c43
1 files changed, 3 insertions, 40 deletions
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index c09848cbfb68..87fc3b765e8e 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1196,28 +1196,6 @@ static int gelic_ether_get_settings(struct net_device *netdev,
1196 return 0; 1196 return 0;
1197} 1197}
1198 1198
1199static u32 gelic_ether_get_link(struct net_device *netdev)
1200{
1201 struct gelic_card *card = netdev_priv(netdev);
1202 int status;
1203 u64 v1, v2;
1204 int link;
1205
1206 status = lv1_net_control(bus_id(card), dev_id(card),
1207 GELIC_LV1_GET_ETH_PORT_STATUS,
1208 GELIC_LV1_VLAN_TX_ETHERNET, 0, 0,
1209 &v1, &v2);
1210 if (status)
1211 return 0; /* link down */
1212
1213 if (v1 & GELIC_LV1_ETHER_LINK_UP)
1214 link = 1;
1215 else
1216 link = 0;
1217
1218 return link;
1219}
1220
1221static int gelic_net_nway_reset(struct net_device *netdev) 1199static int gelic_net_nway_reset(struct net_device *netdev)
1222{ 1200{
1223 if (netif_running(netdev)) { 1201 if (netif_running(netdev)) {
@@ -1227,21 +1205,6 @@ static int gelic_net_nway_reset(struct net_device *netdev)
1227 return 0; 1205 return 0;
1228} 1206}
1229 1207
1230static u32 gelic_net_get_tx_csum(struct net_device *netdev)
1231{
1232 return (netdev->features & NETIF_F_IP_CSUM) != 0;
1233}
1234
1235static int gelic_net_set_tx_csum(struct net_device *netdev, u32 data)
1236{
1237 if (data)
1238 netdev->features |= NETIF_F_IP_CSUM;
1239 else
1240 netdev->features &= ~NETIF_F_IP_CSUM;
1241
1242 return 0;
1243}
1244
1245static u32 gelic_net_get_rx_csum(struct net_device *netdev) 1208static u32 gelic_net_get_rx_csum(struct net_device *netdev)
1246{ 1209{
1247 struct gelic_card *card = netdev_priv(netdev); 1210 struct gelic_card *card = netdev_priv(netdev);
@@ -1260,10 +1223,10 @@ static int gelic_net_set_rx_csum(struct net_device *netdev, u32 data)
1260static struct ethtool_ops gelic_net_ethtool_ops = { 1223static struct ethtool_ops gelic_net_ethtool_ops = {
1261 .get_drvinfo = gelic_net_get_drvinfo, 1224 .get_drvinfo = gelic_net_get_drvinfo,
1262 .get_settings = gelic_ether_get_settings, 1225 .get_settings = gelic_ether_get_settings,
1263 .get_link = gelic_ether_get_link, 1226 .get_link = ethtool_op_get_link,
1264 .nway_reset = gelic_net_nway_reset, 1227 .nway_reset = gelic_net_nway_reset,
1265 .get_tx_csum = gelic_net_get_tx_csum, 1228 .get_tx_csum = ethtool_op_get_tx_csum,
1266 .set_tx_csum = gelic_net_set_tx_csum, 1229 .set_tx_csum = ethtool_op_set_tx_csum,
1267 .get_rx_csum = gelic_net_get_rx_csum, 1230 .get_rx_csum = gelic_net_get_rx_csum,
1268 .set_rx_csum = gelic_net_set_rx_csum, 1231 .set_rx_csum = gelic_net_set_rx_csum,
1269}; 1232};