summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-12-10 20:34:42 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-12-10 20:34:42 +0000
commit9c51a8199235f1ec3e4c528faeca5d8b3cfefe1a (patch)
tree888564533d3dd7bcd45f85ebee9c004d5107e7c6 /sys/dev/pci/if_iwm.c
parent555ebacf3850fe530e78a3a781d864e6264ffc8e (diff)
Stop running iwm(4) devices in "continuous active mode (CAM)".
Instead, enable device-level power saving which apparently allows Tx/Rx RF circuitry to be switched off while inactive to save some power. Turns out CAM is meant for debugging purposes, not normal operation. NB: This has nothing to do with 802.11 power saving. Tested by myself and phessler. There is no visible behaviour change. ok deraadt@ phessler@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index ead82d7da64..0ce72d2698f 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.221 2017/12/08 21:16:01 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.222 2017/12/10 20:34:41 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -4498,11 +4498,7 @@ iwm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in,
keep_alive = roundup(keep_alive, 1000) / 1000;
cmd->keep_alive_seconds = htole16(keep_alive);
-#ifdef notyet
cmd->flags = htole16(IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK);
- cmd->rx_data_timeout = IWM_DEFAULT_PS_RX_DATA_TIMEOUT;
- cmd->tx_data_timeout = IWM_DEFAULT_PS_TX_DATA_TIMEOUT;
-#endif
}
int
@@ -4530,16 +4526,12 @@ int
iwm_power_update_device(struct iwm_softc *sc)
{
struct iwm_device_power_cmd cmd = {
-#ifdef notyet
.flags = htole16(IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK),
-#endif
};
if (!(sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_DEVICE_PS_CMD))
return 0;
- cmd.flags |= htole16(IWM_DEVICE_POWER_FLAGS_CAM_MSK);
-
return iwm_send_cmd_pdu(sc,
IWM_POWER_TABLE_CMD, 0, sizeof(cmd), &cmd);
}