aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/net.c')
-rw-r--r--drivers/firewire/net.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index c2e194c58667..7ed08fd1214e 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -191,6 +191,7 @@ struct fwnet_peer {
191 struct fwnet_device *dev; 191 struct fwnet_device *dev;
192 u64 guid; 192 u64 guid;
193 u64 fifo; 193 u64 fifo;
194 __be32 ip;
194 195
195 /* guarded by dev->lock */ 196 /* guarded by dev->lock */
196 struct list_head pd_list; /* received partial datagrams */ 197 struct list_head pd_list; /* received partial datagrams */
@@ -570,6 +571,8 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
570 peer->speed = sspd; 571 peer->speed = sspd;
571 if (peer->max_payload > max_payload) 572 if (peer->max_payload > max_payload)
572 peer->max_payload = max_payload; 573 peer->max_payload = max_payload;
574
575 peer->ip = arp1394->sip;
573 } 576 }
574 spin_unlock_irqrestore(&dev->lock, flags); 577 spin_unlock_irqrestore(&dev->lock, flags);
575 578
@@ -1470,6 +1473,7 @@ static int fwnet_add_peer(struct fwnet_device *dev,
1470 peer->dev = dev; 1473 peer->dev = dev;
1471 peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; 1474 peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4];
1472 peer->fifo = FWNET_NO_FIFO_ADDR; 1475 peer->fifo = FWNET_NO_FIFO_ADDR;
1476 peer->ip = 0;
1473 INIT_LIST_HEAD(&peer->pd_list); 1477 INIT_LIST_HEAD(&peer->pd_list);
1474 peer->pdg_size = 0; 1478 peer->pdg_size = 0;
1475 peer->datagram_label = 0; 1479 peer->datagram_label = 0;
@@ -1589,10 +1593,13 @@ static int fwnet_remove(struct device *_dev)
1589 1593
1590 mutex_lock(&fwnet_device_mutex); 1594 mutex_lock(&fwnet_device_mutex);
1591 1595
1596 net = dev->netdev;
1597 if (net && peer->ip)
1598 arp_invalidate(net, peer->ip);
1599
1592 fwnet_remove_peer(peer, dev); 1600 fwnet_remove_peer(peer, dev);
1593 1601
1594 if (list_empty(&dev->peer_list)) { 1602 if (list_empty(&dev->peer_list)) {
1595 net = dev->netdev;
1596 unregister_netdev(net); 1603 unregister_netdev(net);
1597 1604
1598 if (dev->local_fifo != FWNET_NO_FIFO_ADDR) 1605 if (dev->local_fifo != FWNET_NO_FIFO_ADDR)