hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h
....@@ -8,7 +8,7 @@
88 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
99 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
1010 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
11
- * Copyright (C) 2018 Intel Corporation
11
+ * Copyright(C) 2018 - 2020 Intel Corporation
1212 *
1313 * This program is free software; you can redistribute it and/or modify
1414 * it under the terms of version 2 of the GNU General Public License as
....@@ -31,7 +31,7 @@
3131 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
3232 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
3333 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
34
- * Copyright (C) 2018 Intel Corporation
34
+ * Copyright(C) 2018 - 2020 Intel Corporation
3535 * All rights reserved.
3636 *
3737 * Redistribution and use in source and binary forms, with or without
....@@ -75,11 +75,26 @@
7575 NVM_ACCESS_COMPLETE = 0x0,
7676
7777 /**
78
+ * @LARI_CONFIG_CHANGE: &struct iwl_lari_config_change_cmd
79
+ */
80
+ LARI_CONFIG_CHANGE = 0x1,
81
+
82
+ /**
7883 * @NVM_GET_INFO:
7984 * Command is &struct iwl_nvm_get_info,
8085 * response is &struct iwl_nvm_get_info_rsp
8186 */
8287 NVM_GET_INFO = 0x2,
88
+
89
+ /**
90
+ * @TAS_CONFIG: &struct iwl_tas_config_cmd
91
+ */
92
+ TAS_CONFIG = 0x3,
93
+
94
+ /**
95
+ * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy
96
+ */
97
+ PNVM_INIT_COMPLETE_NTFY = 0xFE,
8398 };
8499
85100 /**
....@@ -233,7 +248,8 @@
233248 __le32 rx_chains;
234249 } __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */
235250
236
-#define IWL_NUM_CHANNELS (51)
251
+#define IWL_NUM_CHANNELS_V1 51
252
+#define IWL_NUM_CHANNELS 110
237253
238254 /**
239255 * struct iwl_nvm_get_info_regulatory - regulatory information
....@@ -241,11 +257,37 @@
241257 * @channel_profile: regulatory data of this channel
242258 * @reserved: reserved
243259 */
244
-struct iwl_nvm_get_info_regulatory {
260
+struct iwl_nvm_get_info_regulatory_v1 {
245261 __le32 lar_enabled;
246
- __le16 channel_profile[IWL_NUM_CHANNELS];
262
+ __le16 channel_profile[IWL_NUM_CHANNELS_V1];
247263 __le16 reserved;
248264 } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */
265
+
266
+/**
267
+ * struct iwl_nvm_get_info_regulatory - regulatory information
268
+ * @lar_enabled: is LAR enabled
269
+ * @n_channels: number of valid channels in the array
270
+ * @channel_profile: regulatory data of this channel
271
+ */
272
+struct iwl_nvm_get_info_regulatory {
273
+ __le32 lar_enabled;
274
+ __le32 n_channels;
275
+ __le32 channel_profile[IWL_NUM_CHANNELS];
276
+} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */
277
+
278
+/**
279
+ * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data
280
+ * @general: general NVM data
281
+ * @mac_sku: data relating to MAC sku
282
+ * @phy_sku: data relating to PHY sku
283
+ * @regulatory: regulatory data
284
+ */
285
+struct iwl_nvm_get_info_rsp_v3 {
286
+ struct iwl_nvm_get_info_general general;
287
+ struct iwl_nvm_get_info_sku mac_sku;
288
+ struct iwl_nvm_get_info_phy phy_sku;
289
+ struct iwl_nvm_get_info_regulatory_v1 regulatory;
290
+} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */
249291
250292 /**
251293 * struct iwl_nvm_get_info_rsp - response to get NVM data
....@@ -259,7 +301,7 @@
259301 struct iwl_nvm_get_info_sku mac_sku;
260302 struct iwl_nvm_get_info_phy phy_sku;
261303 struct iwl_nvm_get_info_regulatory regulatory;
262
-} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */
304
+} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4 */
263305
264306 /**
265307 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed
....@@ -268,22 +310,6 @@
268310 struct iwl_nvm_access_complete_cmd {
269311 __le32 reserved;
270312 } __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */
271
-
272
-/**
273
- * struct iwl_mcc_update_cmd_v1 - Request the device to update geographic
274
- * regulatory profile according to the given MCC (Mobile Country Code).
275
- * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
276
- * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
277
- * MCC in the cmd response will be the relevant MCC in the NVM.
278
- * @mcc: given mobile country code
279
- * @source_id: the source from where we got the MCC, see iwl_mcc_source
280
- * @reserved: reserved for alignment
281
- */
282
-struct iwl_mcc_update_cmd_v1 {
283
- __le16 mcc;
284
- u8 source_id;
285
- u8 reserved;
286
-} __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_1 */
287313
288314 /**
289315 * struct iwl_mcc_update_cmd - Request the device to update geographic
....@@ -306,29 +332,6 @@
306332 } __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */
307333
308334 /**
309
- * struct iwl_mcc_update_resp_v1 - response to MCC_UPDATE_CMD.
310
- * Contains the new channel control profile map, if changed, and the new MCC
311
- * (mobile country code).
312
- * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
313
- * @status: see &enum iwl_mcc_update_status
314
- * @mcc: the new applied MCC
315
- * @cap: capabilities for all channels which matches the MCC
316
- * @source_id: the MCC source, see iwl_mcc_source
317
- * @n_channels: number of channels in @channels_data (may be 14, 39, 50 or 51
318
- * channels, depending on platform)
319
- * @channels: channel control data map, DWORD for each channel. Only the first
320
- * 16bits are used.
321
- */
322
-struct iwl_mcc_update_resp_v1 {
323
- __le32 status;
324
- __le16 mcc;
325
- u8 cap;
326
- u8 source_id;
327
- __le32 n_channels;
328
- __le32 channels[0];
329
-} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_1 */
330
-
331
-/**
332335 * enum iwl_geo_information - geographic information.
333336 * @GEO_NO_INFO: no special info for this geo profile.
334337 * @GEO_WMM_ETSI_5GHZ_INFO: this geo profile limits the WMM params
....@@ -340,7 +343,7 @@
340343 };
341344
342345 /**
343
- * struct iwl_mcc_update_resp - response to MCC_UPDATE_CMD.
346
+ * struct iwl_mcc_update_resp_v3 - response to MCC_UPDATE_CMD.
344347 * Contains the new channel control profile map, if changed, and the new MCC
345348 * (mobile country code).
346349 * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
....@@ -348,15 +351,14 @@
348351 * @mcc: the new applied MCC
349352 * @cap: capabilities for all channels which matches the MCC
350353 * @source_id: the MCC source, see iwl_mcc_source
351
- * @time: time elapsed from the MCC test start (in 30 seconds TU)
354
+ * @time: time elapsed from the MCC test start (in units of 30 seconds)
352355 * @geo_info: geographic specific profile information
353356 * see &enum iwl_geo_information.
354
- * @n_channels: number of channels in @channels_data (may be 14, 39, 50 or 51
355
- * channels, depending on platform)
357
+ * @n_channels: number of channels in @channels_data.
356358 * @channels: channel control data map, DWORD for each channel. Only the first
357359 * 16bits are used.
358360 */
359
-struct iwl_mcc_update_resp {
361
+struct iwl_mcc_update_resp_v3 {
360362 __le32 status;
361363 __le16 mcc;
362364 u8 cap;
....@@ -364,8 +366,37 @@
364366 __le16 time;
365367 __le16 geo_info;
366368 __le32 n_channels;
367
- __le32 channels[0];
369
+ __le32 channels[];
368370 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */
371
+
372
+/**
373
+ * struct iwl_mcc_update_resp - response to MCC_UPDATE_CMD.
374
+ * Contains the new channel control profile map, if changed, and the new MCC
375
+ * (mobile country code).
376
+ * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
377
+ * @status: see &enum iwl_mcc_update_status
378
+ * @mcc: the new applied MCC
379
+ * @cap: capabilities for all channels which matches the MCC
380
+ * @time: time elapsed from the MCC test start (in units of 30 seconds)
381
+ * @geo_info: geographic specific profile information
382
+ * see &enum iwl_geo_information.
383
+ * @source_id: the MCC source, see iwl_mcc_source
384
+ * @reserved: for four bytes alignment.
385
+ * @n_channels: number of channels in @channels_data.
386
+ * @channels: channel control data map, DWORD for each channel. Only the first
387
+ * 16bits are used.
388
+ */
389
+struct iwl_mcc_update_resp {
390
+ __le32 status;
391
+ __le16 mcc;
392
+ __le16 cap;
393
+ __le16 time;
394
+ __le16 geo_info;
395
+ u8 source_id;
396
+ u8 reserved[3];
397
+ __le32 n_channels;
398
+ __le32 channels[];
399
+} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */
369400
370401 /**
371402 * struct iwl_mcc_chub_notif - chub notifies of mcc change
....@@ -415,4 +446,47 @@
415446 MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,
416447 };
417448
449
+#define IWL_TAS_BLACK_LIST_MAX 16
450
+/**
451
+ * struct iwl_tas_config_cmd - configures the TAS
452
+ * @block_list_size: size of relevant field in block_list_array
453
+ * @block_list_array: block list countries (without TAS)
454
+ */
455
+struct iwl_tas_config_cmd {
456
+ __le32 block_list_size;
457
+ __le32 block_list_array[IWL_TAS_BLACK_LIST_MAX];
458
+} __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */
459
+
460
+/**
461
+ * enum iwl_lari_configs - bit masks for the various LARI config operations
462
+ * @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine
463
+ * @LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK: ETSI 5.8GHz SRD passive scan
464
+ * @LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK: ETSI 5.8GHz SRD disabled
465
+ * @LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK: enable 5.15/5.35GHz bands in
466
+ * Indonesia
467
+ */
468
+enum iwl_lari_config_masks {
469
+ LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK = BIT(0),
470
+ LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK = BIT(1),
471
+ LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK = BIT(2),
472
+ LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK = BIT(3),
473
+};
474
+
475
+/**
476
+ * struct iwl_lari_config_change_cmd - change LARI configuration
477
+ * @config_bitmap: bit map of the config commands. each bit will trigger a
478
+ * different predefined FW config operation
479
+ */
480
+struct iwl_lari_config_change_cmd {
481
+ __le32 config_bitmap;
482
+} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_1 */
483
+
484
+/**
485
+ * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete
486
+ * @status: PNVM image loading status
487
+ */
488
+struct iwl_pnvm_init_complete_ntfy {
489
+ __le32 status;
490
+} __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */
491
+
418492 #endif /* __iwl_fw_api_nvm_reg_h__ */