OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [net/] [ethernet/] [pe2.c] - Blame information for rev 1629

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1629 jcastillo
#include <linux/netdevice.h>
2
#include <linux/skbuff.h>
3
#include <net/datalink.h>
4
#include <linux/mm.h>
5
#include <linux/in.h>
6
 
7
static void
8
pEII_datalink_header(struct datalink_proto *dl,
9
                struct sk_buff *skb, unsigned char *dest_node)
10
{
11
        struct device   *dev = skb->dev;
12
 
13
        skb->protocol = htons (ETH_P_IPX);
14
        dev->hard_header(skb, dev, ETH_P_IPX, dest_node, NULL, skb->len);
15
}
16
 
17
struct datalink_proto *
18
make_EII_client(void)
19
{
20
        struct datalink_proto   *proto;
21
 
22
        proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC);
23
        if (proto != NULL) {
24
                proto->type_len = 0;
25
                proto->header_length = 0;
26
                proto->datalink_header = pEII_datalink_header;
27
                proto->string_name = "EtherII";
28
        }
29
 
30
        return proto;
31
}
32
 
33
void destroy_EII_client(struct datalink_proto *dl)
34
{
35
        if (dl)
36
                kfree_s(dl, sizeof(struct datalink_proto));
37
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.