git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
drivers
/
net
/
ibmveth.c
diff --git
a/drivers/net/ibmveth.c
b/drivers/net/ibmveth.c
index
c3836f6
..
4e4e876
100644
(file)
--- a/
drivers/net/ibmveth.c
+++ b/
drivers/net/ibmveth.c
@@
-55,7
+55,6
@@
#include <asm/iommu.h>
#include <asm/vio.h>
#include <asm/uaccess.h>
#include <asm/iommu.h>
#include <asm/vio.h>
#include <asm/uaccess.h>
-#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include "ibmveth.h"
#include <linux/seq_file.h>
#include "ibmveth.h"
@@
-874,14
+873,14
@@
static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
struct net_device *netdev;
struct ibmveth_adapter *adapter;
struct net_device *netdev;
struct ibmveth_adapter *adapter;
- unsigned
int
*mac_addr_p;
+ unsigned
char
*mac_addr_p;
unsigned int *mcastFilterSize_p;
ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n",
dev->unit_address);
unsigned int *mcastFilterSize_p;
ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n",
dev->unit_address);
- mac_addr_p = (unsigned
int
*) vio_get_attribute(dev, VETH_MAC_ADDR, 0);
+ mac_addr_p = (unsigned
char
*) vio_get_attribute(dev, VETH_MAC_ADDR, 0);
if(!mac_addr_p) {
ibmveth_error_printk("Can't find VETH_MAC_ADDR attribute\n");
return 0;
if(!mac_addr_p) {
ibmveth_error_printk("Can't find VETH_MAC_ADDR attribute\n");
return 0;
@@
-916,8
+915,8
@@
static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
The RPA doc specifies that the first byte must be 10b, so
we'll just look for it to solve this 8 vs. 6 byte field issue */
The RPA doc specifies that the first byte must be 10b, so
we'll just look for it to solve this 8 vs. 6 byte field issue */
-
while (*((char*)mac_addr_p) != (char)(0x02)
)
-
((char*)mac_addr_p)++
;
+
if ((*mac_addr_p & 0x3) != 0x02
)
+
mac_addr_p += 2
;
adapter->mac_addr = 0;
memcpy(&adapter->mac_addr, mac_addr_p, 6);
adapter->mac_addr = 0;
memcpy(&adapter->mac_addr, mac_addr_p, 6);
@@
-935,6
+934,7
@@
static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
netdev->do_ioctl = ibmveth_ioctl;
netdev->ethtool_ops = &netdev_ethtool_ops;
netdev->change_mtu = ibmveth_change_mtu;
netdev->do_ioctl = ibmveth_ioctl;
netdev->ethtool_ops = &netdev_ethtool_ops;
netdev->change_mtu = ibmveth_change_mtu;
+ SET_NETDEV_DEV(netdev, &dev->dev);
memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);