Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IRDA]: Remove irlan_eth_send_gratuitous_arp()

Even kernel 2.2.26 (sic) already contains the
#undef CONFIG_IRLAN_SEND_GRATUITOUS_ARP
with the comment "but for some reason the machine crashes if you use DHCP".

Either someone finally looks into this or it's simply time to remove
this dead code.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Adrian Bunk and committed by
David S. Miller
7ef3abd2 99971e70

-44
-1
include/net/irda/irlan_eth.h
··· 29 29 int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb); 30 30 31 31 void irlan_eth_flow_indication( void *instance, void *sap, LOCAL_FLOW flow); 32 - void irlan_eth_send_gratuitous_arp(struct net_device *dev); 33 32 #endif
-10
net/irda/irlan/irlan_common.c
··· 54 54 #include <net/irda/irlan_filter.h> 55 55 56 56 57 - /* 58 - * Send gratuitous ARP when connected to a new AP or not. May be a clever 59 - * thing to do, but for some reason the machine crashes if you use DHCP. So 60 - * lets not use it by default. 61 - */ 62 - #undef CONFIG_IRLAN_SEND_GRATUITOUS_ARP 63 - 64 57 /* extern char sysctl_devname[]; */ 65 58 66 59 /* ··· 386 393 /* Ready to transfer Ethernet frames */ 387 394 netif_start_queue(self->dev); 388 395 self->disconnect_reason = 0; /* Clear reason */ 389 - #ifdef CONFIG_IRLAN_SEND_GRATUITOUS_ARP 390 - irlan_eth_send_gratuitous_arp(&self->dev); 391 - #endif 392 396 wake_up_interruptible(&self->open_wait); 393 397 } 394 398
-33
net/irda/irlan/irlan_eth.c
··· 289 289 } 290 290 291 291 /* 292 - * Function irlan_etc_send_gratuitous_arp (dev) 293 - * 294 - * Send gratuitous ARP to announce that we have changed 295 - * hardware address, so that all peers updates their ARP tables 296 - */ 297 - void irlan_eth_send_gratuitous_arp(struct net_device *dev) 298 - { 299 - #ifdef CONFIG_INET 300 - struct in_device *in_dev; 301 - 302 - /* 303 - * When we get a new MAC address do a gratuitous ARP. This 304 - * is useful if we have changed access points on the same 305 - * subnet. 306 - */ 307 - IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n"); 308 - rcu_read_lock(); 309 - in_dev = __in_dev_get_rcu(dev); 310 - if (in_dev == NULL) 311 - goto out; 312 - if (in_dev->ifa_list) 313 - 314 - arp_send(ARPOP_REQUEST, ETH_P_ARP, 315 - in_dev->ifa_list->ifa_address, 316 - dev, 317 - in_dev->ifa_list->ifa_address, 318 - NULL, dev->dev_addr, NULL); 319 - out: 320 - rcu_read_unlock(); 321 - #endif /* CONFIG_INET */ 322 - } 323 - 324 - /* 325 292 * Function set_multicast_list (dev) 326 293 * 327 294 * Configure the filtering of the device