2.1.56 patchlet that fixes appletalk module support

a sun (asun@zoology.washington.edu)
Sat, 20 Sep 1997 17:21:56 -0700 (PDT)


the appearance of SIOCDIFADDR can result in some confusion w/
appletalk. following is a patch that converts the appletalk-specific
DIFADDR to the generic one. it also moves MOD_DEC_USE_COUNT to the
correct place. in addition, i've tacked on my tweak to the dummy
driver that makes hw multicast an option.

oh yeah, i'm not sure if atalk.h will patch correctly as i had to
re-create it.

--- linux/include/linux/atalk.h.save Sat Sep 20 17:10:53 1997
+++ linux/include/linux/atalk.h Sat Sep 20 17:08:13 1997
@@ -18,8 +18,6 @@
#define DDP_MAXSZ 587
#define DDP_MAXHOPS 15 /* 4 bits of hop counter */

-#define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0)
-
struct at_addr
{
__u16 s_net;
--- linux/net/appletalk/ddp.c.save Sat Sep 20 16:51:19 1997
+++ linux/net/appletalk/ddp.c Sat Sep 20 17:08:48 1997
@@ -268,12 +268,12 @@
*iface = tmp->next;
kfree_s(tmp, sizeof(struct atalk_iface));
dev->atalk_ptr=NULL;
+ MOD_DEC_USE_COUNT;
}
else
iface = &tmp->next;
}

- MOD_DEC_USE_COUNT;
}

static struct atalk_iface *atif_add_device(struct device *dev, struct at_addr *sa)
@@ -819,7 +819,7 @@
((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr.s_node=ATADDR_BCAST;
break;

- case SIOCATALKDIFADDR:
+ case SIOCDIFADDR:
if(!suser())
return (-EPERM);
if(sa->sat_family != AF_APPLETALK)
@@ -1820,7 +1820,7 @@
case SIOCGIFADDR:
case SIOCSIFADDR:
case SIOCGIFBRDADDR:
- case SIOCATALKDIFADDR:
+ case SIOCDIFADDR:
return (atif_ioctl(cmd,(void *)arg));

/*
@@ -2015,7 +2015,6 @@
while(ifaces != NULL)
{
tmp = ifaces->next;
- ifaces->dev->atalk_ptr = NULL;
atalk_iface_down(ifaces);
ifaces = tmp;
}
--- linux/drivers/net/dummy.c.save Sat Sep 13 16:13:20 1997
+++ linux/drivers/net/dummy.c Sat Sep 13 16:13:25 1997
@@ -68,11 +68,14 @@
return 0;
}

-/* fake multicast ability */
+/* fake multicast ability if multicast != 0. */
+static int multicast = 1;
+MODULE_PARM(multicast, "i");
static void set_multicast_list(struct device *dev)
{
}

+
__initfunc(int dummy_init(struct device *dev))
{
/* Initialize the device structure. */
@@ -86,7 +89,8 @@

dev->open = dummy_open;
dev->stop = dummy_close;
- dev->set_multicast_list = set_multicast_list;
+ if (multicast)
+ dev->set_multicast_list = set_multicast_list;

/* Fill in the fields of the device structure with ethernet-generic values. */
ether_setup(dev);

------- End of forwarded message -------