move ethtool_op_tx_csum
Subsystems (3)
PATCH 1/1 move ethtool_op_tx_csum
Queued here for both 2.4 and 2.5.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1129 -> 1.1130
# net/core/ethtool.c 1.3 -> 1.4
# include/linux/ethtool.h 1.16 -> 1.17
# net/netsyms.c 1.41 -> 1.42
# drivers/net/8139cp.c 1.43 -> 1.44
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/01 [email protected] 1.1130
# [NET] move ethtool_op_set_tx_csum from 8139cp drvr to net/core/ethtool.c,
# where it belongs. # -------------------------------------------- # diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c --- a/drivers/net/8139cp.c Mon Sep 1 20:32:14 2003 +++ b/drivers/net/8139cp.c Mon Sep 1 20:32:14 2003 @@ -1405,17 +1405,6 @@ return 0; }
-/* move this to net/core/ethtool.c */
-static int ethtool_op_set_tx_csum(struct net_device *dev, u32 data) -{
- if (data)
- dev->features |= NETIF_F_IP_CSUM;
- else
- dev->features &= ~NETIF_F_IP_CSUM;
-
- return 0;
-}
-
static void cp_get_regs(struct net_device *dev, struct ethtool_regs *regs,
void *p)
{
include/linux/ethtool.h +1 -0
@@ -255,6 +255,7 @@/* Some generic methods drivers may use in their ethtool_ops */ u32 ethtool_op_get_link (struct net_device *dev);u32 ethtool_op_get_tx_csum (struct net_device *dev); +int ethtool_op_set_tx_csum (struct net_device *dev,u32 data);u32 ethtool_op_get_sg (struct net_device *dev);int ethtool_op_set_sg (struct net_device *dev,u32 data);
net/core/ethtool.c +10 -0
@@ -31,6 +31,16 @@return (dev->features &NETIF_F_IP_CSUM ) !=0 ; } +int ethtool_op_set_tx_csum (struct net_device *dev,u32 data) +{ +if (data) + dev->features |=NETIF_F_IP_CSUM ; +else + dev->features &= ~NETIF_F_IP_CSUM ; + +return 0 ; +} +u32 ethtool_op_get_sg (struct net_device *dev) {return (dev->features &NETIF_F_SG ) !=0 ;
net/netsyms.c +1 -0
@@ -617,6 +617,7 @@/* ethtool.c */ EXPORT_SYMBOL (ethtool_op_get_link);EXPORT_SYMBOL (ethtool_op_get_tx_csum); +EXPORT_SYMBOL (ethtool_op_set_tx_csum);EXPORT_SYMBOL (ethtool_op_get_sg);EXPORT_SYMBOL (ethtool_op_set_sg);