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

Configure Feed

Select the types of activity you want to include in your feed.

net: appletalk: Drop aarp_send_probe_phase1()

aarp_send_probe_phase1() used to work by calling ndo_do_ioctl of
appletalk drivers ltpc or cops, but these two drivers have been removed
since the following commits:
commit 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC
support")
commit 00f3696f7555 ("net: appletalk: remove cops support")

Thus aarp_send_probe_phase1() no longer works, so drop it. (found by
code inspection)

Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

谢致邦 (XIE Zhibang) and committed by
David S. Miller
45bd1c5b 544c9394

+7 -38
+7 -38
net/appletalk/aarp.c
··· 432 432 return a ? sa : NULL; 433 433 } 434 434 435 - /* 436 - * Probe a Phase 1 device or a device that requires its Net:Node to 437 - * be set via an ioctl. 438 - */ 439 - static void aarp_send_probe_phase1(struct atalk_iface *iface) 440 - { 441 - struct ifreq atreq; 442 - struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr; 443 - const struct net_device_ops *ops = iface->dev->netdev_ops; 444 - 445 - sa->sat_addr.s_node = iface->address.s_node; 446 - sa->sat_addr.s_net = ntohs(iface->address.s_net); 447 - 448 - /* We pass the Net:Node to the drivers/cards by a Device ioctl. */ 449 - if (!(ops->ndo_do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) { 450 - ops->ndo_do_ioctl(iface->dev, &atreq, SIOCGIFADDR); 451 - if (iface->address.s_net != htons(sa->sat_addr.s_net) || 452 - iface->address.s_node != sa->sat_addr.s_node) 453 - iface->status |= ATIF_PROBE_FAIL; 454 - 455 - iface->address.s_net = htons(sa->sat_addr.s_net); 456 - iface->address.s_node = sa->sat_addr.s_node; 457 - } 458 - } 459 - 460 - 461 435 void aarp_probe_network(struct atalk_iface *atif) 462 436 { 463 - if (atif->dev->type == ARPHRD_LOCALTLK || 464 - atif->dev->type == ARPHRD_PPP) 465 - aarp_send_probe_phase1(atif); 466 - else { 467 - unsigned int count; 437 + unsigned int count; 468 438 469 - for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) { 470 - aarp_send_probe(atif->dev, &atif->address); 439 + for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) { 440 + aarp_send_probe(atif->dev, &atif->address); 471 441 472 - /* Defer 1/10th */ 473 - msleep(100); 442 + /* Defer 1/10th */ 443 + msleep(100); 474 444 475 - if (atif->status & ATIF_PROBE_FAIL) 476 - break; 477 - } 445 + if (atif->status & ATIF_PROBE_FAIL) 446 + break; 478 447 } 479 448 } 480 449