]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: appletalk: Drop aarp_send_probe_phase1()
author谢致邦 (XIE Zhibang) <Yeking@Red54.com>
Fri, 17 Jan 2025 01:41:40 +0000 (01:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jan 2025 10:08:19 +0000 (10:08 +0000)
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>
net/appletalk/aarp.c

index 9fa0b246902bef97e07349475fe71ca0cacaf85e..05cbb3c227c5cfd3aa7cb2d846fea6b7d3218715 100644 (file)
@@ -432,49 +432,18 @@ static struct atalk_addr *__aarp_proxy_find(struct net_device *dev,
        return a ? sa : NULL;
 }
 
-/*
- * Probe a Phase 1 device or a device that requires its Net:Node to
- * be set via an ioctl.
- */
-static void aarp_send_probe_phase1(struct atalk_iface *iface)
-{
-       struct ifreq atreq;
-       struct sockaddr_at *sa = (struct sockaddr_at *)&atreq.ifr_addr;
-       const struct net_device_ops *ops = iface->dev->netdev_ops;
-
-       sa->sat_addr.s_node = iface->address.s_node;
-       sa->sat_addr.s_net = ntohs(iface->address.s_net);
-
-       /* We pass the Net:Node to the drivers/cards by a Device ioctl. */
-       if (!(ops->ndo_do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) {
-               ops->ndo_do_ioctl(iface->dev, &atreq, SIOCGIFADDR);
-               if (iface->address.s_net != htons(sa->sat_addr.s_net) ||
-                   iface->address.s_node != sa->sat_addr.s_node)
-                       iface->status |= ATIF_PROBE_FAIL;
-
-               iface->address.s_net  = htons(sa->sat_addr.s_net);
-               iface->address.s_node = sa->sat_addr.s_node;
-       }
-}
-
-
 void aarp_probe_network(struct atalk_iface *atif)
 {
-       if (atif->dev->type == ARPHRD_LOCALTLK ||
-           atif->dev->type == ARPHRD_PPP)
-               aarp_send_probe_phase1(atif);
-       else {
-               unsigned int count;
+       unsigned int count;
 
-               for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
-                       aarp_send_probe(atif->dev, &atif->address);
+       for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
+               aarp_send_probe(atif->dev, &atif->address);
 
-                       /* Defer 1/10th */
-                       msleep(100);
+               /* Defer 1/10th */
+               msleep(100);
 
-                       if (atif->status & ATIF_PROBE_FAIL)
-                               break;
-               }
+               if (atif->status & ATIF_PROBE_FAIL)
+                       break;
        }
 }