Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135424
b: refs/heads/master
c: d9b06c4
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent e6f456c commit 83030c1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49e8abaf62dc6403f11313e8fefbc0f5e7a9f50f
refs/heads/master: d9b06c47a9eddef7d8829f6763bdf601c435c6f2
41 changes: 21 additions & 20 deletions trunk/drivers/net/wan/cycx_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,6 @@ static int cycx_wan_update(struct wan_device *wandev)
return 0;
}

/* callback to initialize device */
static void cycx_x25_chan_setup(struct net_device *dev)
{
dev->init = cycx_netdevice_init;
}

/* Create new logical channel.
* This routine is called by the router when ROUTER_IFNEW IOCTL is being
* handled.
Expand Down Expand Up @@ -476,6 +470,27 @@ static const struct header_ops cycx_header_ops = {
.rebuild = cycx_netdevice_rebuild_header,
};

static const struct net_device_ops cycx_netdev_ops = {
.ndo_init = cycx_netdevice_init,
.ndo_open = cycx_netdevice_open,
.ndo_stop = cycx_netdevice_stop,
.ndo_start_xmit = cycx_netdevice_hard_start_xmit,
.ndo_get_stats = cycx_netdevice_get_stats,
};

static void cycx_x25_chan_setup(struct net_device *dev)
{
/* Initialize device driver entry points */
dev->netdev_ops = &cycx_netdev_ops;
dev->header_ops = &cycx_header_ops;

/* Initialize media-specific parameters */
dev->mtu = CYCX_X25_CHAN_MTU;
dev->type = ARPHRD_HWX25; /* ARP h/w type */
dev->hard_header_len = 0; /* media header length */
dev->addr_len = 0; /* hardware address length */
}

/* Initialize Linux network interface.
*
* This routine is called only once for each interface, during Linux network
Expand All @@ -487,20 +502,6 @@ static int cycx_netdevice_init(struct net_device *dev)
struct cycx_device *card = chan->card;
struct wan_device *wandev = &card->wandev;

/* Initialize device driver entry points */
dev->open = cycx_netdevice_open;
dev->stop = cycx_netdevice_stop;
dev->header_ops = &cycx_header_ops;

dev->hard_start_xmit = cycx_netdevice_hard_start_xmit;
dev->get_stats = cycx_netdevice_get_stats;

/* Initialize media-specific parameters */
dev->mtu = CYCX_X25_CHAN_MTU;
dev->type = ARPHRD_HWX25; /* ARP h/w type */
dev->hard_header_len = 0; /* media header length */
dev->addr_len = 0; /* hardware address length */

if (!chan->svc)
*(__be16*)dev->dev_addr = htons(chan->lcn);

Expand Down

0 comments on commit 83030c1

Please sign in to comment.