dect
/
linux-2.6
Archived
13
0
Fork 0

drivers/net: const-ify ethtool_ops declarations

Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Jeff Garzik 2006-09-13 14:30:00 -04:00
parent 76fd859370
commit 7282d491ec
106 changed files with 163 additions and 178 deletions

View File

@ -881,7 +881,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
debug = level;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_msglevel = netdev_get_msglevel,
.set_msglevel = netdev_set_msglevel,

View File

@ -13,7 +13,7 @@ static void el_reset(struct net_device *dev);
static int el1_close(struct net_device *dev);
static struct net_device_stats *el1_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
#define EL1_IO_EXTENT 16

View File

@ -79,7 +79,7 @@ static void el2_block_input(struct net_device *dev, int count, struct sk_buff *s
int ring_offset);
static void el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
int ring_page);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
/* This routine probes for a memory-mapped 3c503 board by looking for
@ -666,7 +666,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
sprintf(info->bus_info, "ISA 0x%lx", dev->base_addr);
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -1169,7 +1169,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
debug = level;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_msglevel = netdev_get_msglevel,
.set_msglevel = netdev_set_msglevel,

View File

@ -294,7 +294,7 @@ static void el16_tx_timeout (struct net_device *dev);
static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad);
static void init_82586_mem(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void init_rx_bufs(struct net_device *);
static int io = 0x300;
@ -919,7 +919,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
debug = level;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_msglevel = netdev_get_msglevel,
.set_msglevel = netdev_set_msglevel,

View File

@ -200,7 +200,7 @@ static void set_multicast_list(struct net_device *dev);
static void el3_tx_timeout (struct net_device *dev);
static void el3_down(struct net_device *dev);
static void el3_up(struct net_device *dev);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
#ifdef EL3_SUSPEND
static int el3_suspend(struct device *, pm_message_t);
static int el3_resume(struct device *);
@ -1349,7 +1349,7 @@ static void el3_set_msglevel(struct net_device *dev, u32 v)
el3_debug = v;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = el3_get_drvinfo,
.get_settings = el3_get_settings,
.set_settings = el3_set_settings,

View File

@ -379,7 +379,7 @@ static int corkscrew_close(struct net_device *dev);
static void update_stats(int addr, struct net_device *dev);
static struct net_device_stats *corkscrew_get_stats(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
/*
@ -1561,7 +1561,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
corkscrew_debug = level;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_msglevel = netdev_get_msglevel,
.set_msglevel = netdev_set_msglevel,

View File

@ -189,7 +189,7 @@ static void elmc_timeout(struct net_device *dev);
#ifdef ELMC_MULTICAST
static void set_multicast_list(struct net_device *dev);
#endif
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
/* helper-functions */
static int init586(struct net_device *dev);
@ -1259,7 +1259,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
sprintf(info->bus_info, "MCA 0x%lx", dev->base_addr);
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -222,7 +222,7 @@ static int mc32_close(struct net_device *dev);
static struct net_device_stats *mc32_get_stats(struct net_device *dev);
static void mc32_set_multicast_list(struct net_device *dev);
static void mc32_reset_multicast_list(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void cleanup_card(struct net_device *dev)
{
@ -1627,7 +1627,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
mc32_debug = level;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_msglevel = netdev_get_msglevel,
.set_msglevel = netdev_set_msglevel,

View File

@ -729,7 +729,7 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
#endif
static void vortex_tx_timeout(struct net_device *dev);
static void acpi_set_WOL(struct net_device *dev);
static struct ethtool_ops vortex_ethtool_ops;
static const struct ethtool_ops vortex_ethtool_ops;
static void set_8021q_mode(struct net_device *dev, int enable);
/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
@ -2873,7 +2873,7 @@ static void vortex_get_drvinfo(struct net_device *dev,
}
}
static struct ethtool_ops vortex_ethtool_ops = {
static const struct ethtool_ops vortex_ethtool_ops = {
.get_drvinfo = vortex_get_drvinfo,
.get_strings = vortex_get_strings,
.get_msglevel = vortex_get_msglevel,

View File

@ -1546,7 +1546,7 @@ static void cp_get_ethtool_stats (struct net_device *dev,
pci_free_consistent(cp->pdev, sizeof(*nic_stats), nic_stats, dma);
}
static struct ethtool_ops cp_ethtool_ops = {
static const struct ethtool_ops cp_ethtool_ops = {
.get_drvinfo = cp_get_drvinfo,
.get_regs_len = cp_get_regs_len,
.get_stats_count = cp_get_stats_count,

View File

@ -639,7 +639,7 @@ static void __set_rx_mode (struct net_device *dev);
static void rtl8139_hw_start (struct net_device *dev);
static void rtl8139_thread (void *_data);
static void rtl8139_tx_timeout_task(void *_data);
static struct ethtool_ops rtl8139_ethtool_ops;
static const struct ethtool_ops rtl8139_ethtool_ops;
/* write MMIO register, with flush */
/* Flush avoids rtl8139 bug w/ posted MMIO writes */
@ -2446,7 +2446,7 @@ static void rtl8139_get_strings(struct net_device *dev, u32 stringset, u8 *data)
memcpy(data, ethtool_stats_keys, sizeof(ethtool_stats_keys));
}
static struct ethtool_ops rtl8139_ethtool_ops = {
static const struct ethtool_ops rtl8139_ethtool_ops = {
.get_drvinfo = rtl8139_get_drvinfo,
.get_settings = rtl8139_get_settings,
.set_settings = rtl8139_set_settings,

View File

@ -451,7 +451,7 @@ static int ace_get_settings(struct net_device *, struct ethtool_cmd *);
static int ace_set_settings(struct net_device *, struct ethtool_cmd *);
static void ace_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
static struct ethtool_ops ace_ethtool_ops = {
static const struct ethtool_ops ace_ethtool_ops = {
.get_settings = ace_get_settings,
.set_settings = ace_set_settings,
.get_drvinfo = ace_get_drvinfo,

View File

@ -1645,7 +1645,7 @@ static int amd8111e_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol_
return 0;
}
static struct ethtool_ops ops = {
static const struct ethtool_ops ops = {
.get_drvinfo = amd8111e_get_drvinfo,
.get_regs_len = amd8111e_get_regs_len,
.get_regs = amd8111e_get_regs,

View File

@ -648,7 +648,7 @@ static void at91ether_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo
strlcpy(info->bus_info, dev->class_dev.dev->bus_id, sizeof(info->bus_info));
}
static struct ethtool_ops at91ether_ethtool_ops = {
static const struct ethtool_ops at91ether_ethtool_ops = {
.get_settings = at91ether_get_settings,
.set_settings = at91ether_set_settings,
.get_drvinfo = at91ether_get_drvinfo,

View File

@ -626,7 +626,7 @@ static int etherh_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
return 0;
}
static struct ethtool_ops etherh_ethtool_ops = {
static const struct ethtool_ops etherh_ethtool_ops = {
.get_settings = etherh_get_settings,
.set_settings = etherh_set_settings,
.get_drvinfo = etherh_get_drvinfo,

View File

@ -608,7 +608,7 @@ au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
info->regdump_len = 0;
}
static struct ethtool_ops au1000_ethtool_ops = {
static const struct ethtool_ops au1000_ethtool_ops = {
.get_settings = au1000_get_settings,
.set_settings = au1000_set_settings,
.get_drvinfo = au1000_get_drvinfo,

View File

@ -2012,7 +2012,7 @@ static int b44_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
return 0;
}
static struct ethtool_ops b44_ethtool_ops = {
static const struct ethtool_ops b44_ethtool_ops = {
.get_drvinfo = b44_get_drvinfo,
.get_settings = b44_get_settings,
.set_settings = b44_set_settings,

View File

@ -5429,7 +5429,7 @@ bnx2_phys_id(struct net_device *dev, u32 data)
return 0;
}
static struct ethtool_ops bnx2_ethtool_ops = {
static const struct ethtool_ops bnx2_ethtool_ops = {
.get_settings = bnx2_get_settings,
.set_settings = bnx2_set_settings,
.get_drvinfo = bnx2_get_drvinfo,

View File

@ -4130,7 +4130,7 @@ static void bond_ethtool_get_drvinfo(struct net_device *bond_dev,
snprintf(drvinfo->fw_version, 32, "%d", BOND_ABI_VERSION);
}
static struct ethtool_ops bond_ethtool_ops = {
static const struct ethtool_ops bond_ethtool_ops = {
.get_tx_csum = ethtool_op_get_tx_csum,
.get_tso = ethtool_op_get_tso,
.get_ufo = ethtool_op_get_ufo,

View File

@ -4812,7 +4812,7 @@ static void cas_get_ethtool_stats(struct net_device *dev,
BUG_ON(i != CAS_NUM_STAT_KEYS);
}
static struct ethtool_ops cas_ethtool_ops = {
static const struct ethtool_ops cas_ethtool_ops = {
.get_drvinfo = cas_get_drvinfo,
.get_settings = cas_get_settings,
.set_settings = cas_set_settings,

View File

@ -779,7 +779,7 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
return 0;
}
static struct ethtool_ops t1_ethtool_ops = {
static const struct ethtool_ops t1_ethtool_ops = {
.get_settings = get_settings,
.set_settings = set_settings,
.get_drvinfo = get_drvinfo,

View File

@ -434,7 +434,7 @@ static void e100_reset_transceiver(struct net_device* net);
static void e100_clear_network_leds(unsigned long dummy);
static void e100_set_network_leds(int active);
static struct ethtool_ops e100_ethtool_ops;
static const struct ethtool_ops e100_ethtool_ops;
static void broadcom_check_speed(struct net_device* dev);
static void broadcom_check_duplex(struct net_device* dev);
@ -1552,7 +1552,7 @@ static int e100_nway_reset(struct net_device *dev)
return 0;
}
static struct ethtool_ops e100_ethtool_ops = {
static const struct ethtool_ops e100_ethtool_ops = {
.get_settings = e100_get_settings,
.set_settings = e100_set_settings,
.get_drvinfo = e100_get_drvinfo,

View File

@ -83,7 +83,7 @@ static int mii_read (struct net_device *dev, int phy_addr, int reg_num);
static int mii_write (struct net_device *dev, int phy_addr, int reg_num,
u16 data);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
static int __devinit
rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
@ -1261,7 +1261,7 @@ static u32 rio_get_link(struct net_device *dev)
return np->link_status;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = rio_get_drvinfo,
.get_settings = rio_get_settings,
.set_settings = rio_set_settings,

View File

@ -2477,7 +2477,7 @@ static void e100_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
}
}
static struct ethtool_ops e100_ethtool_ops = {
static const struct ethtool_ops e100_ethtool_ops = {
.get_settings = e100_get_settings,
.set_settings = e100_set_settings,
.get_drvinfo = e100_get_drvinfo,

View File

@ -1922,7 +1922,7 @@ e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data)
}
}
static struct ethtool_ops e1000_ethtool_ops = {
static const struct ethtool_ops e1000_ethtool_ops = {
.get_settings = e1000_get_settings,
.set_settings = e1000_set_settings,
.get_drvinfo = e1000_get_drvinfo,

View File

@ -743,7 +743,7 @@ static void __init eepro_print_info (struct net_device *dev)
printEEPROMInfo(dev);
}
static struct ethtool_ops eepro_ethtool_ops;
static const struct ethtool_ops eepro_ethtool_ops;
/* This is the real probe routine. Linux has a history of friendly device
probes on the ISA bus. A good device probe avoids doing writes, and
@ -1771,7 +1771,7 @@ static void eepro_ethtool_get_drvinfo(struct net_device *dev,
sprintf(drvinfo->bus_info, "ISA 0x%lx", dev->base_addr);
}
static struct ethtool_ops eepro_ethtool_ops = {
static const struct ethtool_ops eepro_ethtool_ops = {
.get_settings = eepro_ethtool_get_settings,
.get_drvinfo = eepro_ethtool_get_drvinfo,
};

View File

@ -494,7 +494,7 @@ static struct net_device_stats *speedo_get_stats(struct net_device *dev);
static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static void set_rx_mode(struct net_device *dev);
static void speedo_show_state(struct net_device *dev);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
@ -2015,7 +2015,7 @@ static void speedo_set_msglevel(struct net_device *dev, u32 v)
sp->msg_enable = v;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = speedo_get_drvinfo,
.get_settings = speedo_get_settings,
.set_settings = speedo_set_settings,

View File

@ -270,7 +270,7 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
kfree(cb6);
}
struct ethtool_ops ehea_ethtool_ops = {
const struct ethtool_ops ehea_ethtool_ops = {
.get_settings = ehea_get_settings,
.get_drvinfo = ehea_get_drvinfo,
.get_msglevel = ehea_get_msglevel,

View File

@ -299,7 +299,7 @@ static int epic_rx(struct net_device *dev, int budget);
static int epic_poll(struct net_device *dev, int *budget);
static irqreturn_t epic_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static int epic_close(struct net_device *dev);
static struct net_device_stats *epic_get_stats(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
@ -1492,7 +1492,7 @@ static void ethtool_complete(struct net_device *dev)
}
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
.set_settings = netdev_set_settings,

View File

@ -305,8 +305,8 @@ static int ewrk3_close(struct net_device *dev);
static struct net_device_stats *ewrk3_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static int ewrk3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops ethtool_ops_203;
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops_203;
static const struct ethtool_ops ethtool_ops;
/*
** Private functions
@ -1666,14 +1666,14 @@ static int ewrk3_phys_id(struct net_device *dev, u32 data)
return signal_pending(current) ? -ERESTARTSYS : 0;
}
static struct ethtool_ops ethtool_ops_203 = {
static const struct ethtool_ops ethtool_ops_203 = {
.get_drvinfo = ewrk3_get_drvinfo,
.get_settings = ewrk3_get_settings,
.set_settings = ewrk3_set_settings,
.phys_id = ewrk3_phys_id,
};
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = ewrk3_get_drvinfo,
.get_settings = ewrk3_get_settings,
.set_settings = ewrk3_set_settings,

View File

@ -440,7 +440,7 @@ static void set_rx_mode(struct net_device *dev);
static void __set_rx_mode(struct net_device *dev);
static struct net_device_stats *get_stats(struct net_device *dev);
static int mii_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static int netdev_close(struct net_device *dev);
static void reset_rx_descriptors(struct net_device *dev);
static void reset_tx_descriptors(struct net_device *dev);
@ -1885,7 +1885,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 value)
debug = value;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
.set_settings = netdev_set_settings,

View File

@ -1034,20 +1034,20 @@ static void fec_set_msglevel(struct net_device *dev, __u32 value)
fep->msg_enable = value;
}
static struct ethtool_ops fec_ethtool_ops = {
.get_drvinfo = fec_get_drvinfo,
.get_regs_len = fec_get_regs_len,
.get_settings = fec_get_settings,
.set_settings = fec_set_settings,
.nway_reset = fec_nway_reset,
.get_link = ethtool_op_get_link,
.get_msglevel = fec_get_msglevel,
.set_msglevel = fec_set_msglevel,
.get_tx_csum = ethtool_op_get_tx_csum,
.set_tx_csum = ethtool_op_set_tx_csum, /* local! */
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
.get_regs = fec_get_regs,
static const struct ethtool_ops fec_ethtool_ops = {
.get_drvinfo = fec_get_drvinfo,
.get_regs_len = fec_get_regs_len,
.get_settings = fec_get_settings,
.set_settings = fec_set_settings,
.nway_reset = fec_nway_reset,
.get_link = ethtool_op_get_link,
.get_msglevel = fec_get_msglevel,
.set_msglevel = fec_set_msglevel,
.get_tx_csum = ethtool_op_get_tx_csum,
.set_tx_csum = ethtool_op_set_tx_csum, /* local! */
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
.get_regs = fec_get_regs,
};
static int fec_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)

View File

@ -3962,7 +3962,7 @@ static void nv_get_strings(struct net_device *dev, u32 stringset, u8 *buffer)
}
}
static struct ethtool_ops ops = {
static const struct ethtool_ops ops = {
.get_drvinfo = nv_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_wol = nv_get_wol,

View File

@ -908,7 +908,7 @@ static void fs_set_msglevel(struct net_device *dev, u32 value)
fep->msg_enable = value;
}
static struct ethtool_ops fs_ethtool_ops = {
static const struct ethtool_ops fs_ethtool_ops = {
.get_drvinfo = fs_get_drvinfo,
.get_regs_len = fs_get_regs_len,
.get_settings = fs_get_settings,

View File

@ -143,7 +143,7 @@ void gfar_start(struct net_device *dev);
static void gfar_clear_exact_match(struct net_device *dev);
static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);
extern struct ethtool_ops gfar_ethtool_ops;
extern const struct ethtool_ops gfar_ethtool_ops;
MODULE_AUTHOR("Freescale Semiconductor, Inc");
MODULE_DESCRIPTION("Gianfar Ethernet Driver");

View File

@ -754,8 +754,6 @@ static inline void gfar_write(volatile unsigned __iomem *addr, u32 val)
out_be32(addr, val);
}
extern struct ethtool_ops *gfar_op_array[];
extern irqreturn_t gfar_receive(int irq, void *dev_id, struct pt_regs *regs);
extern int startup_gfar(struct net_device *dev);
extern void stop_gfar(struct net_device *dev);

View File

@ -567,7 +567,7 @@ static void gfar_set_msglevel(struct net_device *dev, uint32_t data)
}
struct ethtool_ops gfar_ethtool_ops = {
const struct ethtool_ops gfar_ethtool_ops = {
.get_settings = gfar_gsettings,
.set_settings = gfar_ssettings,
.get_drvinfo = gfar_gdrvinfo,

View File

@ -563,8 +563,8 @@ static void hamachi_error(struct net_device *dev, int intr_status);
static int hamachi_close(struct net_device *dev);
static struct net_device_stats *hamachi_get_stats(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
static struct ethtool_ops ethtool_ops;
static struct ethtool_ops ethtool_ops_no_mii;
static const struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops_no_mii;
static int __devinit hamachi_init_one (struct pci_dev *pdev,
const struct pci_device_id *ent)
@ -1919,7 +1919,7 @@ static u32 hamachi_get_link(struct net_device *dev)
return mii_link_ok(&np->mii_if);
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.begin = check_if_running,
.get_drvinfo = hamachi_get_drvinfo,
.get_settings = hamachi_get_settings,
@ -1928,7 +1928,7 @@ static struct ethtool_ops ethtool_ops = {
.get_link = hamachi_get_link,
};
static struct ethtool_ops ethtool_ops_no_mii = {
static const struct ethtool_ops ethtool_ops_no_mii = {
.begin = check_if_running,
.get_drvinfo = hamachi_get_drvinfo,
};

View File

@ -1883,7 +1883,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev,
info->regdump_len = emac_ethtool_get_regs_len(ndev);
}
static struct ethtool_ops emac_ethtool_ops = {
static const struct ethtool_ops emac_ethtool_ops = {
.get_settings = emac_ethtool_get_settings,
.set_settings = emac_ethtool_set_settings,
.get_drvinfo = emac_ethtool_get_drvinfo,

View File

@ -606,7 +606,7 @@ static u32 netdev_get_link(struct net_device *dev) {
return 1;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
.get_link = netdev_get_link,

View File

@ -115,7 +115,7 @@ static inline void ioc3_stop(struct ioc3_private *ip);
static void ioc3_init(struct net_device *dev);
static const char ioc3_str[] = "IOC3 Ethernet";
static struct ethtool_ops ioc3_ethtool_ops;
static const struct ethtool_ops ioc3_ethtool_ops;
/* We use this to acquire receive skb's that we can DMA directly into. */
@ -1580,7 +1580,7 @@ static u32 ioc3_get_link(struct net_device *dev)
return rc;
}
static struct ethtool_ops ioc3_ethtool_ops = {
static const struct ethtool_ops ioc3_ethtool_ops = {
.get_drvinfo = ioc3_get_drvinfo,
.get_settings = ioc3_get_settings,
.set_settings = ioc3_set_settings,

View File

@ -1029,7 +1029,7 @@ static u32 veth_get_link(struct net_device *dev)
return 1;
}
static struct ethtool_ops ops = {
static const struct ethtool_ops ops = {
.get_drvinfo = veth_get_drvinfo,
.get_settings = veth_get_settings,
.get_link = veth_get_link,

View File

@ -699,7 +699,7 @@ ixgb_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data)
}
}
static struct ethtool_ops ixgb_ethtool_ops = {
static const struct ethtool_ops ixgb_ethtool_ops = {
.get_settings = ixgb_get_settings,
.set_settings = ixgb_set_settings,
.get_drvinfo = ixgb_get_drvinfo,

View File

@ -190,7 +190,7 @@ static u32 loopback_get_link(struct net_device *dev)
return 1;
}
static struct ethtool_ops loopback_ethtool_ops = {
static const struct ethtool_ops loopback_ethtool_ops = {
.get_link = loopback_get_link,
.get_tso = ethtool_op_get_tso,
.set_tso = ethtool_op_set_tso,

View File

@ -74,7 +74,7 @@ static int ethernet_phy_detect(unsigned int eth_port_num);
static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location);
static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val);
static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
static struct ethtool_ops mv643xx_ethtool_ops;
static const struct ethtool_ops mv643xx_ethtool_ops;
static char mv643xx_driver_name[] = "mv643xx_eth";
static char mv643xx_driver_version[] = "1.0";
@ -2766,7 +2766,7 @@ static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int c
return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
}
static struct ethtool_ops mv643xx_ethtool_ops = {
static const struct ethtool_ops mv643xx_ethtool_ops = {
.get_settings = mv643xx_get_settings,
.set_settings = mv643xx_set_settings,
.get_drvinfo = mv643xx_get_drvinfo,

View File

@ -1389,7 +1389,7 @@ static u32 myri10ge_get_msglevel(struct net_device *netdev)
return mgp->msg_enable;
}
static struct ethtool_ops myri10ge_ethtool_ops = {
static const struct ethtool_ops myri10ge_ethtool_ops = {
.get_settings = myri10ge_get_settings,
.get_drvinfo = myri10ge_get_drvinfo,
.get_coalesce = myri10ge_get_coalesce,

View File

@ -647,7 +647,7 @@ static void enable_wol_mode(struct net_device *dev, int enable_intr);
static int netdev_close(struct net_device *dev);
static int netdev_get_regs(struct net_device *dev, u8 *buf);
static int netdev_get_eeprom(struct net_device *dev, u8 *buf);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
static inline void __iomem *ns_ioaddr(struct net_device *dev)
{
@ -2573,7 +2573,7 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8
return res;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = get_drvinfo,
.get_regs_len = get_regs_len,
.get_eeprom_len = get_eeprom_len,

View File

@ -175,7 +175,7 @@ static void ne2k_pci_block_input(struct net_device *dev, int count,
struct sk_buff *skb, int ring_offset);
static void ne2k_pci_block_output(struct net_device *dev, const int count,
const unsigned char *buf, const int start_page);
static struct ethtool_ops ne2k_pci_ethtool_ops;
static const struct ethtool_ops ne2k_pci_ethtool_ops;
@ -635,7 +635,7 @@ static void ne2k_pci_get_drvinfo(struct net_device *dev,
strcpy(info->bus_info, pci_name(pci_dev));
}
static struct ethtool_ops ne2k_pci_ethtool_ops = {
static const struct ethtool_ops ne2k_pci_ethtool_ops = {
.get_drvinfo = ne2k_pci_get_drvinfo,
.get_tx_csum = ethtool_op_get_tx_csum,
.get_sg = ethtool_op_get_sg,

View File

@ -1273,7 +1273,7 @@ static u32 ns83820_get_link(struct net_device *ndev)
return cfg & CFG_LNKSTS ? 1 : 0;
}
static struct ethtool_ops ops = {
static const struct ethtool_ops ops = {
.get_drvinfo = ns83820_get_drvinfo,
.get_link = ns83820_get_link
};

View File

@ -245,7 +245,7 @@ static int el3_rx(struct net_device *dev, int worklimit);
static int el3_close(struct net_device *dev);
static void el3_tx_timeout(struct net_device *dev);
static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void set_rx_mode(struct net_device *dev);
static void tc574_detach(struct pcmcia_device *p_dev);
@ -1095,7 +1095,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
strcpy(info->driver, "3c574_cs");
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -158,7 +158,7 @@ static int el3_rx(struct net_device *dev);
static int el3_close(struct net_device *dev);
static void el3_tx_timeout(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void tc589_detach(struct pcmcia_device *p_dev);
@ -530,7 +530,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
}
#endif /* PCMCIA_DEBUG */
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
#ifdef PCMCIA_DEBUG
.get_msglevel = netdev_get_msglevel,

View File

@ -91,7 +91,7 @@ static void axnet_release(struct pcmcia_device *link);
static int axnet_open(struct net_device *dev);
static int axnet_close(struct net_device *dev);
static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs);
static void ei_watchdog(u_long arg);
static void axnet_reset_8390(struct net_device *dev);
@ -671,7 +671,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
strcpy(info->driver, "axnet_cs");
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -103,7 +103,7 @@ static void fjn_reset(struct net_device *dev);
static struct net_device_stats *fjn_get_stats(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
static void fjn_tx_timeout(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
/*
card type
@ -1092,7 +1092,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
}
#endif /* PCMCIA_DEBUG */
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
#ifdef PCMCIA_DEBUG
.get_msglevel = netdev_get_msglevel,

View File

@ -126,7 +126,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
strcpy(info->driver, "ibmtr_cs");
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -431,7 +431,7 @@ static struct net_device_stats *mace_get_stats(struct net_device *dev);
static int mace_rx(struct net_device *dev, unsigned char RxCnt);
static void restore_multicast_list(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void nmclan_detach(struct pcmcia_device *p_dev);
@ -907,7 +907,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
}
#endif /* PCMCIA_DEBUG */
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
#ifdef PCMCIA_DEBUG
.get_msglevel = netdev_get_msglevel,

View File

@ -108,7 +108,7 @@ static void pcnet_release(struct pcmcia_device *link);
static int pcnet_open(struct net_device *dev);
static int pcnet_close(struct net_device *dev);
static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static irqreturn_t ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs);
static void ei_watchdog(u_long arg);
static void pcnet_reset_8390(struct net_device *dev);
@ -1181,7 +1181,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
strcpy(info->driver, "pcnet_cs");
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -299,7 +299,7 @@ static void mdio_sync(kio_addr_t addr);
static int mdio_read(struct net_device *dev, int phy_id, int loc);
static void mdio_write(struct net_device *dev, int phy_id, int loc, int value);
static int smc_link_ok(struct net_device *dev);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
/*======================================================================
@ -2207,7 +2207,7 @@ static int smc_nway_reset(struct net_device *dev)
return -EOPNOTSUPP;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.begin = check_if_running,
.get_drvinfo = smc_get_drvinfo,
.get_settings = smc_get_settings,

View File

@ -361,7 +361,7 @@ static int set_card_type(struct pcmcia_device *link, const void *s);
static int do_config(struct net_device *dev, struct ifmap *map);
static int do_open(struct net_device *dev);
static int do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void hardreset(struct net_device *dev);
static void do_reset(struct net_device *dev, int full);
static int init_mii(struct net_device *dev);
@ -1553,7 +1553,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
sprintf(info->bus_info, "PCMCIA 0x%lx", dev->base_addr);
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -1499,7 +1499,7 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
spin_unlock_irqrestore(&lp->lock, flags);
}
static struct ethtool_ops pcnet32_ethtool_ops = {
static const struct ethtool_ops pcnet32_ethtool_ops = {
.get_settings = pcnet32_get_settings,
.set_settings = pcnet32_set_settings,
.get_drvinfo = pcnet32_get_drvinfo,

View File

@ -1588,7 +1588,7 @@ static void ql_set_msglevel(struct net_device *ndev, u32 value)
qdev->msg_enable = value;
}
static struct ethtool_ops ql3xxx_ethtool_ops = {
static const struct ethtool_ops ql3xxx_ethtool_ops = {
.get_settings = ql_get_settings,
.get_drvinfo = ql_get_drvinfo,
.get_perm_addr = ethtool_op_get_perm_addr,

View File

@ -1124,7 +1124,7 @@ static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data)
}
static struct ethtool_ops rtl8169_ethtool_ops = {
static const struct ethtool_ops rtl8169_ethtool_ops = {
.get_drvinfo = rtl8169_get_drvinfo,
.get_regs_len = rtl8169_get_regs_len,
.get_link = ethtool_op_get_link,

View File

@ -427,7 +427,7 @@ static void rionet_set_msglevel(struct net_device *ndev, u32 value)
rnet->msg_enable = value;
}
static struct ethtool_ops rionet_ethtool_ops = {
static const struct ethtool_ops rionet_ethtool_ops = {
.get_drvinfo = rionet_get_drvinfo,
.get_msglevel = rionet_get_msglevel,
.set_msglevel = rionet_set_msglevel,

View File

@ -5736,7 +5736,7 @@ static int s2io_ethtool_op_set_tso(struct net_device *dev, u32 data)
return 0;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_settings = s2io_ethtool_gset,
.set_settings = s2io_ethtool_sset,
.get_drvinfo = s2io_ethtool_gdrvinfo,

View File

@ -999,7 +999,7 @@ static irqreturn_t
s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs);
static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs);
static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static void s2io_set_link(unsigned long data);
static int s2io_set_swapper(nic_t * sp);
static void s2io_card_down(nic_t *nic);

View File

@ -1747,7 +1747,7 @@ static void sis190_set_msglevel(struct net_device *dev, u32 value)
tp->msg_enable = value;
}
static struct ethtool_ops sis190_ethtool_ops = {
static const struct ethtool_ops sis190_ethtool_ops = {
.get_settings = sis190_get_settings,
.set_settings = sis190_set_settings,
.get_drvinfo = sis190_get_drvinfo,

View File

@ -232,7 +232,7 @@ static void sis900_set_capability( struct net_device *net_dev ,struct mii_phy *p
static u16 sis900_reset_phy(struct net_device *net_dev, int phy_addr);
static void sis900_auto_negotiate(struct net_device *net_dev, int phy_addr);
static void sis900_set_mode (long ioaddr, int speed, int duplex);
static struct ethtool_ops sis900_ethtool_ops;
static const struct ethtool_ops sis900_ethtool_ops;
/**
* sis900_get_mac_addr - Get MAC address for stand alone SiS900 model
@ -2099,7 +2099,7 @@ static void sis900_get_wol(struct net_device *net_dev, struct ethtool_wolinfo *w
wol->supported = (WAKE_PHY | WAKE_MAGIC);
}
static struct ethtool_ops sis900_ethtool_ops = {
static const struct ethtool_ops sis900_ethtool_ops = {
.get_drvinfo = sis900_get_drvinfo,
.get_msglevel = sis900_get_msglevel,
.set_msglevel = sis900_set_msglevel,

View File

@ -581,7 +581,7 @@ static int setRxCsum(struct net_device *dev, u32 data)
return 0;
}
struct ethtool_ops SkGeEthtoolOps = {
const struct ethtool_ops SkGeEthtoolOps = {
.get_settings = getSettings,
.set_settings = setSettings,
.get_drvinfo = getDriverInfo,

View File

@ -248,7 +248,7 @@ static void DumpLong(char*, int);
/* global variables *********************************************************/
static SK_BOOL DoPrintInterfaceChange = SK_TRUE;
extern struct ethtool_ops SkGeEthtoolOps;
extern const struct ethtool_ops SkGeEthtoolOps;
/* local variables **********************************************************/
static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}};

View File

@ -691,7 +691,7 @@ static int skge_phys_id(struct net_device *dev, u32 data)
return 0;
}
static struct ethtool_ops skge_ethtool_ops = {
static const struct ethtool_ops skge_ethtool_ops = {
.get_settings = skge_get_settings,
.set_settings = skge_set_settings,
.get_drvinfo = skge_get_drvinfo,

View File

@ -3033,7 +3033,7 @@ static void sky2_get_regs(struct net_device *dev, struct ethtool_regs *regs,
regs->len - B3_RI_WTO_R1);
}
static struct ethtool_ops sky2_ethtool_ops = {
static const struct ethtool_ops sky2_ethtool_ops = {
.get_settings = sky2_get_settings,
.set_settings = sky2_set_settings,
.get_drvinfo = sky2_get_drvinfo,

View File

@ -1821,7 +1821,7 @@ static int smc911x_ethtool_geteeprom_len(struct net_device *dev)
return SMC911X_EEPROM_LEN;
}
static struct ethtool_ops smc911x_ethtool_ops = {
static const struct ethtool_ops smc911x_ethtool_ops = {
.get_settings = smc911x_ethtool_getsettings,
.set_settings = smc911x_ethtool_setsettings,
.get_drvinfo = smc911x_ethtool_getdrvinfo,

View File

@ -1739,7 +1739,7 @@ static void smc_ethtool_setmsglevel(struct net_device *dev, u32 level)
lp->msg_enable = level;
}
static struct ethtool_ops smc_ethtool_ops = {
static const struct ethtool_ops smc_ethtool_ops = {
.get_settings = smc_ethtool_getsettings,
.set_settings = smc_ethtool_setsettings,
.get_drvinfo = smc_ethtool_getdrvinfo,

View File

@ -29,7 +29,7 @@
extern int spider_net_stop(struct net_device *netdev);
extern int spider_net_open(struct net_device *netdev);
extern struct ethtool_ops spider_net_ethtool_ops;
extern const struct ethtool_ops spider_net_ethtool_ops;
extern char spider_net_driver_name[];

View File

@ -142,7 +142,7 @@ spider_net_ethtool_get_ringparam(struct net_device *netdev,
ering->rx_pending = card->rx_desc;
}
struct ethtool_ops spider_net_ethtool_ops = {
const struct ethtool_ops spider_net_ethtool_ops = {
.get_settings = spider_net_ethtool_get_settings,
.get_drvinfo = spider_net_ethtool_get_drvinfo,
.get_wol = spider_net_ethtool_get_wol,

View File

@ -642,7 +642,7 @@ static struct net_device_stats *get_stats(struct net_device *dev);
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static int netdev_close(struct net_device *dev);
static void netdev_media_change(struct net_device *dev);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
#ifdef VLAN_SUPPORT
@ -1868,7 +1868,7 @@ static void set_msglevel(struct net_device *dev, u32 val)
debug = val;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.begin = check_if_running,
.get_drvinfo = get_drvinfo,
.get_settings = get_settings,

View File

@ -1071,7 +1071,7 @@ static u32 bigmac_get_link(struct net_device *dev)
return (bp->sw_bmsr & BMSR_LSTATUS);
}
static struct ethtool_ops bigmac_ethtool_ops = {
static const struct ethtool_ops bigmac_ethtool_ops = {
.get_drvinfo = bigmac_get_drvinfo,
.get_link = bigmac_get_link,
};

View File

@ -431,7 +431,7 @@ static int __set_mac_addr(struct net_device *dev);
static struct net_device_stats *get_stats(struct net_device *dev);
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static int netdev_close(struct net_device *dev);
static struct ethtool_ops ethtool_ops;
static const struct ethtool_ops ethtool_ops;
static void sundance_reset(struct net_device *dev, unsigned long reset_cmd)
{
@ -1569,7 +1569,7 @@ static void set_msglevel(struct net_device *dev, u32 val)
np->msg_enable = val;
}
static struct ethtool_ops ethtool_ops = {
static const struct ethtool_ops ethtool_ops = {
.begin = check_if_running,
.get_drvinfo = get_drvinfo,
.get_settings = get_settings,

View File

@ -2753,7 +2753,7 @@ static int gem_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
return 0;
}
static struct ethtool_ops gem_ethtool_ops = {
static const struct ethtool_ops gem_ethtool_ops = {
.get_drvinfo = gem_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_settings = gem_get_settings,

View File

@ -2512,7 +2512,7 @@ static u32 hme_get_link(struct net_device *dev)
return (hp->sw_bmsr & BMSR_LSTATUS);
}
static struct ethtool_ops hme_ethtool_ops = {
static const struct ethtool_ops hme_ethtool_ops = {
.get_settings = hme_get_settings,
.set_settings = hme_set_settings,
.get_drvinfo = hme_get_drvinfo,

View File

@ -1318,7 +1318,7 @@ static u32 sparc_lance_get_link(struct net_device *dev)
return 1;
}
static struct ethtool_ops sparc_lance_ethtool_ops = {
static const struct ethtool_ops sparc_lance_ethtool_ops = {
.get_drvinfo = sparc_lance_get_drvinfo,
.get_link = sparc_lance_get_link,
};

View File

@ -718,7 +718,7 @@ static u32 qe_get_link(struct net_device *dev)
return (phyconfig & MREGS_PHYCONFIG_LSTAT);
}
static struct ethtool_ops qe_ethtool_ops = {
static const struct ethtool_ops qe_ethtool_ops = {
.get_drvinfo = qe_get_drvinfo,
.get_link = qe_get_link,
};

View File

@ -8962,7 +8962,7 @@ static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
return 0;
}
static struct ethtool_ops tg3_ethtool_ops = {
static const struct ethtool_ops tg3_ethtool_ops = {
.get_settings = tg3_get_settings,
.set_settings = tg3_set_settings,
.get_drvinfo = tg3_get_drvinfo,

View File

@ -1670,7 +1670,7 @@ static void de_get_regs(struct net_device *dev, struct ethtool_regs *regs,
spin_unlock_irq(&de->lock);
}
static struct ethtool_ops de_ethtool_ops = {
static const struct ethtool_ops de_ethtool_ops = {
.get_link = ethtool_op_get_link,
.get_tx_csum = ethtool_op_get_tx_csum,
.get_sg = ethtool_op_get_sg,

View File

@ -298,7 +298,7 @@ static int dmfe_start_xmit(struct sk_buff *, struct DEVICE *);
static int dmfe_stop(struct DEVICE *);
static struct net_device_stats * dmfe_get_stats(struct DEVICE *);
static void dmfe_set_filter_mode(struct DEVICE *);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static u16 read_srom_word(long ,int);
static irqreturn_t dmfe_interrupt(int , void *, struct pt_regs *);
#ifdef CONFIG_NET_POLL_CONTROLLER
@ -1048,7 +1048,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
dev->base_addr, dev->irq);
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -837,7 +837,7 @@ static void tulip_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *in
strcpy(info->bus_info, pci_name(np->pdev));
}
static struct ethtool_ops ops = {
static const struct ethtool_ops ops = {
.get_drvinfo = tulip_get_drvinfo
};

View File

@ -222,7 +222,7 @@ static int uli526x_start_xmit(struct sk_buff *, struct net_device *);
static int uli526x_stop(struct net_device *);
static struct net_device_stats * uli526x_get_stats(struct net_device *);
static void uli526x_set_filter_mode(struct net_device *);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static u16 read_srom_word(long, int);
static irqreturn_t uli526x_interrupt(int, void *, struct pt_regs *);
static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long);
@ -985,7 +985,7 @@ static void uli526x_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
wol->wolopts = 0;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
.get_link = netdev_get_link,

View File

@ -339,7 +339,7 @@ static u32 __set_rx_mode(struct net_device *dev);
static void set_rx_mode(struct net_device *dev);
static struct net_device_stats *get_stats(struct net_device *dev);
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static int netdev_close(struct net_device *dev);
@ -1447,7 +1447,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 value)
debug = value;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
.set_settings = netdev_set_settings,

View File

@ -190,7 +190,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
strcpy(info->bus_info, pci_name(private->pdev));
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
};

View File

@ -334,7 +334,7 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev);
static int xircom_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static void set_rx_mode(struct net_device *dev);
static void check_duplex(struct net_device *dev);
static struct ethtool_ops ops;
static const struct ethtool_ops ops;
/* The Xircom cards are picky about when certain bits in CSR6 can be
@ -1430,7 +1430,7 @@ static void xircom_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *i
strcpy(info->bus_info, pci_name(tp->pdev));
}
static struct ethtool_ops ops = {
static const struct ethtool_ops ops = {
.get_settings = xircom_get_settings,
.set_settings = xircom_set_settings,
.get_drvinfo = xircom_get_drvinfo,

View File

@ -69,7 +69,7 @@ static int debug;
/* Network device part of the driver */
static LIST_HEAD(tun_dev_list);
static struct ethtool_ops tun_ethtool_ops;
static const struct ethtool_ops tun_ethtool_ops;
/* Net device open. */
static int tun_net_open(struct net_device *dev)
@ -856,7 +856,7 @@ static int tun_set_rx_csum(struct net_device *dev, u32 data)
return 0;
}
static struct ethtool_ops tun_ethtool_ops = {
static const struct ethtool_ops tun_ethtool_ops = {
.get_settings = tun_get_settings,
.get_drvinfo = tun_get_drvinfo,
.get_msglevel = tun_get_msglevel,

View File

@ -1241,7 +1241,7 @@ typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
ering->tx_pending = TXLO_ENTRIES - 1;
}
static struct ethtool_ops typhoon_ethtool_ops = {
static const struct ethtool_ops typhoon_ethtool_ops = {
.get_settings = typhoon_get_settings,
.set_settings = typhoon_set_settings,
.get_drvinfo = typhoon_get_drvinfo,

View File

@ -4129,20 +4129,7 @@ static int ucc_geth_close(struct net_device *dev)
return 0;
}
struct ethtool_ops ucc_geth_ethtool_ops = {
.get_settings = NULL,
.get_drvinfo = NULL,
.get_regs_len = NULL,
.get_regs = NULL,
.get_link = NULL,
.get_coalesce = NULL,
.set_coalesce = NULL,
.get_ringparam = NULL,
.set_ringparam = NULL,
.get_strings = NULL,
.get_stats_count = NULL,
.get_ethtool_stats = NULL,
};
const struct ethtool_ops ucc_geth_ethtool_ops = { };
static int ucc_geth_probe(struct device *device)
{

View File

@ -411,7 +411,7 @@ static void rhine_error(struct net_device *dev, int intr_status);
static void rhine_set_rx_mode(struct net_device *dev);
static struct net_device_stats *rhine_get_stats(struct net_device *dev);
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static struct ethtool_ops netdev_ethtool_ops;
static const struct ethtool_ops netdev_ethtool_ops;
static int rhine_close(struct net_device *dev);
static void rhine_shutdown (struct pci_dev *pdev);
@ -1796,7 +1796,7 @@ static int rhine_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
return 0;
}
static struct ethtool_ops netdev_ethtool_ops = {
static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
.set_settings = netdev_set_settings,

View File

@ -86,7 +86,7 @@ static int msglevel = MSG_LEVEL_INFO;
static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
static struct ethtool_ops velocity_ethtool_ops;
static const struct ethtool_ops velocity_ethtool_ops;
/*
Define module options
@ -2971,7 +2971,7 @@ static void velocity_set_msglevel(struct net_device *dev, u32 value)
msglevel = value;
}
static struct ethtool_ops velocity_ethtool_ops = {
static const struct ethtool_ops velocity_ethtool_ops = {
.get_settings = velocity_get_settings,
.set_settings = velocity_set_settings,
.get_drvinfo = velocity_get_drvinfo,

View File

@ -44,7 +44,7 @@ static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *
strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
}
struct ethtool_ops bcm43xx_ethtool_ops = {
const struct ethtool_ops bcm43xx_ethtool_ops = {
.get_drvinfo = bcm43xx_get_drvinfo,
.get_link = ethtool_op_get_link,
};

View File

@ -3,6 +3,6 @@
#include <linux/ethtool.h>
extern struct ethtool_ops bcm43xx_ethtool_ops;
extern const struct ethtool_ops bcm43xx_ethtool_ops;
#endif /* BCM43xx_ETHTOOL_H_ */

View File

@ -86,7 +86,7 @@ void hostap_info_process(local_info_t *local, struct sk_buff *skb);
/* hostap_ioctl.c */
extern const struct iw_handler_def hostap_iw_handler_def;
extern struct ethtool_ops prism2_ethtool_ops;
extern const struct ethtool_ops prism2_ethtool_ops;
int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);

View File

@ -3908,7 +3908,7 @@ static void prism2_get_drvinfo(struct net_device *dev,
local->sta_fw_ver & 0xff);
}
struct ethtool_ops prism2_ethtool_ops = {
const struct ethtool_ops prism2_ethtool_ops = {
.get_drvinfo = prism2_get_drvinfo
};

View File

@ -5911,7 +5911,7 @@ static u32 ipw2100_ethtool_get_link(struct net_device *dev)
return (priv->status & STATUS_ASSOCIATED) ? 1 : 0;
}
static struct ethtool_ops ipw2100_ethtool_ops = {
static const struct ethtool_ops ipw2100_ethtool_ops = {
.get_link = ipw2100_ethtool_get_link,
.get_drvinfo = ipw_ethtool_get_drvinfo,
};

Some files were not shown because too many files have changed in this diff Show More