aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-08-19 13:21:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:02:26 -0400
commit20dedd3faa8785937df45e8518f3930be7110d96 (patch)
tree792e761e9cfb7606ca99734e9ab855509b6273b0
parent37628606661a8a1d3abfa5bb898426a38fa62b73 (diff)
Staging: et131x: power state
This is assigned once to ndis d0, and then never changes so it is a constant and we can zap it Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/et131x/et1310_pm.h10
-rw-r--r--drivers/staging/et131x/et1310_rx.c2
-rw-r--r--drivers/staging/et131x/et131x_initpci.c2
-rw-r--r--drivers/staging/et131x/et131x_isr.c3
4 files changed, 1 insertions, 16 deletions
diff --git a/drivers/staging/et131x/et1310_pm.h b/drivers/staging/et131x/et1310_pm.h
index dca9977f59a2..8e06039537e0 100644
--- a/drivers/staging/et131x/et1310_pm.h
+++ b/drivers/staging/et131x/et1310_pm.h
@@ -66,15 +66,6 @@
66#define NUM_WOL_PATTERNS 0x5 66#define NUM_WOL_PATTERNS 0x5
67#define CRC16_POLY 0x1021 67#define CRC16_POLY 0x1021
68 68
69/* Definition of NDIS_DEVICE_POWER_STATE */
70typedef enum {
71 NdisDeviceStateUnspecified = 0,
72 NdisDeviceStateD0,
73 NdisDeviceStateD1,
74 NdisDeviceStateD2,
75 NdisDeviceStateD3
76} NDIS_DEVICE_POWER_STATE;
77
78typedef struct _MP_POWER_MGMT { 69typedef struct _MP_POWER_MGMT {
79 /* variable putting the phy into coma mode when boot up with no cable 70 /* variable putting the phy into coma mode when boot up with no cable
80 * plugged in after 5 seconds 71 * plugged in after 5 seconds
@@ -97,7 +88,6 @@ typedef struct _MP_POWER_MGMT {
97 } IPAddress; 88 } IPAddress;
98 89
99 /* Current Power state of the adapter. */ 90 /* Current Power state of the adapter. */
100 NDIS_DEVICE_POWER_STATE PowerState;
101 bool WOLState; 91 bool WOLState;
102 bool WOLEnabled; 92 bool WOLEnabled;
103 bool Failed10Half; 93 bool Failed10Half;
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index 9dc08fb4bf27..b05b8c50d072 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -1235,13 +1235,11 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)
1235 break; 1235 break;
1236 1236
1237 /* Do not receive any packets until a filter has been set. 1237 /* Do not receive any packets until a filter has been set.
1238 * Do not receive any packets until we are at D0.
1239 * Do not receive any packets until we have link. 1238 * Do not receive any packets until we have link.
1240 * If length is zero, return the RFD in order to advance the 1239 * If length is zero, return the RFD in order to advance the
1241 * Free buffer ring. 1240 * Free buffer ring.
1242 */ 1241 */
1243 if ((!etdev->PacketFilter) || 1242 if ((!etdev->PacketFilter) ||
1244 (etdev->PoMgmt.PowerState != NdisDeviceStateD0) ||
1245 (!MP_LINK_DETECTED(etdev)) || 1243 (!MP_LINK_DETECTED(etdev)) ||
1246 (pMpRfd->PacketSize == 0)) { 1244 (pMpRfd->PacketSize == 0)) {
1247 continue; 1245 continue;
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index b9018e6f5660..d84b6546160f 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -967,8 +967,6 @@ int __devinit et131x_pci_setup(struct pci_dev *pdev,
967 DBG_TRACE(et131x_dbginfo, "Init send data structures...\n"); 967 DBG_TRACE(et131x_dbginfo, "Init send data structures...\n");
968 et131x_init_send(adapter); 968 et131x_init_send(adapter);
969 969
970 adapter->PoMgmt.PowerState = NdisDeviceStateD0;
971
972 /* Register the interrupt 970 /* Register the interrupt
973 * 971 *
974 * NOTE - This is being done in the open routine, where most other 972 * NOTE - This is being done in the open routine, where most other
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index 9f51425512c5..f9687b344159 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -479,6 +479,5 @@ void et131x_isr_handler(struct work_struct *work)
479 } 479 }
480 } 480 }
481 481
482 if (etdev->PoMgmt.PowerState == NdisDeviceStateD0) 482 et131x_enable_interrupts(etdev);
483 et131x_enable_interrupts(etdev);
484} 483}