Skip to content

Commit 45bd1c5

Browse files
Red54davem330
authored andcommitted
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 03dcb90 ("net: appletalk: remove Apple/Farallon LocalTalk PC support") commit 00f3696 ("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) <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 544c939 commit 45bd1c5

File tree

1 file changed

+7
-38
lines changed

1 file changed

+7
-38
lines changed

net/appletalk/aarp.c

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -432,49 +432,18 @@ static struct atalk_addr *__aarp_proxy_find(struct net_device *dev,
432432
return a ? sa : NULL;
433433
}
434434

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-
461435
void aarp_probe_network(struct atalk_iface *atif)
462436
{
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;
468438

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);
471441

472-
/* Defer 1/10th */
473-
msleep(100);
442+
/* Defer 1/10th */
443+
msleep(100);
474444

475-
if (atif->status & ATIF_PROBE_FAIL)
476-
break;
477-
}
445+
if (atif->status & ATIF_PROBE_FAIL)
446+
break;
478447
}
479448
}
480449

0 commit comments

Comments
 (0)