aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWANG Cong <amwang@redhat.com>2011-06-19 19:13:01 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-19 19:13:01 -0400
commitcefa9993f161c1c2b6b91b7ea2e84a9bfbd43d2e (patch)
treeea1a587dd6a87e2c8c5ea84855ca068484fecdf5
parent9aa3c94ce59066f545521033007abb6441706068 (diff)
netpoll: copy dev name of slaves to struct netpoll
Otherwise we will not see the name of the slave dev in error message: [ 388.469446] (null): doesn't support polling, aborting. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_main.c1
-rw-r--r--net/bridge/br_device.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 652b30e525d..eafe44a528a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1297,6 +1297,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
1297 goto out; 1297 goto out;
1298 1298
1299 np->dev = slave->dev; 1299 np->dev = slave->dev;
1300 strlcpy(np->dev_name, slave->dev->name, IFNAMSIZ);
1300 err = __netpoll_setup(np); 1301 err = __netpoll_setup(np);
1301 if (err) { 1302 if (err) {
1302 kfree(np); 1303 kfree(np);
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index a6b2f86378c..c188c803c09 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -243,6 +243,7 @@ int br_netpoll_enable(struct net_bridge_port *p)
243 goto out; 243 goto out;
244 244
245 np->dev = p->dev; 245 np->dev = p->dev;
246 strlcpy(np->dev_name, p->dev->name, IFNAMSIZ);
246 247
247 err = __netpoll_setup(np); 248 err = __netpoll_setup(np);
248 if (err) { 249 if (err) {