aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bmac.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-22 20:10:23 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-22 20:10:23 -0400
commit28eb177dfa5982d132edceed891cb3885df258bb (patch)
tree5f8fdc37ad1d8d0793e9c47da7d908b97c814ffb /drivers/net/bmac.c
parentfd8ae94eea9bb4269d6dff1b47b9dc741bd70d0b (diff)
parentdb392219c5f572610645696e3672f6ea38783a65 (diff)
Merge branch 'master' into upstream
Conflicts: net/ieee80211/ieee80211_crypt_tkip.c net/ieee80211/ieee80211_crypt_wep.c
Diffstat (limited to 'drivers/net/bmac.c')
-rw-r--r--drivers/net/bmac.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index b0c19292b60d..4adfe7b77031 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) {