ia64/linux-2.6.18-xen.hg

view net/802/p8022.c @ 871:9cbcc9008446

xen/x86: don't initialize cpu_data[]'s apicid field on generic code

Afaict, this is not only redundant with the intialization done in
drivers/xen/core/smpboot.c, but actually results - at least for
secondary CPUs - in the Xen-specific value written to be later
overwritten with whatever the generic code determines (with no
guarantee that the two values are identical).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 14 10:09:15 2009 +0100 (2009-05-14)
parents 831230e53067
children
line source
1 /*
2 * NET3: Support for 802.2 demultiplexing off Ethernet (Token ring
3 * is kept separate see p8022tr.c)
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Demultiplex 802.2 encoded protocols. We match the entry by the
10 * SSAP/DSAP pair and then deliver to the registered datalink that
11 * matches. The control byte is ignored and handling of such items
12 * is up to the routine passed the frame.
13 *
14 * Unlike the 802.3 datalink we have a list of 802.2 entries as
15 * there are multiple protocols to demux. The list is currently
16 * short (3 or 4 entries at most). The current demux assumes this.
17 */
18 #include <linux/module.h>
19 #include <linux/netdevice.h>
20 #include <linux/skbuff.h>
21 #include <net/datalink.h>
22 #include <linux/mm.h>
23 #include <linux/in.h>
24 #include <linux/init.h>
25 #include <net/llc.h>
26 #include <net/p8022.h>
28 static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
29 unsigned char *dest)
30 {
31 llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
32 return 0;
33 }
35 struct datalink_proto *register_8022_client(unsigned char type,
36 int (*func)(struct sk_buff *skb,
37 struct net_device *dev,
38 struct packet_type *pt,
39 struct net_device *orig_dev))
40 {
41 struct datalink_proto *proto;
43 proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
44 if (proto) {
45 proto->type[0] = type;
46 proto->header_length = 3;
47 proto->request = p8022_request;
48 proto->sap = llc_sap_open(type, func);
49 if (!proto->sap) {
50 kfree(proto);
51 proto = NULL;
52 }
53 }
54 return proto;
55 }
57 void unregister_8022_client(struct datalink_proto *proto)
58 {
59 llc_sap_put(proto->sap);
60 kfree(proto);
61 }
63 EXPORT_SYMBOL(register_8022_client);
64 EXPORT_SYMBOL(unregister_8022_client);
66 MODULE_LICENSE("GPL");