| .. | .. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
|---|
| 9 | 9 | * Copyright(c) 2017 Intel Deutschland GmbH |
|---|
| 10 | | - * Copyright(c) 2018 Intel Corporation |
|---|
| 10 | + * Copyright(c) 2018 - 2020 Intel Corporation |
|---|
| 11 | 11 | * |
|---|
| 12 | 12 | * This program is free software; you can redistribute it and/or modify |
|---|
| 13 | 13 | * it under the terms of version 2 of the GNU General Public License as |
|---|
| .. | .. |
|---|
| 29 | 29 | * |
|---|
| 30 | 30 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
|---|
| 31 | 31 | * Copyright(c) 2017 Intel Deutschland GmbH |
|---|
| 32 | | - * Copyright(c) 2018 Intel Corporation |
|---|
| 32 | + * Copyright(c) 2018 - 2020 Intel Corporation |
|---|
| 33 | 33 | * All rights reserved. |
|---|
| 34 | 34 | * |
|---|
| 35 | 35 | * Redistribution and use in source and binary forms, with or without |
|---|
| .. | .. |
|---|
| 66 | 66 | |
|---|
| 67 | 67 | /** |
|---|
| 68 | 68 | * 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 |
|---|
| 70 | 71 | * @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 |
|---|
| 71 | 80 | */ |
|---|
| 72 | 81 | 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), |
|---|
| 75 | 87 | }; |
|---|
| 76 | 88 | |
|---|
| 77 | 89 | /** |
|---|
| .. | .. |
|---|
| 154 | 166 | IWL_TLC_MNG_HT_RATE_MAX = IWL_TLC_MNG_HT_RATE_MCS11, |
|---|
| 155 | 167 | }; |
|---|
| 156 | 168 | |
|---|
| 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 | +}; |
|---|
| 159 | 179 | |
|---|
| 160 | 180 | /** |
|---|
| 161 | 181 | * struct tlc_config_cmd - TLC configuration |
|---|
| .. | .. |
|---|
| 173 | 193 | * @sgi_ch_width_supp: bitmap of SGI support per channel width |
|---|
| 174 | 194 | * use BIT(@enum iwl_tlc_mng_cfg_cw) |
|---|
| 175 | 195 | * @reserved2: reserved |
|---|
| 196 | + * @max_tx_op: max TXOP in uSecs for all AC (BK, BE, VO, VI), |
|---|
| 197 | + * set zero for no limit. |
|---|
| 176 | 198 | */ |
|---|
| 177 | 199 | struct iwl_tlc_config_cmd { |
|---|
| 178 | 200 | u8 sta_id; |
|---|
| .. | .. |
|---|
| 183 | 205 | u8 amsdu; |
|---|
| 184 | 206 | __le16 flags; |
|---|
| 185 | 207 | __le16 non_ht_rates; |
|---|
| 186 | | - __le16 ht_rates[MAX_NSS][2]; |
|---|
| 208 | + __le16 ht_rates[IWL_TLC_NSS_MAX][2]; |
|---|
| 187 | 209 | __le16 max_mpdu_len; |
|---|
| 188 | 210 | 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 */ |
|---|
| 191 | 214 | |
|---|
| 192 | 215 | /** |
|---|
| 193 | 216 | * enum iwl_tlc_update_flags - updated fields |
|---|
| .. | .. |
|---|
| 216 | 239 | __le32 amsdu_size; |
|---|
| 217 | 240 | __le32 amsdu_enabled; |
|---|
| 218 | 241 | } __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; |
|---|
| 279 | 242 | |
|---|
| 280 | 243 | /* |
|---|
| 281 | 244 | * These serve as indexes into |
|---|
| .. | .. |
|---|
| 526 | 489 | #define RATE_MCS_HE_106T_POS 28 |
|---|
| 527 | 490 | #define RATE_MCS_HE_106T_MSK (1 << RATE_MCS_HE_106T_POS) |
|---|
| 528 | 491 | |
|---|
| 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 | + |
|---|
| 529 | 499 | /* Link Quality definitions */ |
|---|
| 530 | 500 | |
|---|
| 531 | 501 | /* # entries in rate scale table to support Tx retries */ |
|---|