patch-2.3.47 linux/drivers/net/3c505.c
Next file: linux/drivers/net/3c507.c
Previous file: linux/drivers/isdn/isdn_net.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Thu Feb 17 09:18:47 2000
- Orig file:
v2.3.46/linux/drivers/net/3c505.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.46/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -361,7 +361,8 @@
static inline void prime_rx(struct net_device *dev)
{
elp_device *adapter = dev->priv;
- while (adapter->rx_active < ELP_RX_PCBS && test_bit(LINK_STATE_START, &dev->state)) {
+ while (adapter->rx_active < ELP_RX_PCBS &&
+ netif_running(dev->state)) {
if (!start_receive(dev, &adapter->itx_pcb))
break;
}
@@ -722,7 +723,7 @@
case 0xff:
case CMD_RECEIVE_PACKET_COMPLETE:
/* if the device isn't open, don't pass packets up the stack */
- if (test_bit(LINK_STATE_START, &dev->state) == 0)
+ if (!netif_running(dev))
break;
len = adapter->irx_pcb.data.rcv_resp.pkt_len;
dlen = adapter->irx_pcb.data.rcv_resp.buf_len;
@@ -806,7 +807,7 @@
case CMD_TRANSMIT_PACKET_COMPLETE:
if (elp_debug >= 3)
printk("%s: interrupt - packet sent\n", dev->name);
- if (test_bit(LINK_STATE_START, &dev->state) == 0)
+ if (!netif_running(dev))
break;
switch (adapter->irx_pcb.data.xmit_resp.c_stat) {
case 0xffff:
@@ -1121,7 +1122,7 @@
/* If the device is closed, just return the latest stats we have,
- we cannot ask from the adapter without interrupts */
- if (!test_bit(LINK_STATE_START, &dev->state))
+ if (!netif_running(dev))
return &adapter->stats;
/* send a get statistics command to the board */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)