hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intel/iwlwifi/fw/api/binding.h
....@@ -5,7 +5,7 @@
55 *
66 * GPL LICENSE SUMMARY
77 *
8
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
8
+ * Copyright(c) 2012 - 2014, 2020 Intel Corporation. All rights reserved.
99 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
1010 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
1111 *
....@@ -27,7 +27,7 @@
2727 *
2828 * BSD LICENSE
2929 *
30
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
30
+ * Copyright(c) 2012 - 2014, 2020 Intel Corporation. All rights reserved.
3131 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
3232 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
3333 * All rights reserved.
....@@ -59,9 +59,11 @@
5959 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6060 *
6161 *****************************************************************************/
62
-
6362 #ifndef __iwl_fw_api_binding_h__
6463 #define __iwl_fw_api_binding_h__
64
+
65
+#include <fw/file.h>
66
+#include <fw/img.h>
6567
6668 #define MAX_MACS_IN_BINDING (3)
6769 #define MAX_BINDINGS (4)
....@@ -112,6 +114,14 @@
112114 #define IWL_LMAC_24G_INDEX 0
113115 #define IWL_LMAC_5G_INDEX 1
114116
117
+static inline u32 iwl_mvm_get_lmac_id(const struct iwl_fw *fw,
118
+ enum nl80211_band band){
119
+ if (!fw_has_capa(&fw->ucode_capa, IWL_UCODE_TLV_CAPA_CDB_SUPPORT) ||
120
+ band == NL80211_BAND_2GHZ)
121
+ return IWL_LMAC_24G_INDEX;
122
+ return IWL_LMAC_5G_INDEX;
123
+}
124
+
115125 /* The maximal number of fragments in the FW's schedule session */
116126 #define IWL_MVM_MAX_QUOTA 128
117127