From: Masakazu Mokuno <mokuno@sm.sony.co.jp>
To: jgarzik@pobox.com
Cc: netdev@vger.kernel.org,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
geoffrey.levand@am.sony.com
Subject: [PATCH 4/7] PS3: gelic: remove duplicated ethtool handlers
Date: Thu, 07 Feb 2008 19:58:20 +0900 [thread overview]
Message-ID: <20080207195809.AD49.40F06B3A@sm.sony.co.jp> (raw)
PS3: gelic: remove duplicated ethtool handlers
Remove some ethtool handlers, which duplicate functionality that was already
provided by the common ethtool handlers.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
---
drivers/net/ps3_gelic_net.c | 43 +++----------------------------------------
1 file changed, 3 insertions(+), 40 deletions(-)
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1196,28 +1196,6 @@ static int gelic_ether_get_settings(stru
return 0;
}
-static u32 gelic_ether_get_link(struct net_device *netdev)
-{
- struct gelic_card *card = netdev_priv(netdev);
- int status;
- u64 v1, v2;
- int link;
-
- status = lv1_net_control(bus_id(card), dev_id(card),
- GELIC_LV1_GET_ETH_PORT_STATUS,
- GELIC_LV1_VLAN_TX_ETHERNET, 0, 0,
- &v1, &v2);
- if (status)
- return 0; /* link down */
-
- if (v1 & GELIC_LV1_ETHER_LINK_UP)
- link = 1;
- else
- link = 0;
-
- return link;
-}
-
static int gelic_net_nway_reset(struct net_device *netdev)
{
if (netif_running(netdev)) {
@@ -1227,21 +1205,6 @@ static int gelic_net_nway_reset(struct n
return 0;
}
-static u32 gelic_net_get_tx_csum(struct net_device *netdev)
-{
- return (netdev->features & NETIF_F_IP_CSUM) != 0;
-}
-
-static int gelic_net_set_tx_csum(struct net_device *netdev, u32 data)
-{
- if (data)
- netdev->features |= NETIF_F_IP_CSUM;
- else
- netdev->features &= ~NETIF_F_IP_CSUM;
-
- return 0;
-}
-
static u32 gelic_net_get_rx_csum(struct net_device *netdev)
{
struct gelic_card *card = netdev_priv(netdev);
@@ -1260,10 +1223,10 @@ static int gelic_net_set_rx_csum(struct
static struct ethtool_ops gelic_net_ethtool_ops = {
.get_drvinfo = gelic_net_get_drvinfo,
.get_settings = gelic_ether_get_settings,
- .get_link = gelic_ether_get_link,
+ .get_link = ethtool_op_get_link,
.nway_reset = gelic_net_nway_reset,
- .get_tx_csum = gelic_net_get_tx_csum,
- .set_tx_csum = gelic_net_set_tx_csum,
+ .get_tx_csum = ethtool_op_get_tx_csum,
+ .set_tx_csum = ethtool_op_set_tx_csum,
.get_rx_csum = gelic_net_get_rx_csum,
.set_rx_csum = gelic_net_set_rx_csum,
};
reply other threads:[~2008-02-07 10:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080207195809.AD49.40F06B3A@sm.sony.co.jp \
--to=mokuno@sm.sony.co.jp \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=geoffrey.levand@am.sony.com \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox