Przeglądaj źródła

Enable/disable interrupts in driver open/close.

tags/v0.9.3
Michael Brown 17 lat temu
rodzic
commit
71f500ff1b
1 zmienionych plików z 8 dodań i 3 usunięć
  1. 8
    3
      src/drivers/net/legacy.c

+ 8
- 3
src/drivers/net/legacy.c Wyświetl plik

@@ -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,

Ładowanie…
Anuluj
Zapisz