Commit d5dc249c authored by Alexander Viro's avatar Alexander Viro Committed by Stephen Hemminger

[wan hdlc] hdlc_close() switched to net_device.

parent 24b84925
...@@ -212,7 +212,7 @@ static int c101_close(struct net_device *dev) ...@@ -212,7 +212,7 @@ static int c101_close(struct net_device *dev)
sca_close(hdlc); sca_close(hdlc);
writeb(0, port->win0base + C101_DTR); writeb(0, port->win0base + C101_DTR);
sca_out(CTL_NORTS, MSCI1_OFFSET + CTL, port); sca_out(CTL_NORTS, MSCI1_OFFSET + CTL, port);
hdlc_close(hdlc); hdlc_close(dev);
return 0; return 0;
} }
......
...@@ -1015,7 +1015,6 @@ static void dscc4_pci_reset(struct pci_dev *pdev, unsigned long ioaddr) ...@@ -1015,7 +1015,6 @@ static void dscc4_pci_reset(struct pci_dev *pdev, unsigned long ioaddr)
static int dscc4_open(struct net_device *dev) static int dscc4_open(struct net_device *dev)
{ {
struct dscc4_dev_priv *dpriv = dscc4_priv(dev); struct dscc4_dev_priv *dpriv = dscc4_priv(dev);
hdlc_device *hdlc = &dpriv->hdlc;
struct dscc4_pci_priv *ppriv; struct dscc4_pci_priv *ppriv;
int ret = -EAGAIN; int ret = -EAGAIN;
...@@ -1103,7 +1102,7 @@ static int dscc4_open(struct net_device *dev) ...@@ -1103,7 +1102,7 @@ static int dscc4_open(struct net_device *dev)
scc_writel(0xffffffff, dpriv, dev, IMR); scc_writel(0xffffffff, dpriv, dev, IMR);
scc_patchl(PowerUp | Vis, 0, dpriv, dev, CCR0); scc_patchl(PowerUp | Vis, 0, dpriv, dev, CCR0);
err_out: err_out:
hdlc_close(hdlc); hdlc_close(dev);
err: err:
return ret; return ret;
} }
...@@ -1155,7 +1154,6 @@ static int dscc4_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1155,7 +1154,6 @@ static int dscc4_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int dscc4_close(struct net_device *dev) static int dscc4_close(struct net_device *dev)
{ {
struct dscc4_dev_priv *dpriv = dscc4_priv(dev); struct dscc4_dev_priv *dpriv = dscc4_priv(dev);
hdlc_device *hdlc = dev_to_hdlc(dev);
del_timer_sync(&dpriv->timer); del_timer_sync(&dpriv->timer);
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -1166,7 +1164,7 @@ static int dscc4_close(struct net_device *dev) ...@@ -1166,7 +1164,7 @@ static int dscc4_close(struct net_device *dev)
dpriv->flags |= FakeReset; dpriv->flags |= FakeReset;
hdlc_close(hdlc); hdlc_close(dev);
return 0; return 0;
} }
......
...@@ -1325,7 +1325,7 @@ fst_close ( struct net_device *dev ) ...@@ -1325,7 +1325,7 @@ fst_close ( struct net_device *dev )
{ {
netif_stop_queue ( dev ); netif_stop_queue ( dev );
fst_closeport ( dev_to_port ( dev )); fst_closeport ( dev_to_port ( dev ));
hdlc_close ( dev_to_hdlc ( dev )); hdlc_close ( dev );
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -145,8 +145,9 @@ int hdlc_open(struct net_device *dev) ...@@ -145,8 +145,9 @@ int hdlc_open(struct net_device *dev)
/* Must be called by hardware driver when HDLC device is being closed */ /* Must be called by hardware driver when HDLC device is being closed */
void hdlc_close(hdlc_device *hdlc) void hdlc_close(struct net_device *dev)
{ {
hdlc_device *hdlc = dev_to_hdlc(dev);
#ifdef DEBUG_LINK #ifdef DEBUG_LINK
printk(KERN_DEBUG "hdlc_close carrier %i open %i\n", printk(KERN_DEBUG "hdlc_close carrier %i open %i\n",
hdlc->carrier, hdlc->open); hdlc->carrier, hdlc->open);
......
...@@ -247,7 +247,7 @@ static int n2_close(struct net_device *dev) ...@@ -247,7 +247,7 @@ static int n2_close(struct net_device *dev)
sca_close(hdlc); sca_close(hdlc);
mcr |= port->phy_node ? DTR_PORT1 : DTR_PORT0; /* set DTR OFF */ mcr |= port->phy_node ? DTR_PORT1 : DTR_PORT0; /* set DTR OFF */
outb(mcr, io + N2_MCR); outb(mcr, io + N2_MCR);
hdlc_close(hdlc); hdlc_close(dev);
return 0; return 0;
} }
......
...@@ -3190,7 +3190,7 @@ int cpc_close(struct net_device *dev) ...@@ -3190,7 +3190,7 @@ int cpc_close(struct net_device *dev)
cpc_closech(d); cpc_closech(d);
CPC_UNLOCK(card, flags); CPC_UNLOCK(card, flags);
hdlc_close(hdlc); hdlc_close(dev);
if (hdlc->proto.id == IF_PROTO_PPP) { if (hdlc->proto.id == IF_PROTO_PPP) {
d->if_ptr = NULL; d->if_ptr = NULL;
} }
......
...@@ -455,7 +455,7 @@ static int wanxl_close(struct net_device *dev) ...@@ -455,7 +455,7 @@ static int wanxl_close(struct net_device *dev)
unsigned long timeout; unsigned long timeout;
int i; int i;
hdlc_close(hdlc); hdlc_close(dev);
/* signal the card */ /* signal the card */
writel(1 << (DOORBELL_TO_CARD_CLOSE_0 + port->node), writel(1 << (DOORBELL_TO_CARD_CLOSE_0 + port->node),
port->card->plx + PLX_DOORBELL_TO_CARD); port->card->plx + PLX_DOORBELL_TO_CARD);
......
...@@ -231,7 +231,7 @@ static __inline__ void debug_frame(const struct sk_buff *skb) ...@@ -231,7 +231,7 @@ static __inline__ void debug_frame(const struct sk_buff *skb)
/* Must be called by hardware driver when HDLC device is being opened */ /* Must be called by hardware driver when HDLC device is being opened */
int hdlc_open(struct net_device *dev); int hdlc_open(struct net_device *dev);
/* Must be called by hardware driver when HDLC device is being closed */ /* Must be called by hardware driver when HDLC device is being closed */
void hdlc_close(hdlc_device *hdlc); void hdlc_close(struct net_device *dev);
/* Called by hardware driver when DCD line level changes */ /* Called by hardware driver when DCD line level changes */
void hdlc_set_carrier(int on, hdlc_device *hdlc); void hdlc_set_carrier(int on, hdlc_device *hdlc);
......
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