forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/intel/iwlwifi/fw/api/phy-ctxt.h
....@@ -5,9 +5,9 @@
55 *
66 * GPL LICENSE SUMMARY
77 *
8
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
98 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
109 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
10
+ * Copyright(c) 2012 - 2014, 2018, 2020 Intel Corporation
1111 *
1212 * This program is free software; you can redistribute it and/or modify
1313 * it under the terms of version 2 of the GNU General Public License as
....@@ -27,9 +27,9 @@
2727 *
2828 * BSD LICENSE
2929 *
30
- * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
3130 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
3231 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
32
+ * Copyright(c) 2012 - 2014, 2018, 2020 Intel Corporation
3333 * All rights reserved.
3434 *
3535 * Redistribution and use in source and binary forms, with or without
....@@ -95,17 +95,36 @@
9595 #define PHY_VHT_CTRL_POS_4_ABOVE (0x7)
9696
9797 /*
98
+ * struct iwl_fw_channel_info_v1 - channel information
99
+ *
98100 * @band: PHY_BAND_*
99101 * @channel: channel number
100102 * @width: PHY_[VHT|LEGACY]_CHANNEL_*
101103 * @ctrl channel: PHY_[VHT|LEGACY]_CTRL_*
102104 */
103
-struct iwl_fw_channel_info {
105
+struct iwl_fw_channel_info_v1 {
104106 u8 band;
105107 u8 channel;
106108 u8 width;
107109 u8 ctrl_pos;
108
-} __packed;
110
+} __packed; /* CHANNEL_CONFIG_API_S_VER_1 */
111
+
112
+/*
113
+ * struct iwl_fw_channel_info - channel information
114
+ *
115
+ * @channel: channel number
116
+ * @band: PHY_BAND_*
117
+ * @width: PHY_[VHT|LEGACY]_CHANNEL_*
118
+ * @ctrl channel: PHY_[VHT|LEGACY]_CTRL_*
119
+ * @reserved: for future use and alignment
120
+ */
121
+struct iwl_fw_channel_info {
122
+ __le32 channel;
123
+ u8 band;
124
+ u8 width;
125
+ u8 ctrl_pos;
126
+ u8 reserved;
127
+} __packed; /*CHANNEL_CONFIG_API_S_VER_2 */
109128
110129 #define PHY_RX_CHAIN_DRIVER_FORCE_POS (0)
111130 #define PHY_RX_CHAIN_DRIVER_FORCE_MSK \
....@@ -134,6 +153,22 @@
134153
135154 /* TODO: complete missing documentation */
136155 /**
156
+ * struct iwl_phy_context_cmd_tail - tail of iwl_phy_ctx_cmd for alignment with
157
+ * various channel structures.
158
+ *
159
+ * @txchain_info: ???
160
+ * @rxchain_info: ???
161
+ * @acquisition_data: ???
162
+ * @dsp_cfg_flags: set to 0
163
+ */
164
+struct iwl_phy_context_cmd_tail {
165
+ __le32 txchain_info;
166
+ __le32 rxchain_info;
167
+ __le32 acquisition_data;
168
+ __le32 dsp_cfg_flags;
169
+} __packed;
170
+
171
+/**
137172 * struct iwl_phy_context_cmd - config of the PHY context
138173 * ( PHY_CONTEXT_CMD = 0x8 )
139174 * @id_and_color: ID and color of the relevant Binding
....@@ -142,23 +177,39 @@
142177 * other value means apply new params after X usecs
143178 * @tx_param_color: ???
144179 * @ci: channel info
145
- * @txchain_info: ???
180
+ * @tail: command tail
181
+ */
182
+struct iwl_phy_context_cmd_v1 {
183
+ /* COMMON_INDEX_HDR_API_S_VER_1 */
184
+ __le32 id_and_color;
185
+ __le32 action;
186
+ /* PHY_CONTEXT_DATA_API_S_VER_3 */
187
+ __le32 apply_time;
188
+ __le32 tx_param_color;
189
+ struct iwl_fw_channel_info ci;
190
+ struct iwl_phy_context_cmd_tail tail;
191
+} __packed; /* PHY_CONTEXT_CMD_API_VER_1 */
192
+
193
+/**
194
+ * struct iwl_phy_context_cmd - config of the PHY context
195
+ * ( PHY_CONTEXT_CMD = 0x8 )
196
+ * @id_and_color: ID and color of the relevant Binding
197
+ * @action: action to perform, one of FW_CTXT_ACTION_*
198
+ * @lmac_id: the lmac id the phy context belongs to
199
+ * @ci: channel info
146200 * @rxchain_info: ???
147
- * @acquisition_data: ???
148201 * @dsp_cfg_flags: set to 0
202
+ * @reserved: reserved to align to 64 bit
149203 */
150204 struct iwl_phy_context_cmd {
151205 /* COMMON_INDEX_HDR_API_S_VER_1 */
152206 __le32 id_and_color;
153207 __le32 action;
154
- /* PHY_CONTEXT_DATA_API_S_VER_1 */
155
- __le32 apply_time;
156
- __le32 tx_param_color;
208
+ /* PHY_CONTEXT_DATA_API_S_VER_3 */
157209 struct iwl_fw_channel_info ci;
158
- __le32 txchain_info;
210
+ __le32 lmac_id;
159211 __le32 rxchain_info;
160
- __le32 acquisition_data;
161212 __le32 dsp_cfg_flags;
162
-} __packed; /* PHY_CONTEXT_CMD_API_VER_1 */
163
-
213
+ __le32 reserved;
214
+} __packed; /* PHY_CONTEXT_CMD_API_VER_3 */
164215 #endif /* __iwl_fw_api_phy_ctxt_h__ */