hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
....@@ -7,7 +7,7 @@
77 *
88 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
99 * Copyright(c) 2017 Intel Deutschland GmbH
10
- * Copyright(c) 2018 Intel Corporation
10
+ * Copyright(c) 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
....@@ -29,7 +29,7 @@
2929 *
3030 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
3131 * Copyright(c) 2017 Intel Deutschland GmbH
32
- * Copyright(c) 2018 Intel Corporation
32
+ * Copyright(c) 2018 - 2020 Intel Corporation
3333 * All rights reserved.
3434 *
3535 * Redistribution and use in source and binary forms, with or without
....@@ -66,12 +66,24 @@
6666
6767 /**
6868 * enum iwl_tlc_mng_cfg_flags_enum - options for TLC config flags
69
- * @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC
69
+ * @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC. For HE this enables STBC for
70
+ * bandwidths <= 80MHz
7071 * @IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK: enable LDPC
72
+ * @IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK: enable STBC in HE at 160MHz
73
+ * bandwidth
74
+ * @IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_1_MSK: enable HE Dual Carrier Modulation
75
+ * for BPSK (MCS 0) with 1 spatial
76
+ * stream
77
+ * @IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_2_MSK: enable HE Dual Carrier Modulation
78
+ * for BPSK (MCS 0) with 2 spatial
79
+ * streams
7180 */
7281 enum iwl_tlc_mng_cfg_flags {
73
- IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
74
- IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK = BIT(1),
82
+ IWL_TLC_MNG_CFG_FLAGS_STBC_MSK = BIT(0),
83
+ IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK = BIT(1),
84
+ IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK = BIT(2),
85
+ IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_1_MSK = BIT(3),
86
+ IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_2_MSK = BIT(4),
7587 };
7688
7789 /**
....@@ -154,8 +166,16 @@
154166 IWL_TLC_MNG_HT_RATE_MAX = IWL_TLC_MNG_HT_RATE_MCS11,
155167 };
156168
157
-/* Maximum supported tx antennas number */
158
-#define MAX_NSS 2
169
+enum IWL_TLC_MNG_NSS {
170
+ IWL_TLC_NSS_1,
171
+ IWL_TLC_NSS_2,
172
+ IWL_TLC_NSS_MAX
173
+};
174
+
175
+enum IWL_TLC_HT_BW_RATES {
176
+ IWL_TLC_HT_BW_NONE_160,
177
+ IWL_TLC_HT_BW_160,
178
+};
159179
160180 /**
161181 * struct tlc_config_cmd - TLC configuration
....@@ -173,6 +193,8 @@
173193 * @sgi_ch_width_supp: bitmap of SGI support per channel width
174194 * use BIT(@enum iwl_tlc_mng_cfg_cw)
175195 * @reserved2: reserved
196
+ * @max_tx_op: max TXOP in uSecs for all AC (BK, BE, VO, VI),
197
+ * set zero for no limit.
176198 */
177199 struct iwl_tlc_config_cmd {
178200 u8 sta_id;
....@@ -183,11 +205,12 @@
183205 u8 amsdu;
184206 __le16 flags;
185207 __le16 non_ht_rates;
186
- __le16 ht_rates[MAX_NSS][2];
208
+ __le16 ht_rates[IWL_TLC_NSS_MAX][2];
187209 __le16 max_mpdu_len;
188210 u8 sgi_ch_width_supp;
189
- u8 reserved2[1];
190
-} __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_2 */
211
+ u8 reserved2;
212
+ __le32 max_tx_op;
213
+} __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_3 */
191214
192215 /**
193216 * enum iwl_tlc_update_flags - updated fields
....@@ -216,66 +239,6 @@
216239 __le32 amsdu_size;
217240 __le32 amsdu_enabled;
218241 } __packed; /* TLC_MNG_UPDATE_NTFY_API_S_VER_2 */
219
-
220
-/**
221
- * enum iwl_tlc_debug_flags - debug options
222
- * @IWL_TLC_DEBUG_FIXED_RATE: set fixed rate for rate scaling
223
- * @IWL_TLC_DEBUG_STATS_TH: threshold for sending statistics to the driver, in
224
- * frames
225
- * @IWL_TLC_DEBUG_STATS_TIME_TH: threshold for sending statistics to the
226
- * driver, in msec
227
- * @IWL_TLC_DEBUG_AGG_TIME_LIM: time limit for a BA session
228
- * @IWL_TLC_DEBUG_AGG_DIS_START_TH: frame with try-count greater than this
229
- * threshold should not start an aggregation session
230
- * @IWL_TLC_DEBUG_AGG_FRAME_CNT_LIM: set max number of frames in an aggregation
231
- * @IWL_TLC_DEBUG_RENEW_ADDBA_DELAY: delay between retries of ADD BA
232
- * @IWL_TLC_DEBUG_START_AC_RATE_IDX: frames per second to start a BA session
233
- * @IWL_TLC_DEBUG_NO_FAR_RANGE_TWEAK: disable BW scaling
234
- */
235
-enum iwl_tlc_debug_flags {
236
- IWL_TLC_DEBUG_FIXED_RATE,
237
- IWL_TLC_DEBUG_STATS_TH,
238
- IWL_TLC_DEBUG_STATS_TIME_TH,
239
- IWL_TLC_DEBUG_AGG_TIME_LIM,
240
- IWL_TLC_DEBUG_AGG_DIS_START_TH,
241
- IWL_TLC_DEBUG_AGG_FRAME_CNT_LIM,
242
- IWL_TLC_DEBUG_RENEW_ADDBA_DELAY,
243
- IWL_TLC_DEBUG_START_AC_RATE_IDX,
244
- IWL_TLC_DEBUG_NO_FAR_RANGE_TWEAK,
245
-}; /* TLC_MNG_DEBUG_FLAGS_API_E_VER_1 */
246
-
247
-/**
248
- * struct iwl_dhc_tlc_dbg - fixed debug config
249
- * @sta_id: bit 0 - enable/disable, bits 1 - 7 hold station id
250
- * @reserved1: reserved
251
- * @flags: bitmap of %IWL_TLC_DEBUG_\*
252
- * @fixed_rate: rate value
253
- * @stats_threshold: if number of tx-ed frames is greater, send statistics
254
- * @time_threshold: statistics threshold in usec
255
- * @agg_time_lim: max agg time
256
- * @agg_dis_start_threshold: frames with try-cont greater than this count will
257
- * not be aggregated
258
- * @agg_frame_count_lim: agg size
259
- * @addba_retry_delay: delay between retries of ADD BA
260
- * @start_ac_rate_idx: frames per second to start a BA session
261
- * @no_far_range_tweak: disable BW scaling
262
- * @reserved2: reserved
263
- */
264
-struct iwl_dhc_tlc_cmd {
265
- u8 sta_id;
266
- u8 reserved1[3];
267
- __le32 flags;
268
- __le32 fixed_rate;
269
- __le16 stats_threshold;
270
- __le16 time_threshold;
271
- __le16 agg_time_lim;
272
- __le16 agg_dis_start_threshold;
273
- __le16 agg_frame_count_lim;
274
- __le16 addba_retry_delay;
275
- u8 start_ac_rate_idx[IEEE80211_NUM_ACS];
276
- u8 no_far_range_tweak;
277
- u8 reserved2[3];
278
-} __packed;
279242
280243 /*
281244 * These serve as indexes into
....@@ -526,6 +489,13 @@
526489 #define RATE_MCS_HE_106T_POS 28
527490 #define RATE_MCS_HE_106T_MSK (1 << RATE_MCS_HE_106T_POS)
528491
492
+/* Bit 30-31: (1) RTS, (2) CTS */
493
+#define RATE_MCS_RTS_REQUIRED_POS (30)
494
+#define RATE_MCS_RTS_REQUIRED_MSK (0x1 << RATE_MCS_RTS_REQUIRED_POS)
495
+
496
+#define RATE_MCS_CTS_REQUIRED_POS (31)
497
+#define RATE_MCS_CTS_REQUIRED_MSK (0x1 << RATE_MCS_CTS_REQUIRED_POS)
498
+
529499 /* Link Quality definitions */
530500
531501 /* # entries in rate scale table to support Tx retries */