From: stsp Date: Sun, 10 Dec 2017 20:34:41 +0000 (+0000) Subject: Stop running iwm(4) devices in "continuous active mode (CAM)". X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8dcd978fe0f14652f02968143e856b6bc94a4de2;p=openbsd 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@ --- 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 @@ -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); }