summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/fw
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2019-11-06 09:27:51 +0200
committerLuca Coelho <luciano.coelho@intel.com>2020-03-27 08:12:49 +0200
commit095650c0541e1898751a25073f1a57cfd309f7eb (patch)
treeeb69e20d184492a514abb56ee541a34f4ee736d4 /drivers/net/wireless/intel/iwlwifi/fw
parent6815e3d0bbee886dfd13bba485066ff830ed7f14 (diff)
iwlwifi: add support for version 2 of SOC_CONFIGURATION_CMD
This new command is mostly backwards compatible, with the exception that the device_type element was changed into a bitmask. The device type bit remains the same (because we only had 0 and 1 anyway), but when using v1 we can't set any other bits, because that would change the integer. Other than that, the struct remains the same and the driver can set the device_type bit in both cases, but it can only set the low_latency bit if VER_2 is used. Change-Id: Ib68d4c821ebcce253b42ed0ea15881fb4e3e01da Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/api/soc.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h b/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h
index 5d1fb98fe667..aadca78e9846 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/soc.h
@@ -8,6 +8,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
+ * Copyright(c) 2019 Intel Deutschland GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
@@ -30,6 +31,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
+ * Copyright(c) 2019 Intel Deutschland GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,21 +65,23 @@
#ifndef __iwl_fw_api_soc_h__
#define __iwl_fw_api_soc_h__
-/* type of devices for defining SOC latency */
-enum iwl_soc_device_types {
- SOC_CONFIG_CMD_INTEGRATED = 0x0,
- SOC_CONFIG_CMD_DISCRETE = 0x1,
-};
+#define SOC_CONFIG_CMD_FLAGS_DISCRETE BIT(0)
+#define SOC_CONFIG_CMD_FLAGS_LOW_LATENCY BIT(1)
/**
* struct iwl_soc_configuration_cmd - Set device stabilization latency
*
- * @device_type: the device type as defined in &enum iwl_soc_device_types
- * @soc_latency: time for SOC to ensure stable power & XTAL
+ * @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 iwl_soc_configuration_cmd {
- __le32 device_type;
- __le32 soc_latency;
-} __packed; /* SOC_CONFIGURATION_CMD_S_VER_1 */
+ __le32 flags;
+ __le32 latency;
+} __packed; /*
+ * SOC_CONFIGURATION_CMD_S_VER_1 (see description above)
+ * SOC_CONFIGURATION_CMD_S_VER_2
+ */
#endif /* __iwl_fw_api_soc_h__ */