diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bmac.c | 13 | ||||
-rw-r--r-- | drivers/net/ibmveth.h | 10 | ||||
-rw-r--r-- | drivers/net/mace.c | 2 | ||||
-rw-r--r-- | drivers/net/spider_net.c | 12 | ||||
-rw-r--r-- | drivers/net/sungem.c | 2 |
5 files changed, 16 insertions, 23 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 6fad83f24c4f..711609665632 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1264,7 +1264,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i | |||
1264 | { | 1264 | { |
1265 | int j, rev, ret; | 1265 | int j, rev, ret; |
1266 | struct bmac_data *bp; | 1266 | struct bmac_data *bp; |
1267 | unsigned char *addr; | 1267 | const unsigned char *prop_addr; |
1268 | unsigned char addr[6]; | ||
1268 | struct net_device *dev; | 1269 | struct net_device *dev; |
1269 | int is_bmac_plus = ((int)match->data) != 0; | 1270 | int is_bmac_plus = ((int)match->data) != 0; |
1270 | 1271 | ||
@@ -1272,14 +1273,16 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i | |||
1272 | printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); | 1273 | printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); |
1273 | return -ENODEV; | 1274 | return -ENODEV; |
1274 | } | 1275 | } |
1275 | addr = get_property(macio_get_of_node(mdev), "mac-address", NULL); | 1276 | prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL); |
1276 | if (addr == NULL) { | 1277 | if (prop_addr == NULL) { |
1277 | addr = get_property(macio_get_of_node(mdev), "local-mac-address", NULL); | 1278 | prop_addr = get_property(macio_get_of_node(mdev), |
1278 | if (addr == NULL) { | 1279 | "local-mac-address", NULL); |
1280 | if (prop_addr == NULL) { | ||
1279 | printk(KERN_ERR "BMAC: Can't get mac-address\n"); | 1281 | printk(KERN_ERR "BMAC: Can't get mac-address\n"); |
1280 | return -ENODEV; | 1282 | return -ENODEV; |
1281 | } | 1283 | } |
1282 | } | 1284 | } |
1285 | memcpy(addr, prop_addr, sizeof(addr)); | ||
1283 | 1286 | ||
1284 | dev = alloc_etherdev(PRIV_BYTES); | 1287 | dev = alloc_etherdev(PRIV_BYTES); |
1285 | if (!dev) { | 1288 | if (!dev) { |
diff --git a/drivers/net/ibmveth.h b/drivers/net/ibmveth.h index 8385bf836507..149191cef2f0 100644 --- a/drivers/net/ibmveth.h +++ b/drivers/net/ibmveth.h | |||
@@ -41,16 +41,6 @@ | |||
41 | #define IbmVethMcastRemoveFilter 0x2UL | 41 | #define IbmVethMcastRemoveFilter 0x2UL |
42 | #define IbmVethMcastClearFilterTable 0x3UL | 42 | #define IbmVethMcastClearFilterTable 0x3UL |
43 | 43 | ||
44 | /* hcall numbers */ | ||
45 | #define H_VIO_SIGNAL 0x104 | ||
46 | #define H_REGISTER_LOGICAL_LAN 0x114 | ||
47 | #define H_FREE_LOGICAL_LAN 0x118 | ||
48 | #define H_ADD_LOGICAL_LAN_BUFFER 0x11C | ||
49 | #define H_SEND_LOGICAL_LAN 0x120 | ||
50 | #define H_MULTICAST_CTRL 0x130 | ||
51 | #define H_CHANGE_LOGICAL_LAN_MAC 0x14C | ||
52 | #define H_FREE_LOGICAL_LAN_BUFFER 0x1D4 | ||
53 | |||
54 | /* hcall macros */ | 44 | /* hcall macros */ |
55 | #define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \ | 45 | #define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \ |
56 | plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac) | 46 | plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac) |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 29e4b5aa6ead..5d80e0e6a8e9 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -113,7 +113,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i | |||
113 | struct device_node *mace = macio_get_of_node(mdev); | 113 | struct device_node *mace = macio_get_of_node(mdev); |
114 | struct net_device *dev; | 114 | struct net_device *dev; |
115 | struct mace_data *mp; | 115 | struct mace_data *mp; |
116 | unsigned char *addr; | 116 | const unsigned char *addr; |
117 | int j, rev, rc = -EBUSY; | 117 | int j, rev, rc = -EBUSY; |
118 | 118 | ||
119 | if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) { | 119 | if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) { |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 647f62e9707d..ec1a8e2d458e 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1698,10 +1698,10 @@ spider_net_setup_phy(struct spider_net_card *card) | |||
1698 | */ | 1698 | */ |
1699 | static int | 1699 | static int |
1700 | spider_net_download_firmware(struct spider_net_card *card, | 1700 | spider_net_download_firmware(struct spider_net_card *card, |
1701 | u8 *firmware_ptr) | 1701 | const void *firmware_ptr) |
1702 | { | 1702 | { |
1703 | int sequencer, i; | 1703 | int sequencer, i; |
1704 | u32 *fw_ptr = (u32 *)firmware_ptr; | 1704 | const u32 *fw_ptr = firmware_ptr; |
1705 | 1705 | ||
1706 | /* stop sequencers */ | 1706 | /* stop sequencers */ |
1707 | spider_net_write_reg(card, SPIDER_NET_GSINIT, | 1707 | spider_net_write_reg(card, SPIDER_NET_GSINIT, |
@@ -1758,7 +1758,7 @@ spider_net_init_firmware(struct spider_net_card *card) | |||
1758 | { | 1758 | { |
1759 | struct firmware *firmware = NULL; | 1759 | struct firmware *firmware = NULL; |
1760 | struct device_node *dn; | 1760 | struct device_node *dn; |
1761 | u8 *fw_prop = NULL; | 1761 | const u8 *fw_prop = NULL; |
1762 | int err = -ENOENT; | 1762 | int err = -ENOENT; |
1763 | int fw_size; | 1763 | int fw_size; |
1764 | 1764 | ||
@@ -1784,7 +1784,7 @@ try_host_fw: | |||
1784 | if (!dn) | 1784 | if (!dn) |
1785 | goto out_err; | 1785 | goto out_err; |
1786 | 1786 | ||
1787 | fw_prop = (u8 *)get_property(dn, "firmware", &fw_size); | 1787 | fw_prop = get_property(dn, "firmware", &fw_size); |
1788 | if (!fw_prop) | 1788 | if (!fw_prop) |
1789 | goto out_err; | 1789 | goto out_err; |
1790 | 1790 | ||
@@ -1987,7 +1987,7 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
1987 | struct net_device *netdev = card->netdev; | 1987 | struct net_device *netdev = card->netdev; |
1988 | struct device_node *dn; | 1988 | struct device_node *dn; |
1989 | struct sockaddr addr; | 1989 | struct sockaddr addr; |
1990 | u8 *mac; | 1990 | const u8 *mac; |
1991 | 1991 | ||
1992 | SET_MODULE_OWNER(netdev); | 1992 | SET_MODULE_OWNER(netdev); |
1993 | SET_NETDEV_DEV(netdev, &card->pdev->dev); | 1993 | SET_NETDEV_DEV(netdev, &card->pdev->dev); |
@@ -2017,7 +2017,7 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
2017 | if (!dn) | 2017 | if (!dn) |
2018 | return -EIO; | 2018 | return -EIO; |
2019 | 2019 | ||
2020 | mac = (u8 *)get_property(dn, "local-mac-address", NULL); | 2020 | mac = get_property(dn, "local-mac-address", NULL); |
2021 | if (!mac) | 2021 | if (!mac) |
2022 | return -EIO; | 2022 | return -EIO; |
2023 | memcpy(addr.sa_data, mac, ETH_ALEN); | 2023 | memcpy(addr.sa_data, mac, ETH_ALEN); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index b70bbd748978..d7b1d1882cab 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2896,7 +2896,7 @@ static int __devinit gem_get_device_address(struct gem *gp) | |||
2896 | if (use_idprom) | 2896 | if (use_idprom) |
2897 | memcpy(dev->dev_addr, idprom->id_ethaddr, 6); | 2897 | memcpy(dev->dev_addr, idprom->id_ethaddr, 6); |
2898 | #elif defined(CONFIG_PPC_PMAC) | 2898 | #elif defined(CONFIG_PPC_PMAC) |
2899 | unsigned char *addr; | 2899 | const unsigned char *addr; |
2900 | 2900 | ||
2901 | addr = get_property(gp->of_node, "local-mac-address", NULL); | 2901 | addr = get_property(gp->of_node, "local-mac-address", NULL); |
2902 | if (addr == NULL) { | 2902 | if (addr == NULL) { |