Commit 24b84925 authored by Alexander Viro's avatar Alexander Viro Committed by Stephen Hemminger

[wan hdlc] hdlc_open() switched to net_device

Beginning of hdlc fixes.  hdlc_open() switched from hdlc_device to net_device.
parent b4629aeb
......@@ -181,7 +181,7 @@ static int c101_open(struct net_device *dev)
port_t *port = hdlc_to_port(hdlc);
int result;
result = hdlc_open(hdlc);
result = hdlc_open(dev);
if (result)
return result;
......
......@@ -1022,7 +1022,7 @@ static int dscc4_open(struct net_device *dev)
if ((dscc4_loopback_check(dpriv) < 0) || !dev->hard_start_xmit)
goto err;
if ((ret = hdlc_open(hdlc)))
if ((ret = hdlc_open(dev)))
goto err;
ppriv = dpriv->pci_priv;
......
......@@ -1309,7 +1309,7 @@ fst_open ( struct net_device *dev )
{
int err;
err = hdlc_open ( dev_to_hdlc ( dev ));
err = hdlc_open (dev);
if ( err )
return err;
......
......@@ -108,8 +108,9 @@ void hdlc_set_carrier(int on, hdlc_device *hdlc)
/* Must be called by hardware driver when HDLC device is being opened */
int hdlc_open(hdlc_device *hdlc)
int hdlc_open(struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(dev);
#ifdef DEBUG_LINK
printk(KERN_DEBUG "hdlc_open carrier %i open %i\n",
hdlc->carrier, hdlc->open);
......@@ -129,11 +130,11 @@ int hdlc_open(hdlc_device *hdlc)
if (hdlc->carrier) {
if (hdlc->proto.start)
hdlc->proto.start(hdlc);
else if (!netif_carrier_ok(&hdlc->netdev))
netif_carrier_on(&hdlc->netdev);
else if (!netif_carrier_ok(dev))
netif_carrier_on(dev);
} else if (netif_carrier_ok(&hdlc->netdev))
netif_carrier_off(&hdlc->netdev);
} else if (netif_carrier_ok(dev))
netif_carrier_off(dev);
hdlc->open = 1;
......
......@@ -221,7 +221,7 @@ static int n2_open(struct net_device *dev)
u8 mcr = inb(io + N2_MCR) | (port->phy_node ? TX422_PORT1:TX422_PORT0);
int result;
result = hdlc_open(hdlc);
result = hdlc_open(dev);
if (result)
return result;
......
......@@ -3157,7 +3157,7 @@ int cpc_open(struct net_device *dev)
d->if_ptr = &hdlc->state.ppp.pppdev;
}
result = hdlc_open(hdlc);
result = hdlc_open(dev);
if (hdlc->proto.id == IF_PROTO_PPP) {
dev->priv = d;
}
......
......@@ -425,7 +425,7 @@ static int wanxl_open(struct net_device *dev)
printk(KERN_ERR "%s: port already open\n", port_name(port));
return -EIO;
}
if ((i = hdlc_open(hdlc)) != 0)
if ((i = hdlc_open(dev)) != 0)
return i;
port->tx_in = port->tx_out = 0;
......
......@@ -229,7 +229,7 @@ static __inline__ void debug_frame(const struct sk_buff *skb)
/* Must be called by hardware driver when HDLC device is being opened */
int hdlc_open(hdlc_device *hdlc);
int hdlc_open(struct net_device *dev);
/* Must be called by hardware driver when HDLC device is being closed */
void hdlc_close(hdlc_device *hdlc);
/* Called by hardware driver when DCD line level changes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment