diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-05-26 11:59:49 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-05-26 11:59:49 +0000 |
commit | ed869086426ef05efe3b32de62f4383558ff79df (patch) | |
tree | 80dff43e808f7a5657bda70e62bfbd520e8438c6 /sys/dev/pci/if_iwxreg.h | |
parent | 5963db95285e7962c6dd4e7a4f17303aa90a7891 (diff) |
Implement support for the iwx(4) SOC_CONFIGURATION command.
This command doesn't seem to be needed with the ax200 device we currently
support. But it does not hurt and will be needed for other devices this
driver intends to support in the future.
ok mpi@
Diffstat (limited to 'sys/dev/pci/if_iwxreg.h')
-rw-r--r-- | sys/dev/pci/if_iwxreg.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwxreg.h b/sys/dev/pci/if_iwxreg.h index 9713622c83a..305adc568db 100644 --- a/sys/dev/pci/if_iwxreg.h +++ b/sys/dev/pci/if_iwxreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwxreg.h,v 1.5 2020/05/26 11:55:54 stsp Exp $ */ +/* $OpenBSD: if_iwxreg.h,v 1.6 2020/05/26 11:59:48 stsp Exp $ */ /*- * Based on BSD-licensed source modules in the Linux iwlwifi driver, @@ -1866,6 +1866,31 @@ struct iwx_alive_resp_v4 { struct iwx_umac_alive umac_data; } __packed; /* ALIVE_RES_API_S_VER_4 */ +#define IWX_SOC_CONFIG_CMD_FLAGS_DISCRETE (1 << 0) +#define IWX_SOC_CONFIG_CMD_FLAGS_LOW_LATENCY (1 << 1) + +#define IWX_SOC_FLAGS_LTR_APPLY_DELAY_MASK 0xc +#define IWX_SOC_FLAGS_LTR_APPLY_DELAY_NONE 0 +#define IWX_SOC_FLAGS_LTR_APPLY_DELAY_200 1 +#define IWX_SOC_FLAGS_LTR_APPLY_DELAY_2500 2 +#define IWX_SOC_FLAGS_LTR_APPLY_DELAY_1820 3 + +/** + * struct iwx_soc_configuration_cmd - Set device stabilization latency + * + * @flags: soc settings flags. In VER_1, we can only set the DISCRETE + * flag, because the FW treats the whole value as an integer. In + * VER_2, we can set the bits independently. + * @latency: time for SOC to ensure stable power & XTAL + */ +struct iwx_soc_configuration_cmd { + uint32_t flags; + uint32_t latency; +} __packed; /* + * SOC_CONFIGURATION_CMD_S_VER_1 (see description above) + * SOC_CONFIGURATION_CMD_S_VER_2 + */ + /** * commands driver may send before finishing init flow * @IWX_INIT_DEBUG_CFG: driver is going to send debug config command |