ns83820.c (41966710ab574f1fcedf3e10e1ceef911c096d1d) | ns83820.c (68aad78c5023b8aa82da99b47f9d8cf40e8ca453) |
---|---|
1#define VERSION "0.23" 2/* ns83820.c by Benjamin LaHaise with contributions. 3 * 4 * Questions/comments/discussion to linux-ns83820@kvack.org. 5 * 6 * $Revision: 1.34.2.23 $ 7 * 8 * Copyright 2001 Benjamin LaHaise. --- 1350 unchanged lines hidden (view full) --- 1359 1360 return 0; 1361} 1362/* end ethtool get/set support -df */ 1363 1364static void ns83820_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *info) 1365{ 1366 struct ns83820 *dev = PRIV(ndev); | 1#define VERSION "0.23" 2/* ns83820.c by Benjamin LaHaise with contributions. 3 * 4 * Questions/comments/discussion to linux-ns83820@kvack.org. 5 * 6 * $Revision: 1.34.2.23 $ 7 * 8 * Copyright 2001 Benjamin LaHaise. --- 1350 unchanged lines hidden (view full) --- 1359 1360 return 0; 1361} 1362/* end ethtool get/set support -df */ 1363 1364static void ns83820_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *info) 1365{ 1366 struct ns83820 *dev = PRIV(ndev); |
1367 strcpy(info->driver, "ns83820"); 1368 strcpy(info->version, VERSION); 1369 strcpy(info->bus_info, pci_name(dev->pci_dev)); | 1367 strlcpy(info->driver, "ns83820", sizeof(info->driver)); 1368 strlcpy(info->version, VERSION, sizeof(info->version)); 1369 strlcpy(info->bus_info, pci_name(dev->pci_dev), sizeof(info->bus_info)); |
1370} 1371 1372static u32 ns83820_get_link(struct net_device *ndev) 1373{ 1374 struct ns83820 *dev = PRIV(ndev); 1375 u32 cfg = readl(dev->base + CFG) ^ SPDSTS_POLARITY; 1376 return cfg & CFG_LNKSTS ? 1 : 0; 1377} --- 934 unchanged lines hidden --- | 1370} 1371 1372static u32 ns83820_get_link(struct net_device *ndev) 1373{ 1374 struct ns83820 *dev = PRIV(ndev); 1375 u32 cfg = readl(dev->base + CFG) ^ SPDSTS_POLARITY; 1376 return cfg & CFG_LNKSTS ? 1 : 0; 1377} --- 934 unchanged lines hidden --- |