Browse Source

Enable/disable interrupts in driver open/close.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
71f500ff1b
1 changed files with 8 additions and 3 deletions
  1. 8
    3
      src/drivers/net/legacy.c

+ 8
- 3
src/drivers/net/legacy.c View File

@@ -57,12 +57,17 @@ static void legacy_poll ( struct net_device *netdev, unsigned int rx_quota ) {
57 57
 	}
58 58
 }
59 59
 
60
-static int legacy_open ( struct net_device *netdev __unused ) {
60
+static int legacy_open ( struct net_device *netdev ) {
61
+	struct nic *nic = netdev->priv;
62
+
63
+	nic->nic_op->irq ( nic, ENABLE );
61 64
 	return 0;
62 65
 }
63 66
 
64
-static void legacy_close ( struct net_device *netdev __unused ) {
65
-	/* Nothing to do */
67
+static void legacy_close ( struct net_device *netdev ) {
68
+	struct nic *nic = netdev->priv;
69
+
70
+	nic->nic_op->irq ( nic, DISABLE );
66 71
 }
67 72
 
68 73
 int legacy_probe ( void *hwdev,

Loading…
Cancel
Save