X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Frose%2Faf_rose.c;h=55564efccf1153fc051df3e8b9b26a7d515fa32c;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=08a542855654fb8981717faeb9a73ab52d3531b7;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 08a542855..55564efcc 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -10,6 +10,7 @@ * Copyright (C) Tomi Manninen OH2BNS (oh2bns@sral.fi) */ +#include #include #include #include @@ -66,14 +67,6 @@ static struct proto_ops rose_proto_ops; ax25_address rose_callsign; -/* - * ROSE network devices are virtual network devices encapsulating ROSE - * frames into AX.25 which will be sent through an AX.25 device, so form a - * special "super class" of normal net devices; split their locks off into a - * separate class since they always nest. - */ -static struct lock_class_key rose_netdev_xmit_lock_key; - /* * Convert a ROSE address into text. */ @@ -760,7 +753,7 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le rose_insert_socket(sk); /* Finish the bind */ } -rose_try_next_neigh: + rose->dest_addr = addr->srose_addr; rose->dest_call = addr->srose_call; rose->rand = ((long)rose & 0xFFFF) + rose->lci; @@ -818,11 +811,6 @@ rose_try_next_neigh: } if (sk->sk_state != TCP_ESTABLISHED) { - /* Try next neighbour */ - rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic); - if (rose->neighbour) - goto rose_try_next_neigh; - /* No more neighbour */ sock->state = SS_UNCONNECTED; return sock_error(sk); /* Always set at this point */ } @@ -1498,13 +1486,14 @@ static int __init rose_proto_init(void) rose_callsign = null_ax25_address; - dev_rose = kzalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); + dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); if (dev_rose == NULL) { printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); rc = -ENOMEM; goto out_proto_unregister; } + memset(dev_rose, 0x00, rose_ndevs * sizeof(struct net_device*)); for (i = 0; i < rose_ndevs; i++) { struct net_device *dev; char name[IFNAMSIZ]; @@ -1523,7 +1512,6 @@ static int __init rose_proto_init(void) free_netdev(dev); goto fail; } - lockdep_set_class(&dev->_xmit_lock, &rose_netdev_xmit_lock_key); dev_rose[i] = dev; }