git: if_iwm - Add basic powermanagement support via ifconfig wlan0 powersave.

Imre Vadasz ivadasz at
Sun Oct 9 08:24:07 PDT 2016

commit d7002a7990d077c92585978ea998474af50f91e0
Author: Imre Vadász <imre at>
Date:   Sat Jul 23 15:54:50 2016 +0200

    if_iwm - Add basic powermanagement support via ifconfig wlan0 powersave.
    * The DEVICE_POWER_FLAGS_CAM_MSK flag was removed in the upstream iwlwifi
      in Linux commit ceef91c89480dd18bb3ac51e91280a233d0ca41f.
    * Add sc_ps_disabled flag to struct iwm_softc, which corresponds to
      mvm->ps_disabled in struct iwl_mvm in Linux iwlwifi.
    * Adds a hw.iwm.power_scheme tunable which corresponds to the power_scheme
      module parameter in Linux iwlwifi. Set this to 1 for completely
      disabling power management, 2 (default) for balanced powermanagement,
      and 3 for lowerpower mode (which does dtim period skipping).
    * Imports the constants.h file from iwlwifi as if_iwm_constants.h.
    * This doesn't allow changing the powermanagement setting while connected,
      also one can only choose between enabled and disabled powersaving with
      ifconfig (so switching between balanced and low-power mode requires
      rebooting to change the tunable).
    * After any changes to powermanagement (i.e. "ifconfig wlan0 powersave" to
      enable powermanagement, or "ifconfig wlan0 -powersave" for disabling
      powermanagement), one has to disconnect and reconnect to the accespoint
      for the change to take effect.
    Taken-From: Linux iwlwifi

Summary of changes:
 share/man/man4/iwm.4                 |   3 +
 sys/dev/netif/iwm/if_iwm.c           |  10 +-
 sys/dev/netif/iwm/if_iwm_constants.h | 151 ++++++++++++++++++++++
 sys/dev/netif/iwm/if_iwm_power.c     | 244 +++++++++++++++++++++++++++--------
 sys/dev/netif/iwm/if_iwm_power.h     |   4 +-
 sys/dev/netif/iwm/if_iwmreg.h        |  18 +--
 sys/dev/netif/iwm/if_iwmvar.h        |   3 +
 7 files changed, 369 insertions(+), 64 deletions(-)
 create mode 100644 sys/dev/netif/iwm/if_iwm_constants.h

DragonFly BSD source repository

More information about the Commits mailing list