From f244de36c7593eb39af2ef29346783e772cb1242 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 20 Jul 2024 18:01:32 -0700 Subject: [PATCH 01/22] fw-api: CL 27179058 - update fw common interface files Change-Id: Ib9a87bf61aa03c24652f8a41afe26dbf019ecc52 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 5 +++++ fw/wmi_version.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 936cb5a13bd4..6e6e9219ae28 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -40704,6 +40704,11 @@ typedef enum { WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY, WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU, WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU, + /* MLD_EXTRA_PARTIAL_SCAN: + * FW triggers extra partial scan when all ml links are not found + * during first partial scan. + */ + WMI_ROAM_TRIGGER_SUB_REASON_MLD_EXTRA_PARTIAL_SCAN, } WMI_ROAM_TRIGGER_SUB_REASON_ID; typedef enum wmi_roam_invoke_status_error { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 656d21d73472..2c096cd6ed2f 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1505 +#define __WMI_REVISION_ 1506 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 722c5c2814df929d4985daedde94ce246562b41a Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 20 Jul 2024 18:02:53 -0700 Subject: [PATCH 02/22] fw-api: CL 27193005 - update fw common interface files Change-Id: I1bc83e1341b9ff1b2603b0c9bf1dd50068ec1d8e CRs-Fixed: 3830439 --- fw/wmi_unified.h | 5 +++++ fw/wmi_version.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 6e6e9219ae28..70d4437d0ac3 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -25849,6 +25849,11 @@ typedef enum */ WMI_VENDOR_OUI_ACTION_FORCE_MLSR = 14, + /* + * Disable AUX learning and AUX listen if OUI matches + */ + WMI_VENDOR_OUI_ACTION_DISABLE_AUXL = 15, + /* Add any action before this line */ WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 2c096cd6ed2f..49c3526fec13 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1506 +#define __WMI_REVISION_ 1507 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From be6329d2c60c1dc43c8f0d4e2540a18ef290c675 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 20 Jul 2024 18:04:18 -0700 Subject: [PATCH 03/22] fw-api: CL 27205261 - update fw common interface files Change-Id: Ibf2704bf0766ac8b9875ea4373b21936cc2769d2 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 2 ++ fw/wmi_version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 70d4437d0ac3..7dba33d8939b 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -31534,6 +31534,8 @@ typedef struct { A_UINT32 vdev_id; /* picks values from WMI_USD_MODE_STATUS */ A_UINT32 usd_mode_status; + /* Instance ID of the service */ + A_UINT32 instance_id; } wmi_usd_service_event_fixed_param; typedef enum { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 49c3526fec13..8f7e6b51c422 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1507 +#define __WMI_REVISION_ 1508 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From e9157e2d094341c652701c05b327ae3885cb5b0a Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 20 Jul 2024 18:05:40 -0700 Subject: [PATCH 04/22] fw-api: CL 27213127 - update fw common interface files Change-Id: Ibcebfab00140fb343642d5f8c5d75af3782ee232 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 9 +++++++-- fw/wmi_version.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 7dba33d8939b..98d6c4323460 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24166,6 +24166,8 @@ typedef enum wake_reason_e { WOW_REASON_STX_WOW_HIGH_DUTY_CYCLE, /* WoW exit reason MCC lite */ WOW_REASON_MCC_LITE, + /* P2P CLI detected BMISS from DFS master AP */ + WOW_REASON_P2P_CLI_DFS_AP_BMISS_DETECTED, /* add new WOW_REASON_ defs before this line */ WOW_REASON_MAX, @@ -27496,16 +27498,19 @@ typedef struct A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/ } wmi_batch_scan_result_event_fixed_param; -typedef enum { +typedef enum { /* DEPRECATED - DO NOT USE */ /** beacons not received from P2P GO */ WMI_P2P_GO_BMISS = 0, /** beacons not received from P2 GO's STA's connected AP */ WMI_DFS_AP_BMISS = 1, -} wmi_dfs_ap_bmiss_reason; +} wmi_dfs_ap_bmiss_reason; /* DEPRECATED - DO NOT USE */ typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_cli_dfs_ap_bmiss_fixed_param*/ A_UINT32 vdev_id; + /* NOTE: + * The reason_code field is deprecated, and should be ignored. + */ A_UINT32 reason_code; /* contains a wmi_dfs_ap_bmiss_reason value */ } wmi_p2p_cli_dfs_ap_bmiss_fixed_param; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 8f7e6b51c422..eeddf1565e15 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1508 +#define __WMI_REVISION_ 1509 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From ef5af6add5d195a9acd0e97aa58e5084ae266072 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 25 Jul 2024 06:01:33 -0700 Subject: [PATCH 05/22] fw-api: CL 27232968 - update fw common interface files Change-Id: I400a57754dbb5d88a17a26b5a7a780ecbbcf5a52 CRs-Fixed: 3830439 --- fw/wlan_module_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fw/wlan_module_ids.h b/fw/wlan_module_ids.h index 4895eacf92c7..8ac928cdd2a9 100644 --- a/fw/wlan_module_ids.h +++ b/fw/wlan_module_ids.h @@ -191,6 +191,7 @@ typedef enum { WLAN_MODULE_PHYLIB_RRI, /* 0x94 */ WLAN_MODULE_PHYLIB_SSCAN, /* 0x95 */ WLAN_MODULE_PHYLIB_RSVD, /* 0x96 */ + WLAN_MODULE_USD, /* 0x97 */ WLAN_MODULE_ID_MAX, From c253c4921805b596174f255cbb904b6214e8635b Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 2 Aug 2024 18:01:12 -0700 Subject: [PATCH 06/22] fw-api: CL 27314804 - update fw common interface files Change-Id: Ia26d8270d0a284c3ed1d5d30fd177b5116619d1e CRs-Fixed: 3830439 --- fw/wmi_services.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 758afe77a62a..7ce81176e6f1 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -683,6 +683,7 @@ typedef enum { */ WMI_SERVICE_IS_TARGET_IPA = 425, WMI_SERVICE_THERM_THROT_TX_CHAIN_MASK = 426, /*FW supports thermal throttling dynamic Tx ChainMask update */ + WMI_SERVICE_SPLIT_PHY_PDEV_SUSPEND_RESUME_SUPPORT = 427, /* Indicates FW support pdev suspend/resume in split-phy radio */ WMI_MAX_EXT2_SERVICE From ece2d2a7a0d311b2b8b89da6c8e3262679a0f429 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 7 Aug 2024 06:01:23 -0700 Subject: [PATCH 07/22] fw-api: CL 27334210 - update fw common interface files Change-Id: I435ab923ccced1b33fc45c51b9efda15f1603bb0 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 3 +++ fw/wmi_version.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 98d6c4323460..dc3cd6015cbc 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24071,6 +24071,7 @@ typedef enum event_type_e { WOW_RTT_11AZ_EVENT, /* 32 + 13 */ WOW_P2P_NOA_EVENT, /* 32 + 14 */ WOW_XGAP_EVENT, /* 32 + 15 */ + WOW_PAGE_FAULT_EVENT, /* 32 + 16 */ } WOW_WAKE_EVENT_TYPE; typedef enum wake_reason_e { @@ -24168,6 +24169,8 @@ typedef enum wake_reason_e { WOW_REASON_MCC_LITE, /* P2P CLI detected BMISS from DFS master AP */ WOW_REASON_P2P_CLI_DFS_AP_BMISS_DETECTED, + /* if Page Fault blocking feature enabled and PF observed under WoW */ + WOW_REASON_PF_BLOCKING_LAST_TIME, /* add new WOW_REASON_ defs before this line */ WOW_REASON_MAX, diff --git a/fw/wmi_version.h b/fw/wmi_version.h index eeddf1565e15..e60dab44af66 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1509 +#define __WMI_REVISION_ 1510 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 8442e417e564e9e50f3ce8cb515b04c59439f844 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 7 Aug 2024 06:03:03 -0700 Subject: [PATCH 08/22] fw-api: CL 27338232 - update fw common interface files Change-Id: I1545378f2d3814c82c9cdc975fca319d22357b05 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 11 ++++++----- fw/wmi_version.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index dc3cd6015cbc..cc88a5d6cc73 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -47685,6 +47685,7 @@ typedef struct { #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM 4 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM 18 +#define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM_EXT 8 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_5G_6G_RATE_NUM 24 @@ -47698,14 +47699,14 @@ typedef struct { */ /* currently 2GHz band has 2 chains (though space is allocated for up - * to 4 chains) and each chain has 18 rates. + * to 4 chains) and each chain has 18 rates and 8 extended rates. * bitmap_of_2GHz_band[0] -> chain 0 bitmap: - * |bit 0|bit 1|......|bit 17| - * |rate 0|rate 1|......|rate 17| + * |bit 0|bit 1|......|bit 17| bit 18 |......| bit 25 | + * |rate 0|rate 1|......|rate 17|ext rate 0|......|ext rate 7| * * bitmap_of_2GHz_band[1] -> chain 1 bitmap: - * |bit 0|bit 1|......|bit 17| - * |rate 0|rate 1|......|rate 17| + * |bit 0|bit 1|......|bit 17| bit 18 |......| bit 25 | + * |rate 0|rate 1|......|rate 17|ext rate 0|......|ext rate 7| * * bitmap_of_2GHz_band[2] -> reserved * bitmap_of_2GHz_band[3] -> reserved diff --git a/fw/wmi_version.h b/fw/wmi_version.h index e60dab44af66..393052ea022a 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1510 +#define __WMI_REVISION_ 1511 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 2655e15978c6145883de17b9babb08cbb46368b5 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sun, 11 Aug 2024 12:01:39 -0700 Subject: [PATCH 09/22] fw-api: CL 27360144 - update fw common interface files Change-Id: I49389ad036b484273bc49a413106dd6259d21b1e CRs-Fixed: 3830439 --- fw/htt_stats.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fw/htt_stats.h b/fw/htt_stats.h index f685062a133b..a38401072609 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -4641,6 +4641,7 @@ typedef struct { A_UINT32 incomplete_llc; A_UINT32 eapol_duplicate_m3; A_UINT32 eapol_duplicate_m4; + A_UINT32 eapol_invalid_mac; } htt_stats_tx_de_classify_failed_tlv; /* preserve old name alias for new name consistent with the tag name */ typedef htt_stats_tx_de_classify_failed_tlv htt_tx_de_classify_failed_stats_tlv; From fccfe234c1718aa81e0f33f9b16930c7b965f04b Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 15 Aug 2024 18:01:13 -0700 Subject: [PATCH 10/22] fw-api: CL 27407027 - update fw common interface files Change-Id: Ie96cc4822bb6c6216cfe20a1d9a9ca5d23894766 CRs-Fixed: 3830439 --- fw/htt.h | 1 + fw/htt_stats.h | 23 +++++++++++++++++++++++ fw/wmi_unified.h | 8 +++++++- fw/wmi_version.h | 2 +- 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index b1f72a3d06ba..3273beb9e331 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -833,6 +833,7 @@ typedef enum { HTT_STATS_TX_PDEV_WIFI_RADAR_TAG = 200, /* htt_stats_tx_pdev_wifi_radar_tlv */ HTT_STATS_TXBF_OFDMA_BE_PARBW_TAG = 201, /* htt_stats_txbf_ofdma_be_parbw_tlv */ HTT_STATS_RX_PDEV_RSSI_HIST_TAG = 202, /* htt_stats_rx_pdev_rssi_hist_tlv */ + HTT_STATS_TX_VDEV_NSS_TAG = 203, /* htt_stats_tx_vdev_nss_tlv */ HTT_STATS_MAX_TAG, } htt_stats_tlv_tag_t; diff --git a/fw/htt_stats.h b/fw/htt_stats.h index a38401072609..7dac64221028 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -676,6 +676,14 @@ enum htt_dbg_ext_stats_type { */ HTT_DBG_GTX_STATS = 68, + /** HTT_DBG_EXT_STATS_TX_VDEV_NSS + * PARAMS: + * - No Params + * RESP MSG: + * - htt_stats_tx_vdev_nss_tlv + */ + HTT_DBG_EXT_STATS_TX_VDEV_NSS = 69, + /* keep this last */ HTT_DBG_NUM_EXT_STATS = 256, @@ -5406,6 +5414,7 @@ typedef struct { #define HTT_TX_PDEV_STATS_NUM_LTF 4 #define HTT_TX_PDEV_STATS_NUM_11AX_TRIGGER_TYPES 6 #define HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES 6 +#define HTT_TX_VDEV_STATS_NUM_SPATIAL_STREAMS 4 #define HTT_TX_NUM_OF_SOUNDING_STATS_WORDS \ (HTT_TX_PDEV_STATS_NUM_BW_COUNTERS * \ HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS) @@ -5625,6 +5634,20 @@ typedef struct { /* preserve old name alias for new name consistent with the tag name */ typedef htt_stats_tx_pdev_rate_stats_tlv htt_tx_pdev_rate_stats_tlv; +typedef struct { + htt_tlv_hdr_t tlv_hdr; + A_UINT32 vdev_id; /* which vdev produced these per-Nss tx stats */ + /* tx_nss: + * Count how many MPDUs the vdev has sent using each possible number + * of spatial streams: + * tx_nss[0] -> number of MPDUs transmitted using Nss=1 + * tx_nss[1] -> number of MPDUs transmitted using Nss=2 + * tx_nss[2] -> number of MPDUs transmitted using Nss=3 + * tx_nss[3] -> number of MPDUs transmitted using Nss=4 + */ + A_UINT32 tx_nss[HTT_TX_VDEV_STATS_NUM_SPATIAL_STREAMS]; +} htt_stats_tx_vdev_nss_tlv; + typedef struct { /* 11be mode pdev rate stats; placed in a separate TLV to adhere to size restrictions */ htt_tlv_hdr_t tlv_hdr; diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index cc88a5d6cc73..7ef291fd3b5f 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -3520,6 +3520,11 @@ typedef struct { #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_SET(target_cap_flags, value)\ WMI_SET_BITS(target_cap_flags, 15, 1, value) +#define WMI_TARGET_CAP_MPDU_STATS_PER_TX_NSS_SUPPORT_GET(target_cap_flags) \ + WMI_GET_BITS(target_cap_flags, 16, 1) +#define WMI_TARGET_CAP_MPDU_STATS_PER_TX_NSS_SUPPORT_SET(target_cap_flags, value)\ + WMI_SET_BITS(target_cap_flags, 16, 1, value) + /* * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs @@ -3666,7 +3671,8 @@ typedef struct { * Bit 13 - Support for multipass SAP * Bit 14 - Support for ML monitor mode * Bit 15 - Support for Qdata Tx LCE filter installation - * Bits 31:16 - Reserved + * Bit 16 - Support for MPDU stats per tx Nss capability + * Bits 31:17 - Reserved */ A_UINT32 target_cap_flags; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 393052ea022a..61908ef15062 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1511 +#define __WMI_REVISION_ 1512 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 39a2d7b9045d46793d03746e3a20a8eb0ca11064 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 15 Aug 2024 18:02:36 -0700 Subject: [PATCH 11/22] fw-api: CL 27418163 - update fw common interface files Change-Id: Ie80049a32e0c33c74e364df6038d9ce52260ea21 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 2 ++ fw/wmi_version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 7ef291fd3b5f..d8ea0b4b9906 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -48890,6 +48890,8 @@ typedef struct { A_UINT32 tlv_header; /* status takes values from WMI_MLO_TID_TO_LINK_MAP_STATUS */ A_UINT32 status; + /* Vdev_id on which T2LM command request is received */ + A_UINT32 vdev_id; } wmi_mlo_peer_tid_to_link_map_event_fixed_param; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 61908ef15062..cf12b0a97a78 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1512 +#define __WMI_REVISION_ 1513 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 27e5d776c3c543a57769218d3bd231095a416bf2 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 20 Aug 2024 00:30:48 -0700 Subject: [PATCH 12/22] fw-api: CL 27444604 - update fw common interface files Change-Id: I6911bdb80988b788cf623a4a308c43f0311c5d1a CRs-Fixed: 3830439 --- fw/wmi_unified.h | 11 +++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index d8ea0b4b9906..bb80605f232e 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -40455,6 +40455,17 @@ typedef struct { * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored. */ A_INT32 rssi_6g_threshold; /* units = dBm */ + /** bss_load_alpha_pct + * This parameter is used for updating the exponential average of the + * BSS load: + * new avg BSS load = + * new BSS load measurement * alpha / 100 + + * old avg BSS load * (100 - alpha) / 100 + * This parameter uses percent units. E.g. if bss_load_alpha_pct == 10, + * the new average will be the sum of 10% of the new measurement + 90% of + * the old average. + */ + A_UINT32 bss_load_alpha_pct; } wmi_roam_bss_load_config_cmd_fixed_param; /** Deauth roam trigger parameters */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index cf12b0a97a78..7df73f814166 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1513 +#define __WMI_REVISION_ 1514 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 94c35e3bc19bf8a91b473cf1cd54f36691fdb471 Mon Sep 17 00:00:00 2001 From: Rahul Gusain Date: Wed, 7 Aug 2024 12:29:26 +0530 Subject: [PATCH 13/22] fw-api: Add NAN file to host driver also Target send the NAN event with TLVs to the driver and driver extracts those TLV. But some TLV information is missing like NAN MAC address in the WMI files and they are part of other NAN files. Currently, target uses these NAN files for its internal functionality. So, to enable the TLV extraction in the driver, add NAN files having TLV information in the host driver also. Change-Id: I16373ed8df411da623a2925605000d5282da9967 CRs-Fixed: 3893449 --- fw/wlan_nan_msg.h | 1834 ++++++++++++++++++++++++++++++++++++++++ fw/wlan_nan_platform.h | 15 + 2 files changed, 1849 insertions(+) create mode 100644 fw/wlan_nan_msg.h create mode 100644 fw/wlan_nan_platform.h diff --git a/fw/wlan_nan_msg.h b/fw/wlan_nan_msg.h new file mode 100644 index 000000000000..3d180ab4f564 --- /dev/null +++ b/fw/wlan_nan_msg.h @@ -0,0 +1,1834 @@ +/* + * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: ISC + * + */ + +#ifndef _WLAN_NAN_MSG_H_ +#define _WLAN_NAN_MSG_H_ +#include +#include + +#ifndef WLAN_NAN_MSG_COMMON_HEADER_V2 + /* + * For backwards compatibility, use the deprecated version of + * wlan_nan_msg_common.h in systems that have not been updated + * to use the defs from the replacement wlan_nan_msg_common_v2.h + */ + #include +#else + #include + typedef nan_msg_header_t tNanMsgHeader; + typedef nan_msg_header_tp tpNanMsgHeader; +#endif + +/*--------------------------------------------------------------------------- +* WLAN NAN CONSTANTS +*--------------------------------------------------------------------------*/ +#ifndef PACKED_PRE +#define PACKED_PRE PREPACK +#endif + +#ifndef PACKED_POST +#define PACKED_POST POSTPACK +#endif + +/* ALL THE INTERFACE DEFINITIONS ARE ASSUMED TO BE IN LITTLE ENDIAN ORDER. + * BIG ENDIAN HOST IS RESPONSIBLE TO SEND/INTERPRET MESSAGES IN LITTLE + * ENDIAN FORMAT ONLY + */ + +/** 2 word representation of MAC addr */ +typedef struct { + A_UINT32 mac_addr31to0; + A_UINT32 mac_addr47to32; +} wlan_nan_mac_addr; + +/* NAN Statistics Request ID Codes */ +typedef enum +{ + NAN_STATS_ID_FIRST = 0, + NAN_STATS_ID_DE_PUBLISH = NAN_STATS_ID_FIRST, + NAN_STATS_ID_DE_SUBSCRIBE, + NAN_STATS_ID_DE_MAC, + NAN_STATS_ID_DE_TIMING_SYNC, + NAN_STATS_ID_DE_DW, + NAN_STATS_ID_DE, + NAN_STATS_ID_LAST +} tNanStatsId; + +typedef enum +{ + NAN_TLV_TYPE_FIRST = 0, + + /* Service Discovery Frame types */ + NAN_TLV_TYPE_SDF_FIRST = NAN_TLV_TYPE_FIRST, + NAN_TLV_TYPE_SERVICE_NAME = NAN_TLV_TYPE_SDF_FIRST, + NAN_TLV_TYPE_SDF_MATCH_FILTER, + NAN_TLV_TYPE_TX_MATCH_FILTER, + NAN_TLV_TYPE_RX_MATCH_FILTER, + NAN_TLV_TYPE_SERVICE_SPECIFIC_INFO, + NAN_TLV_TYPE_EXT_SERVICE_SPECIFIC_INFO = 5, + NAN_TLV_TYPE_VENDOR_SPECIFIC_ATTRIBUTE_TRANSMIT = 6, + NAN_TLV_TYPE_VENDOR_SPECIFIC_ATTRIBUTE_RECEIVE = 7, + NAN_TLV_TYPE_POST_NAN_CONNECTIVITY_CAPABILITIES_RECEIVE = 8, + NAN_TLV_TYPE_POST_NAN_DISCOVERY_ATTRIBUTE_RECEIVE = 9, + NAN_TLV_TYPE_BEACON_SDF_PAYLOAD_RECEIVE = 10, + NAN_TLV_TYPE_NAN_DATA_PATH_PARAMS = 11, + NAN_TLV_TYPE_NAN_DATA_SUPPORTED_BAND = 12, + NAN_TLV_TYPE_2G_COMMITTED_DW = 13, + NAN_TLV_TYPE_5G_COMMITTED_DW = 14, + NAN_TLV_TYPE_NAN_DATA_RSPNR_MODE = 15, + NAN_TLV_TYPE_NAN_DATA_ENABLED_IN_MATCH = 16, + NAN_TLV_TYPE_NAN20_RSPNR_ACCEPT_POLICY = 17, + NAN_TLV_TYPE_NAN_CSID = 18, + NAN_TLV_TYPE_NAN_SCID = 19, + NAN_TLV_TYPE_NAN_PMK = 20, + NAN_TLV_TYPE_SDEA_CTRL_PARAMS = 21, + NAN_TLV_TYPE_NAN20_RANGING_CONFIGURATION = 22, + NAN_TLV_TYPE_CONFIG_DISCOVERY_INDICATIONS = 23, + NAN_TLV_TYPE_NAN20_RANGING_REQUEST = 24, + NAN_TLV_TYPE_NAN20_RANGING_RESULT = 25, + NAN_TLV_TYPE_NAN20_RANGING_REQUEST_RECEIVED = 26, + NAN_TLV_TYPE_NAN_PASSPHRASE = 27, + NAN_TLV_TYPE_NAN_EXTENDED_SSI = 28, + NAN_TLV_TYPE_DEV_CAP_ATTR_CAPABILITY = 29, + NAN_TLV_TYPE_TRANSPORT_IP_PARAM = 30, + NAN_TLV_TYPE_SERVICE_ID = 31, + NAN_TLV_TYPE_PAIRING_CONFIGURATION = 32, + NAN_TLV_TYPE_PAIRING_MATCH_PARAMS = 33, + NAN_TLV_TYPE_BOOTSTRAPPING_PARAMS = 34, + NAN_TLV_TYPE_BOOTSTRAPPING_COOKIE = 35, + NAN_TLV_TYPE_NIRA_NOUNCE = 36, + NAN_TLV_TYPE_NIRA_TAG = 37, + NAN_TLV_TYPE_NAN_CSID_EXT = 38, /* replacement for NAN_TLV_TYPE_NAN_CSID */ + NAN_TLV_TYPE_CSIA_CAP = 39, + NAN_TLV_TYPE_SDF_LAST = 4095, + + /* Configuration types */ + NAN_TLV_TYPE_CONFIG_FIRST = 4096, + NAN_TLV_TYPE_24G_SUPPORT = NAN_TLV_TYPE_CONFIG_FIRST, //4096 + NAN_TLV_TYPE_24G_BEACON, //4097 + NAN_TLV_TYPE_24G_SDF, //4098 + NAN_TLV_TYPE_24G_RSSI_CLOSE, //4099 + NAN_TLV_TYPE_24G_RSSI_MIDDLE, //4100 + NAN_TLV_TYPE_24G_RSSI_CLOSE_PROXIMITY, //4101 + NAN_TLV_TYPE_5G_SUPPORT, //4102 + NAN_TLV_TYPE_5G_BEACON, //4103 + NAN_TLV_TYPE_5G_SDF, //4104 + NAN_TLV_TYPE_5G_RSSI_CLOSE, //4105 + NAN_TLV_TYPE_5G_RSSI_MIDDLE, //4106 + NAN_TLV_TYPE_5G_RSSI_CLOSE_PROXIMITY, //4107 + NAN_TLV_TYPE_SID_BEACON, //4108 + NAN_TLV_TYPE_HOP_COUNT_LIMIT, //4109 + NAN_TLV_TYPE_MASTER_PREFERENCE, //4110 + NAN_TLV_TYPE_CLUSTER_ID_LOW, //4111 + NAN_TLV_TYPE_CLUSTER_ID_HIGH, //4112 + NAN_TLV_TYPE_RSSI_AVERAGING_WINDOW_SIZE, //4113 + NAN_TLV_TYPE_CLUSTER_OUI_NETWORK_ID, //4114 + NAN_TLV_TYPE_SOURCE_MAC_ADDRESS, //4115 + NAN_TLV_TYPE_CLUSTER_ATTRIBUTE_IN_SDF, //4116 + NAN_TLV_TYPE_SOCIAL_CHANNEL_SCAN_PARAMS, //4117 + NAN_TLV_TYPE_DEBUGGING_FLAGS, //4118 + NAN_TLV_TYPE_POST_NAN_CONNECTIVITY_CAPABILITIES_TRANSMIT, //4119 + NAN_TLV_TYPE_POST_NAN_DISCOVERY_ATTRIBUTE_TRANSMIT, //4120 + NAN_TLV_TYPE_FURTHER_AVAILABILITY_MAP, //4121 + NAN_TLV_TYPE_HOP_COUNT_FORCE, //4122 + NAN_TLV_TYPE_RANDOM_FACTOR_FORCE, //4123 + NAN_TLV_TYPE_RANDOM_UPDATE_TIME, //4124 + NAN_TLV_TYPE_EARLY_WAKEUP, //4125 + NAN_TLV_TYPE_PERIODIC_SCAN_INTERVAL, //4126 + // 4127 unused + NAN_TLV_TYPE_DW_INTERVAL = 4128, //4128 + NAN_TLV_TYPE_DB_INTERVAL, //4129 + NAN_TLV_TYPE_FURTHER_AVAILABILITY, //4130 + NAN_TLV_TYPE_24G_CHANNEL, //4131 + NAN_TLV_TYPE_5G_CHANNEL, //4132 + NAN_TLV_TYPE_DISC_MAC_ADDR_RANDOM_INTERVAL, //4133 + NAN_TLV_TYPE_RANGING_AUTO_RESPONSE_CFG, // 4134 + NAN_TLV_TYPE_RANGING_AUTO_RESPONE_CFG = + NAN_TLV_TYPE_RANGING_AUTO_RESPONSE_CFG, // 4134 + NAN_TLV_TYPE_SUBSCRIBE_SID_BEACON, // 4135 + NAN_TLV_TYPE_DW_EARLY_TERMINATION, // 4136 + NAN_TLV_TYPE_TX_RX_CHAINS, // 4137 + NAN_TLV_TYPE_SYSTEM_RANGING_ENABLED, // 4138 + NAN_TLV_TYPE_UNSYNC_DISCOVERY_ENABLED, // 4139 + NAN_TLV_TYPE_FOLLOWUP_MGMT_RX_ENABLED, // 4140 + + NAN_TLV_TYPE_CONFIG_LAST = 8191, + + /* Attributes types */ + NAN_TLV_TYPE_ATTRS_FIRST = 8192, + + NAN_TLV_TYPE_AVAILABILITY_INTERVALS_MAP = NAN_TLV_TYPE_ATTRS_FIRST, + NAN_TLV_TYPE_WLAN_MESH_ID, + NAN_TLV_TYPE_MAC_ADDRESS, + NAN_TLV_TYPE_RECEIVED_RSSI_VALUE, + NAN_TLV_TYPE_CLUSTER_ATTRIBUTE, + NAN_TLV_TYPE_WLAN_INFRA_SSID, + NAN_TLV_TYPE_NAN_SHARED_KEY_DESC_ATTR, + NAN_TLV_TYPE_ATTRS_LAST = 12287, + + /* Events types */ + NAN_TLV_TYPE_EVENTS_FIRST = 12288, + NAN_TLV_TYPE_SELF_STA_MAC_ADDR = NAN_TLV_TYPE_EVENTS_FIRST, + NAN_TLV_TYPE_STARTED_CLUSTER, + NAN_TLV_TYPE_JOINED_CLUSTER, + NAN_TLV_TYPE_CLUSTER_SCAN_RESULTS, + NAN_TLV_TYPE_FAW_MEM_AVAIL, + NAN_TLV_TYPE_EVENTS_LAST = 16383, + + /* TCA types */ + NAN_TLV_TYPE_TCA_FIRST = 16384, + NAN_TLV_TYPE_CLUSTER_SIZE_REQ = NAN_TLV_TYPE_TCA_FIRST, + NAN_TLV_TYPE_CLUSTER_SIZE_RSP, + NAN_TLV_TYPE_TCA_LAST = 32767, + + /* Statistics types */ + NAN_TLV_TYPE_STATS_FIRST = 32768, + NAN_TLV_TYPE_DE_PUBLISH_STATS = NAN_TLV_TYPE_STATS_FIRST, + NAN_TLV_TYPE_DE_SUBSCRIBE_STATS, + NAN_TLV_TYPE_DE_MAC_STATS, + NAN_TLV_TYPE_DE_TIMING_SYNC_STATS, + NAN_TLV_TYPE_DE_DW_STATS, + NAN_TLV_TYPE_DE_STATS, + NAN_TLV_TYPE_STATS_LAST = 36863, + + /* Testmode types */ + NAN_TLV_TYPE_TESTMODE_FIRST = 36864, + NAN_TLV_TYPE_TESTMODE_GENERIC_CMD = NAN_TLV_TYPE_TESTMODE_FIRST, + NAN_TLV_TYPE_TESTMODE_LAST = 37000, + + /* NAN Security types */ + NAN_TLV_TYPE_SEC_FIRST = 37001, + NAN_TLV_TYPE_SEC_IGTK_KDE = NAN_TLV_TYPE_SEC_FIRST, + NAN_TLV_TYPE_SEC_BIGTK_KDE, + NAN_TLV_TYPE_SEC_NM_TK, + NAN_TLV_TYPE_GROUP_KEYS_PARAM, + NAN_TLV_TYPE_SEC_LAST = 37100, + + /* NAN OEM Configuration types */ + NAN_TLV_TYPE_OEM_DATA_FIRST = 37101, + NAN_TLV_TYPE_OEM1_DATA = NAN_TLV_TYPE_OEM_DATA_FIRST, + NAN_TLV_TYPE_OEM_DATA_LAST = 37150, + + + NAN_TLV_TYPE_LAST = 65535 +} tNanTlvType; + + +/* NAN Publish Types */ +typedef enum +{ + NAN_PUBLISH_TYPE_UNSOLICITED = 0, + NAN_PUBLISH_TYPE_SOLICITED, + NAN_PUBLISH_TYPE_UNSOLICITED_SOLICITED, + NAN_PUBLISH_TYPE_LAST, +} tNanPublishType; + +/* NAN Transmit Types */ +typedef enum +{ + NAN_TX_TYPE_BROADCAST = 0, + NAN_TX_TYPE_UNICAST, + NAN_TX_TYPE_LAST +} tNanTxType; + +/* NAN Match Algorithms */ +typedef enum +{ + NAN_MATCH_ALG_FIRST = 0, + NAN_MATCH_ALG_MATCH_ONCE = NAN_MATCH_ALG_FIRST, + NAN_MATCH_ALG_MATCH_CONTINUOUS, + NAN_MATCH_ALG_NEVER, + NAN_MATCH_ALG_LAST +} tNanMatchAlg; + +/* NAN Indication Disable Flag */ +typedef enum +{ + NAN_IND_ALWAYS = 0, + NAN_IND_NEVER, +} tNanIndDisableFlag; + +/* NAN Transmit Priorities */ +typedef enum +{ + NAN_TX_PRIORITY_LOW = 0, + NAN_TX_PRIORITY_NORMAL, + NAN_TX_PRIORITY_HIGH, + /* This is for special case if the service + * want to respond in same DW */ + NAN_TX_PRIORITY_CRITICAL, + NAN_TX_PRIORITY_LAST +} tNanTxPriority; + +/* PMK length */ +#define NAN_PMK_LEN 32 +/* Passphrase length */ +#define NAN_PASSPHRASE_MIN_LEN 8 +#define NAN_PASSPHRASE_MAX_LEN 63 +/* Supported NAN SCID buffer length */ +#define NAN_SCID_BUF_LEN 256 + +/* NAN Status Codes */ +typedef enum +{ + /* Protocol Response Codes */ + NAN_STATUS_SUCCESS = 0, + NAN_STATUS_TIMEOUT = 1, + NAN_STATUS_DE_FAILURE = 2, + NAN_STATUS_INVALID_MSG_VERSION = 3, + NAN_STATUS_INVALID_MSG_LEN = 4, + NAN_STATUS_INVALID_MSG_ID = 5, + NAN_STATUS_INVALID_HANDLE = 6, + NAN_STATUS_NO_SPACE_AVAILABLE = 7, + NAN_STATUS_INVALID_PUBLISH_TYPE = 8, + NAN_STATUS_INVALID_TX_TYPE = 9, + NAN_STATUS_INVALID_MATCH_ALGORITHM = 10, + NAN_STATUS_DISABLE_IN_PROGRESS = 11, + NAN_STATUS_INVALID_TLV_LEN = 12, + NAN_STATUS_INVALID_TLV_TYPE =13, + NAN_STATUS_MISSING_TLV_TYPE = 14, + NAN_STATUS_INVALID_TOTAL_TLVS_LEN = 15, + NAN_STATUS_INVALID_MATCH_HANDLE = 16, + NAN_STATUS_INVALID_TLV_VALUE = 17, + NAN_STATUS_INVALID_TX_PRIORITY = 18, + NAN_STATUS_INVALID_CONNECTION_MAP = 19, + NAN_STATUS_INVALID_TCA_ID = 20, + NAN_STATUS_INVALID_STATS_ID = 21, + NAN_STATUS_NAN_NOT_ALLOWED = 22, + NAN_STATUS_NO_OTA_ACK = 23, + NAN_STATUS_TX_FAIL = 24, + NAN_STATUS_MULTIPLE_ENABLE = 25, + NAN_STATUS_FOLLOWUP_QUEUE_FULL = 26, + NAN_STATUS_INVALID_5G_CHANNEL = 27, + NAN_STATUS_POLICY_MANAGER_NOT_SINGLE_MAC_MODE = 28, + NAN_STATUS_VDEV_NOT_CREATED = 29, + + /* Configuration Response Codes */ + NAN_STATUS_INVALID_RSSI_CLOSE_VALUE = 4096, + NAN_STATUS_INVALID_RSSI_MEDIUM_VALUE = 4097, + NAN_STATUS_INVALID_HOP_COUNT_LIMIT = 4098, + NAN_STATUS_INVALID_MASTER_PREFERENCE_VALUE = 4099, + NAN_STATUS_INVALID_LOW_CLUSTER_ID_VALUE = 4100, + NAN_STATUS_INVALID_HIGH_CLUSTER_ID_VALUE = 4101, + NAN_STATUS_INVALID_BACKGROUND_SCAN_PERIOD = 4102, + NAN_STATUS_INVALID_RSSI_PROXIMITY_VALUE = 4103, + NAN_STATUS_INVALID_SCAN_CHANNEL = 4104, + NAN_STATUS_INVALID_POST_NAN_CONNECTIVITY_CAPABILITIES_BITMAP = 4105, + NAN_STATUS_INVALID_FURTHER_AVAILABILITY_MAP_NUMCHAN_VALUE = 4106, + NAN_STATUS_INVALID_FURTHER_AVAILABILITY_MAP_DURATION_VALUE = 4107, + NAN_STATUS_INVALID_FURTHER_AVAILABILITY_MAP_CLASS_VALUE = 4108, + NAN_STATUS_INVALID_FURTHER_AVAILABILITY_MAP_CHANNEL_VALUE = 4109, + NAN_STATUS_INVALID_FURTHER_AVAILABILITY_MAP_AVAILABILITY_INTERVAL_BITMAP_VALUE = 4110, + NAN_STATUS_INVALID_FURTHER_AVAILABILITY_MAP_MAP_ID = 4111, + NAN_STATUS_INVALID_POST_NAN_DISCOVERY_CONN_TYPE_VALUE = 4112, + NAN_STATUS_INVALID_POST_NAN_DISCOVERY_DEVICE_ROLE_VALUE = 4113, + NAN_STATUS_INVALID_POST_NAN_DISCOVERY_DURATION_VALUE = 4114, + NAN_STATUS_INVALID_POST_NAN_DISCOVERY_BITMAP_VALUE = 4115, + NAN_STATUS_MISSING_FUTHER_AVAILABILITY_MAP = 4116, + NAN_STATUS_INVALID_BAND_CONFIG_FLAGS = 4117, + NAN_STATUS_INVALID_RANDOM_FACTOR_UPDATE_TIME_VALUE = 4118, + NAN_STATUS_INVALID_ONGOING_SCAN_PERIOD = 4119, + NAN_STATUS_INVALID_DW_INTERVAL_VALUE = 4120, + NAN_STATUS_INVALID_DB_INTERVAL_VALUE = 4121, + + /* Protocol Termination Indication Reason Codes */ + NAN_TERMINATED_REASON_INVALID = 8192, + NAN_TERMINATED_REASON_TIMEOUT = 8193, + NAN_TERMINATED_REASON_USER_REQUEST = 8194, + NAN_TERMINATED_REASON_FAILURE = 8195, + NAN_TERMINATED_REASON_COUNT_REACHED = 8196, + NAN_TERMINATED_REASON_DE_SHUTDOWN = 8197, /* Deprecated */ + NAN_TERMINATED_REASON_DISABLE_IN_PROGRESS = 8198, + NAN_TERMINATED_REASON_POST_DISC_ATTR_EXPIRED = 8199, + NAN_TERMINATED_REASON_POST_DISC_LEN_EXCEEDED = 8200, + NAN_TERMINATED_REASON_FURTHER_AVAIL_MAP_EMPTY = 8201, + + /* Status related to Key Install and PN */ + NAN_STATUS_INVALID_IGTK_PARAMS = 8501, + NAN_STATUS_INVALID_BIGTK_PARAMS = 8502, + NAN_STATUS_INVALID_TX_KEY_NOT_PRESENT = 8503, + NAN_STATUS_INVALID_NO_PEER_ENTRY = 8504, + + /* 9000-9500 NDP Status type */ + NDP_UNSUPPORTED_CONCURRENCY = 9000, + NDP_NAN_DATA_IFACE_CREATE_FAILED = 9001, + NDP_NAN_DATA_IFACE_DELETE_FAILED = 9002, + NDP_DATA_INITIATOR_REQUEST_FAILED = 9003, + NDP_DATA_RESPONDER_REQUEST_FAILED = 9004, + NDP_INVALID_SERVICE_INSTANCE_ID = 9005, + NDP_INVALID_NDP_INSTANCE_ID = 9006, + NDP_INVALID_RESPONSE_CODE = 9007, + NDP_INVALID_APP_INFO_LEN = 9008, + /* OTA failures and timeouts during negotiation */ + NDP_MGMT_FRAME_REQUEST_FAILED = 9009, + NDP_MGMT_FRAME_RESPONSE_FAILED = 9010, + NDP_MGMT_FRAME_CONFIRM_FAILED = 9011, + NDP_END_FAILED = 9012, + NDP_MGMT_FRAME_END_REQUEST_FAILED = 9013, + NDP_MGMT_FRAME_SECURITY_INSTALL_FAILED = 9014, + + /* 9500 onwards vendor specific error codes */ + NDP_VENDOR_SPECIFIC_ERROR = 9500 + +} tNanStatusType; + +/* Enumeration for Version */ +typedef enum +{ + NAN_MSG_VERSION1 = 1, +}tNanMsgVersion; + +/* NAN Error Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanErrorRspMsg, *tpNanErrorRspMsg; + +/* NAN Configuration Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanConfigurationRspMsg, *tpNanConfigurationRspMsg; + +/* NAN Publish Service Cancel Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanPublishServiceCancelRspMsg, *tpNanPublishServiceCancelRspMsg; + +/* NAN Publish Service Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanPublishServiceRspMsg, *tpNanPublishServiceRspMsg; + +/* NAN Subscribe Service Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanSubscribeServiceRspMsg, *tpNanSubscribeServiceRspMsg; + +/* NAN Subscribe Service Cancel Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanSubscribeServiceCancelRspMsg, *tpNanSubscribeServiceCancelRspMsg; + +/* NAN Transmit Followup Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanTransmitFollowupRspMsg, *tpNanTransmitFollowupRspMsg; + +/* NAN Self Transmit Followup Indication */ +typedef PACKED_PRE struct PACKED_POST +{ + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanSelfTransmitFollowupIndMsg, *tpNanSelfTransmitFollowupIndMsg; + +/* NAN Statistics Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT16 status; + A_UINT16 value; + A_UINT8 statsId; + A_UINT8 reserved; +} tNanStatsRspParams, *tpNanStatsRspParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanStatsRspParams statsRspParams; + A_UINT8 ptlv[1]; +} tNanStatsRspMsg, *tpNanStatsRspMsg; + +/* NAN Enable Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; +} tNanEnableRspMsg, *tpNanEnableRspMsg; + +/* NAN Disable Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 reserved; +} tNanDisableRspMsg, *tpNanDisableRspMsg; + +/* NAN TCA Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* status of the request */ + A_UINT16 status; + A_UINT16 value; +} tNanTcaRspMsg, *tpNanTcaRspMsg; + +/* NAN Beacon Sdf Payload Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* status of the request */ + A_UINT16 status; + A_UINT16 value; +} tNanBcnSdfPayloadRspMsg, *tpNanBcnSdfPayloadRspMsg; + +/* NAN Capabilities Rsp */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 status; + A_UINT32 value; + A_UINT32 maxConcurrentNanClusters; + A_UINT32 maxNumPublishes; + A_UINT32 maxNumSubscribes; + A_UINT32 maxServiceNameLen; + A_UINT32 maxMatchFilterLen; + A_UINT32 maxTotalMatchFilterLen; + A_UINT32 maxServiceSpecificInfoLen; + A_UINT32 maxVsaDataLen; + A_UINT32 maxMeshDataLen; + A_UINT32 maxNanDataInterfaces; + A_UINT32 maxNanDataPathSessions; + A_UINT32 maxNanDataAppInfoLen; + A_UINT32 maxNanQueuedTransmitFollowupMsgs; + A_UINT32 nanDataSupportedBands; + A_UINT32 nanCSIDSupported; + /* Target capability max SCID buffer supported */ + A_UINT32 maxSCIDBufsupported; + + A_UINT32 nanSecuritySupported:1; + A_UINT32 maxExtServiceSpecificInfoLen:16; + A_UINT32 maxNanRttInitiatorSupported:5; + A_UINT32 maxNanRttResponderSupported:5; + A_UINT32 nanNDPESupported:1; + A_UINT32 nanPairingSupported:1; + A_UINT32 nanUSDPublisherSupported:1; + A_UINT32 nanUSDSubscriberSupported:1; + A_UINT32 reserved:1; + + A_UINT32 maxSubscribeAddress; + A_UINT32 maxNanPairingSessions; + A_UINT32 nanGroupMfpCap; +} tNanCapabilitiesRspParams, *tpNanCapabilitiesRspParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanCapabilitiesRspParams capabilitiesRspParams; +} tNanCapabilitiesRspMsg, *tpNanCapabilitiesRspMsg; + +/* NAN Beacon Sdf Payload Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: MAC Address (when VSA Receive is present) + * Optional: VSA Receive, Beacon SDF Payload Receive + */ + A_UINT8 ptlv[1]; +} tNanBcnSdfPayloadIndMsg, *tpNanBcnSdfPayloadIndMsg; + +/* NAN TCA Ind TLV */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 rising:1; + A_UINT32 falling:1; + A_UINT32 reserved:30; + A_UINT32 value; +} tNanTcaIndTlv, *tpNanTcaIndTlv; + +/* NAN TCA Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: TCA Ind TLV (Cluster Size Rsp). + */ + A_UINT8 ptlv[1]; +} tNanTcaIndMsg, *tpNanTcaIndMsg; + +/* NAN Disable Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* reason for the termination */ + A_UINT16 reason; + A_UINT16 reserved; +} tNanDisableIndMsg, *tpNanDisableIndMsg; + +/* Event Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * Excludes TLVs + * + * Optional: Self-Station MAC Address, Started Cluster, Joined Cluster + */ + A_UINT8 ptlv[1]; +} tNanEventIndMsg, *tpNanEventIndMsg; + +/* NAN Publish Followup Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 matchHandle; + A_UINT32 window:1; + A_UINT32 reserved:31; + /* + * Excludes TLVs + * + * Required: Service Specific Info or Extended Service Specific Info + */ +} tNanFollowupIndParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanFollowupIndParams followupIndParams; + /* + * Excludes TLVs + * + * Required: MAC Address, Service Specific Info (D bit is 0) + * Optional: Service Specific Info (D bit is 1) + */ + A_UINT8 ptlv[1]; +} tNanFollowupIndMsg, *tpNanFollowupIndMsg; + +/* NAN Subscribe Terminated Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* reason for the termination */ + A_UINT16 reason; + A_UINT16 reserved; +} tNanSubscribeTerminatedIndMsg, *tpNanSubscribeTerminatedIndMsg; + +/* NAN Unmatch Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 matchHandle; +} tNanUnmatchIndParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanUnmatchIndParams unmatchIndParams; +} tNanUnmatchIndMsg, *tpNanUnmatchIndMsg; + +/* NAN Match Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 matchHandle; + A_UINT32 beaconFrameFlag:1; + A_UINT32 cacheExhaustedFlag:1; + A_UINT32 reserved:30; +} tNanMatchIndParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanMatchIndParams matchIndParams; + /* + * Excludes TLVs + * + * Required: MAC Address + * Optional: Service Specific Info, SDF Match Filter + * Received RSSI Value, Post NAN Connectivity Capabilities Rx, + * Post NAN Discovery Attribute Rx, Further Availability Map, + * Cluster Attribute, Sdea ctrl params, NAN CSID, NAN SCID + */ + A_UINT8 ptlv[1]; +} tNanMatchIndMsg, *tpNanMatchIndMsg; + +/* NAN Publish Terminated Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 reason; + A_UINT16 reserved; +} tNanPublishTerminatedIndMsg, *tpNanPublishTerminatedIndMsg; + +/* NAN Publish Replied Ind */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 matchHandle; +} tNanPublishRepliedIndParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanPublishRepliedIndParams publishRepliedIndParams; + /* + * Excludes TLVs + * + * Required: MAC Address + * Optional: Received RSSI Value, Post NAN Connectivity Capabilities Rx, + * Post NAN Discovery Attribute Rx, Further Availability Map, + * Cluster Attribute, Sdea ctrl params, NAN CSID, NAN SCID buffer + */ + A_UINT8 ptlv[1]; +} tNanPublishRepliedIndMsg, *tpNanPublishRepliedIndMsg; + +/* NAN Enable Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: Master Preference, Cluster Low, Cluster High + * Optional: 2.4G Support, 2.4G Beacons, 2.4G Discovery, 2.4G RSSI Close, + * 2.4G RSSI Middle, 2.4G RSSI Close Proximity, 5G Support, + * 5G Beacons, 5G Discovery, 5G RSSI Close, 5G RSSI Middle, + * 5G RSSI Close Proximity, SID Beacon, Hop Count Limit, + * Random Factor Force, Hop Count Force, Master Preference, + * Cluster Low, Cluster High, RSSI Averaging Window Size, + * Cluster OUI Network ID, Source MAC Address, + * Cluster Attribute in SDF, Social Channel Scan Parameters, + * Debugging Flags, Post NAN Connectivity Capabilities Tx, + * Post NAN Discovery Attribute Tx, Further Availability Map + */ + A_UINT8 ptlv[1]; +} tNanEnableReqMsg, *tpNanEnableReqMsg; + +/* NAN Disable Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; +} tNanDisableReqMsg, *tpNanDisableReqMsg; + +/* NAN Configuration Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: None. + * Optional: 2.4G RSSI Close Proximity, 5G RSSI Close Proximity, + * SID Beacon, Random Factor Force, Hop Count Force, + * Master Preference, RSSI Averaging Window Size, + * Cluster Attribute, Social Channel Scan Parameters, + * Debugging Flags, Post NAN Connectivity Capabilities Tx, + * Post NAN Discovery Attribute Tx, Further Availability Map + */ + A_UINT8 ptlv[1]; +} tNanConfigurationReqMsg, *tpNanConfigurationReqMsg; + +/* NAN Publish Service Req */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT16 ttl; + A_UINT16 period; + A_UINT32 replyIndFlag:1; + A_UINT32 publishType:2; + A_UINT32 txType:1; + A_UINT32 useRssi:1; + A_UINT32 otaFlag:1; + A_UINT32 matchAlg:2; + A_UINT32 count:8; + A_UINT32 connMap:8; + A_UINT32 pubTerminatedIndDisableFlag:1; + A_UINT32 pubUnmatchIndDisableFlag:1; + A_UINT32 followupRxIndDisableFlag:1; + A_UINT32 reserved2:5; +} tNanPublishServiceReqParams, *tpNanPublishServiceReqParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanPublishServiceReqParams publishServiceReqParams; + /* + * Excludes TLVs + * + * Required: Service Name + * Optional: Service Specific Info, Tx Match Filter, Rx Match Filter + * Sdea ctrl params, NAN CSID, PMK, PASSPHRASE + */ + A_UINT8 ptlv[1]; +} tNanPublishServiceReqMsg, *tpNanPublishServiceReqMsg; + +/* NAN Publish Service Cancel Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; +} tNanPublishServiceCancelReqMsg, *tpNanPublishServiceCancelReqMsg; + +/* NAN Subscribe Service Req */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT16 ttl; + A_UINT16 period; + A_UINT32 subscribeType:1; + A_UINT32 srfAttr:1; + A_UINT32 srfInclude:1; + A_UINT32 srfSend:1; + A_UINT32 ssiRequired:1; + A_UINT32 matchAlg:2; + A_UINT32 reserved1:1; + A_UINT32 count:8; + A_UINT32 useRssi:1; + A_UINT32 otaFlag:1; + A_UINT32 subTerminatedIndDisableFlag:1; + A_UINT32 subUnmatchIndDisableFlag:1; + A_UINT32 followupRxIndDisableFlag:1; + A_UINT32 reserved2:3; + A_UINT32 connMap:8; + /* + * Excludes TLVs + * + * Required: Service Name + * Optional: Rx Match Filter, Tx Match Filter, Service Specific Info, + * Group Key + */ +} tNanSubscribeServiceReqParams, *tpNanSubscribeServiceReqParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanSubscribeServiceReqParams subscribeServiceReqParams; + /* + * Excludes TLVs + * + * Required: Service Name + * Optional: Rx Match Filter, Tx Match Filter, Service Specific Info, + * Sdea ctrl params, NAN CSID, PMK, PASSPHRASE + */ + A_UINT8 ptlv[1]; +} tNanSubscribeServiceReqMsg, *tpNanSubscribeServiceReqMsg; + +/* NAN Subscribe Service Cancel Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; +} tNanSubscribeServiceCancelReqMsg, *tpNanSubscribeServiceCancelReqMsg; + +/* NAN Transmit Followup Req */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 matchHandle; + A_UINT32 priority:4; + A_UINT32 window:1; + A_UINT32 followupTxRspDisableFlag:1; + A_UINT32 reserved:26; + /* + * Excludes TLVs + * + * Required: Service Specific Info or Extended Service Specific Info + */ +} tNanTransmitFollowupReqParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanTransmitFollowupReqParams transmitFollowupReqParams; + /* + * Excludes TLVs + * + * Required: MAC Address, Service Specific Info (D bit is 0) + * Optional: Service Specific Info (D bit is 1) + */ + A_UINT8 ptlv[1]; +} tNanTransmitFollowupReqMsg, *tpNanTransmitFollowupReqMsg; + +/* NAN Statistics Req */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 statsId:8; + A_UINT32 clear:1; + A_UINT32 reserved:23; +} tNanStatsReqParams, *tpNanStatsReqParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanStatsReqParams statsReqParams; +} tNanStatsReqMsg, *tpNanStatsReqMsg; + +/* NAN TCA Req TLV */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 rising:1; + A_UINT32 falling:1; + A_UINT32 clear:1; + A_UINT32 reserved:29; + A_UINT32 threshold; +} tNanTcaReqParams, *tpNanTcaReqParams; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: TCA Req TLV (Cluster Size Req). + */ + A_UINT8 ptlv[1]; +} tNanTcaReqMsg, *tpNanTcaReqMsg; + +/* Publish statistics. */ +typedef struct +{ + A_UINT32 validPublishServiceReqMsgs; + A_UINT32 validPublishServiceRspMsgs; + A_UINT32 validPublishServiceCancelReqMsgs; + A_UINT32 validPublishServiceCancelRspMsgs; + A_UINT32 validPublishRepliedIndMsgs; + A_UINT32 validPublishTerminatedIndMsgs; + A_UINT32 validActiveSubscribes; + A_UINT32 validMatches; + A_UINT32 validFollowups; + A_UINT32 invalidPublishServiceReqMsgs; + A_UINT32 invalidPublishServiceCancelReqMsgs; + A_UINT32 invalidActiveSubscribes; + A_UINT32 invalidMatches; + A_UINT32 invalidFollowups; + A_UINT32 publishCount; + A_UINT32 publishNewMatchCount; + A_UINT32 pubsubGlobalNewMatchCount; +} tNanPublishStats, *tpNanPublishStats; + +/* Subscribe statistics. */ +typedef struct +{ + A_UINT32 validSubscribeServiceReqMsgs; + A_UINT32 validSubscribeServiceRspMsgs; + A_UINT32 validSubscribeServiceCancelReqMsgs; + A_UINT32 validSubscribeServiceCancelRspMsgs; + A_UINT32 validSubscribeTerminatedIndMsgs; + A_UINT32 validSubscribeMatchIndMsgs; + A_UINT32 validSubscribeUnmatchIndMsgs; + A_UINT32 validSolicitedPublishes; + A_UINT32 validMatches; + A_UINT32 validFollowups; + A_UINT32 invalidSubscribeServiceReqMsgs; + A_UINT32 invalidSubscribeServiceCancelReqMsgs; + A_UINT32 invalidSubscribeFollowupReqMsgs; + A_UINT32 invalidSolicitedPublishes; + A_UINT32 invalidMatches; + A_UINT32 invalidFollowups; + A_UINT32 subscribeCount; + A_UINT32 bloomFilterIndex; + A_UINT32 subscribeNewMatchCount; + A_UINT32 pubsubGlobalNewMatchCount; +} tNanSubscribeStats, *tpNanSubscribeStats; + +/* NAN MAC Statistics. Used for MAC and DW statistics. */ +typedef struct +{ + /* RX stats */ + A_UINT32 validFrames; + A_UINT32 validActionFrames; + A_UINT32 validBeaconFrames; + A_UINT32 ignoredActionFrames; + A_UINT32 ignoredBeaconFrames; + A_UINT32 invalidFrames; + A_UINT32 invalidActionFrames; + A_UINT32 invalidBeaconFrames; + A_UINT32 invalidMacHeaders; + A_UINT32 invalidPafHeaders; + A_UINT32 nonNanBeaconFrames; + + A_UINT32 earlyActionFrames; + A_UINT32 inDwActionFrames; + A_UINT32 lateActionFrames; + + /* TX stats */ + A_UINT32 framesQueued; + A_UINT32 totalTRSpUpdates; + A_UINT32 completeByTRSp; + A_UINT32 completeByTp75DW; + A_UINT32 completeByTendDW; + A_UINT32 lateActionFramesTx; + + /* Misc stats - ignored for DW. */ + A_UINT32 twIncreases; + A_UINT32 twDecreases; + A_UINT32 twChanges; + A_UINT32 twHighwater; + A_UINT32 bloomFilterIndex; + +} tNanMacStats, *tpNanMacStats; + +/* NAN Sync Statistics: TBD */ +typedef struct +{ + A_UINT64 currTsf; + A_UINT64 myRank; + A_UINT64 currAmRank; + A_UINT64 lastAmRank; + A_UINT32 currAmBTT; + A_UINT32 lastAmBTT; + A_UINT8 currAmHopCount; + A_UINT8 currRole; + A_UINT16 currClusterId; + + A_UINT32 reserved1; /* NOTE: Needed for padding for uint64 alignment of following 4 fields */ + + A_UINT64 timeSpentInCurrRole; + A_UINT64 totalTimeSpentAsMaster; + A_UINT64 totalTimeSpentAsNonMasterSync; + A_UINT64 totalTimeSpentAsNonMasterNonSync; + A_UINT32 transitionsToAnchorMaster; + A_UINT32 transitionsToMaster; + A_UINT32 transitionsToNonMasterSync; + A_UINT32 transitionsToNonMasterNonSync; + A_UINT32 amrUpdateCount; + A_UINT32 amrUpdateRankChangedCount; + A_UINT32 amrUpdateBTTChangedCount; + A_UINT32 amrUpdateHcChangedCount; + A_UINT32 amrUpdateNewDeviceCount; + A_UINT32 amrExpireCount; + A_UINT32 mergeCount; + A_UINT32 beaconsAboveHcLimit; + A_UINT32 beaconsBelowRssiThresh; + A_UINT32 beaconsIgnoredNoSpace; + A_UINT32 beaconsForOurCluster; + A_UINT32 beaconsForOtherCluster; + A_UINT32 beaconCancelRequests; + A_UINT32 beaconCancelFailures; + A_UINT32 beaconUpdateRequests; + A_UINT32 beaconUpdateFailures; + A_UINT32 syncBeaconTxAttempts; + A_UINT32 syncBeaconTxFailures; + A_UINT32 discBeaconTxAttempts; + A_UINT32 discBeaconTxFailures; + A_UINT32 amHopCountExpireCount; + A_UINT32 ndpChannelFreq; + A_UINT32 ndpChannelFreq2; + A_UINT32 schedUpdateChannelFreq; + +} tNanSyncStats, *tpNanSyncStats; + +/* NAN Misc DE Statistics */ +typedef struct +{ + A_UINT32 validErrorRspMsgs; + A_UINT32 validTransmitFollowupReqMsgs; + A_UINT32 validTransmitFollowupRspMsgs; + A_UINT32 validFollowupIndMsgs; + A_UINT32 validConfigurationReqMsgs; + A_UINT32 validConfigurationRspMsgs; + A_UINT32 validStatsReqMsgs; + A_UINT32 validStatsRspMsgs; + A_UINT32 validEnableReqMsgs; + A_UINT32 validEnableRspMsgs; + A_UINT32 validDisableReqMsgs; + A_UINT32 validDisableRspMsgs; + A_UINT32 validDisableIndMsgs; + A_UINT32 validEventIndMsgs; + A_UINT32 validTcaReqMsgs; + A_UINT32 validTcaRspMsgs; + A_UINT32 validTcaIndMsgs; + A_UINT32 invalidTransmitFollowupReqMsgs; + A_UINT32 invalidConfigurationReqMsgs; + A_UINT32 invalidStatsReqMsgs; + A_UINT32 invalidEnableReqMsgs; + A_UINT32 invalidDisableReqMsgs; + A_UINT32 invalidTcaReqMsgs; + A_UINT32 validBcnSdfPayloadReqMsgs; + A_UINT32 validBcnSdfPayloadRspMsgs; + A_UINT32 validBcnSdfPayloadIndMsgs; + A_UINT32 invalidBcnSdfPayloadReqMsgs; + A_UINT32 validCapabilitiesReqMsgs; + A_UINT32 invalidCapabilitiesReqMsgs; + A_UINT32 validCapabilitiesRspMsgs; +} tNanDeStats, *tpNanDeStats; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 s:1; + A_UINT8 count:7; +} tNanSidAttr, *tpSidAttr; + +/* NAN BcnSdfPayload Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: VSA Transmit + * Optional: None + */ + A_UINT8 ptlv[1]; +} tNanBcnSdfPayloadReqMsg, *tpNanBcnSdfPayloadReqMsg; + +/* Get NAN Capabilities Req */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; +} tNanCapabilitiesReqMsg, *tpNanCapabilitiesReqMsg; + +/* These are in the same order as the Conn Types below. */ +#define NAN_CONN_MAP_NONE 0x00 +#define NAN_CONN_MAP_WLAN_INFRA 0x01 +#define NAN_CONN_MAP_P2P_OPERATION 0x02 +#define NAN_CONN_MAP_WLAN_IBSS 0x04 +#define NAN_CONN_MAP_WLAN_MESH 0x08 +#define NAN_CONN_MAP_FURTHER_SVC_AVAIL 0x10 +#define NAN_CONN_MAP_WLAN_RANGING 0x20 +#define NAN_CONN_MAP_RESERVED 0x40 +#define NAN_CONN_MAP_WILDCARD 0x80 + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 channel; + A_UINT8 dwellTime; + A_UINT16 scanPeriod; +} tNanSocialChannelScanParams, *tpSocialChannelScanParams; + +#define NAN_POST_NAN_CONN_CAP_WFD 0x0001 +#define NAN_POST_NAN_CONN_CAP_WFDS 0x0002 +#define NAN_POST_NAN_CONN_CAP_TDLS 0x0004 +#define NAN_POST_NAN_CONN_CAP_WLAN_INFRA 0x0008 +#define NAN_POST_NAN_CONN_CAP_IBSS 0x0010 +#define NAN_POST_NAN_CONN_CAP_MESH 0x0020 +#define NAN_POST_NAN_CONN_CAP_RESERVED 0xFFC0 + +/* Post-NAN Connectivity Capabilities Transmit TLV */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT16 connCap; + A_UINT16 repeat:1; + A_UINT16 reserved:15; +} tNanPostNanConnCapsTxTlv, *tpNanPostNanConnCapsTxTlv; + +/* Post-NAN Connectivity Capabilities Receive TLV */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT16 connCap; + A_UINT16 reserved; +} tNanPostNanConnCapsRxTlv, *tpNanPostNanConnCapsRxTlv; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 availIntDuration:2; + + A_UINT8 mapId:4; + A_UINT8 reserved:2; +} tNanApiEntryCtrl; + +typedef enum +{ + NAN_FAM_AID_FIRST = 0, + NAN_FAM_AID_16TU = NAN_FAM_AID_FIRST, + NAN_FAM_AID_32TU, + NAN_FAM_AID_64TU, + NAN_FAM_AID_RESERVED, + NAN_FAM_AID_LAST = NAN_FAM_AID_RESERVED, + NAN_NUM_FAM_AID = NAN_FAM_AID_LAST +} tNanFamAid; + +/* + * Convenience types for the Availability Intervals Bitmap. Could do + * these as arrays of U8s too. They may or may not be useful... + */ +typedef A_UINT8 tNanAiBitmap64tu; +typedef A_UINT16 tNanAiBitmap32tu; +typedef A_UINT32 tNanAiBitmap16tu; + +/* + * Valid Operating Classes were derived from IEEE Std. 802.11-2012 Annex E + * Table E-4 Global Operating Classes and, filtered by channel, are: 81, 83, + * 84, 103, 114, 115, 116, 124, 125. (I think). + */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 opClass; + A_UINT8 channel; + A_UINT8 availIntBitmap[4]; +} tNanFurtherAvailabilityChan, *tpNanFurtherAvailabilityChan; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 numChan; + tNanApiEntryCtrl entryCtrl; + A_UINT8 pFaChan[1]; +} tNanFurtherAvailabilityMapAttrTlv, *tpNanFurtherAvailabilityMapAttrTlv; + +typedef enum +{ + NAN_CONN_TYPE_FIRST = 0, + NAN_CONN_TYPE_WLAN_INFRA = NAN_CONN_TYPE_FIRST, + NAN_CONN_TYPE_P2P_OPERATION, + NAN_CONN_TYPE_WLAN_IBSS, + NAN_CONN_TYPE_WLAN_MESH, + NAN_CONN_TYPE_FURTHER_SVC_AVAIL, + NAN_CONN_TYPE_WLAN_RANGING, + NAN_CONN_TYPE_LAST, + NAN_CONN_TYPE_RESERVED = NAN_CONN_TYPE_LAST, + NAN_CONN_TYPE_WILDCARD +} tNanConnType; + +/* Device Roles */ +typedef enum +{ + NAN_DEVICE_ROLE_FIRST = 0, + NAN_DEVICE_ROLE_WLAN_INFRA_FIRST = NAN_DEVICE_ROLE_FIRST, + NAN_DEVICE_ROLE_WLAN_AP = NAN_DEVICE_ROLE_WLAN_INFRA_FIRST, + NAN_DEVICE_ROLE_WLAN_STA, + NAN_DEVICE_ROLE_WLAN_INFRA_LAST, + NAN_DEVICE_ROLE_P2P_OPERATION_FIRST = NAN_DEVICE_ROLE_WLAN_INFRA_LAST, + NAN_DEVICE_ROLE_P2P_GROUP_OWNER = NAN_DEVICE_ROLE_P2P_OPERATION_FIRST, + NAN_DEVICE_ROLE_P2P_DEVICE, + NAN_DEVICE_ROLE_P2P_CLIENT, + NAN_DEVICE_ROLE_P2P_OPERATION_LAST, + NAN_DEVICE_ROLE_LAST = NAN_DEVICE_ROLE_P2P_OPERATION_LAST +} tNanDeviceRole; + +/* + * Post-NAN Discovery Attribute MAC Address Usage: + * + * Connection Type | Device Role | MAC Address Usage + * --------------------+-----------------+------------------------- + * WLAN Infrastructure | N/A | MSSID of the AP + * P2P Operation | P2P_Group Owner | P2P Group Owner's address + * P2P Operation | P2P Device | P2P Client's address + * WLAN IBSS | N/A | BSSID + * WLAN Mesh | N/A | BSSID + * Other | ??? | ??? + * + */ + +/* Post-NAN Discovery Attribute Transmit TLV. */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 connType; + A_UINT8 deviceRole; + A_UINT16 repeat:1; + A_UINT16 duration:2; + A_UINT16 reserved:13; + A_UINT8 availIntBitmap[4]; + /* + * TLVs: + * + * Required: WLAN Mesh ID (if connType is WLAN_MESH), + * MAC Address (if connType is WLAN Infra, P2P, IBSS, or Mesh) + */ + A_UINT8 ptlv[1]; +} tNanPostNanDiscoveryAttrTxTlv, tpNanPostNanDiscoveryAttrTxTlv; + +/* Post-NAN Discovery Attribute Receive TLV. */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 connType; + A_UINT8 deviceRole; + A_UINT16 duration:2; + A_UINT16 mapId:4; + A_UINT16 reserved:10; + A_UINT8 availIntBitmap[4]; + /* + * TLVs: + * + * Required: WLAN Mesh ID (if connType is WLAN_MESH), + * MAC Address (if connType is WLAN Infra, P2P, IBSS, or Mesh) + */ + A_UINT8 ptlv[1]; +} tNanPostNanDiscoveryAttrRxTlv, tpNanPostNanDiscoveryAttrRxTlv; + +/* NAN Vendor Specific Attribute Transmit/Receive TLV */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 rflag:1; /* Ignored for receive case. */ + A_UINT8 pbits:3; + A_UINT8 reserved:4; + A_UINT8 oui[3]; + + A_UINT8 vsaData[1]; +} tNanVsaTlv, *tpNanVsaTlv; + +/*NAN 2.0 - SDEA*/ +typedef struct +{ + A_UINT32 data_path_type:1; + A_UINT32 reserved:31; +} tNanDataPathParamsTlv, *tpNanDataPathParamsTlv; + +/* NAN 2.0 - SDEA CTRL */ +typedef struct +{ + A_UINT32 fsd_required:1; + A_UINT32 fsd_with_gas:1; + A_UINT32 data_path_required:1; + A_UINT32 data_path_type:1; + A_UINT32 multicast_type:1; + A_UINT32 qos_required:1; + A_UINT32 security_required:1; + A_UINT32 ranging_required:1; + A_UINT32 range_limit_present:1; + A_UINT32 service_update_ind_present:1; + A_UINT32 reserved1:6; + // Above 16 bits are used to send Over The Air as part of SDEA control + // Below 16 bits are used for internal purposes + A_UINT32 range_report_needed:1; + A_UINT32 reserved2:15; +} tNanSdeaCtrlParamsTlv, *tpNanSdeaCtrlParamsTlv; + +typedef struct +{ + A_UINT32 data_path_enabled_in_match:1; + A_UINT32 reserved:31; +} tNanDataPathParmsEnabledMatchTlv, *tpNanDataPathParmsEnabledMatchTlv; + +/* NAN Data responder mode */ +typedef enum +{ + NAN_DATA_RSPNR_MODE_AUTO = 0, + NAN_DATA_RSPNR_MODE_ACCEPT = 1, + NAN_DATA_RSPNR_MODE_REJECT = 2, + NAN_DATA_RSPNR_MODE_COUNTER = 3, + NAN_DATA_RSPNR_MODE_COUNTER_NO_CHANNEL_CHANGE = 4, +} tNanDataRspnrMode; + +/** + * NDC respond mode + */ +typedef enum +{ + NAN_NDC_MODE_AUTO = 0, + NAN_NDC_MODE_COUNTER = 1, +} tNanNdcRspMode; + +/** + * Nan20 accept policy + */ +typedef enum { + NAN20_ACCEPT_POLICY_NONE = 0, + NAN20_ACCEPT_POLICY_ALL = 1, +} tNan20AcceptPolicy; + +/* NAN Cipher Suites Shared Key - to be deprecated */ +typedef enum { + NCS_SK_128 = 1, + NCS_SK_256 = 2, + NCS_SK_ALL = 3, +} NanCSID; + +/* New Host to use below to send CSID entries as a bitmap */ +typedef enum { + NAN_NCS_F_SK_128 = 0x00001, + NAN_NCS_F_SK_256 = 0x00002, + NAN_NCS_F_PK_2WDH_128 = 0x00004, + NAN_NCS_F_PK_2WDH_256 = 0x00008, + NAN_NCS_F_GTK_CCMP_128 = 0x00010, + NAN_NCS_F_GTK_GCMP_256 = 0x00020, + NAN_NCS_F_PK_PASN_128 = 0x00040, + NAN_NCS_F_PK_PASN_256 = 0x00080, +} NanCSIDBits; + +/** + * Security configuration rules between Upper layer and NAN target + * CSID and PMK are optional parameters + * Target usese the device capability CSID if Service layer provide. + * + * For these security parameter host will act as pass through + * Here are the rules for security parametrs between upper layer and target + * + * NDP Request + * 1. 4 byte CSID + * 2. 32 byte PMK + * 3. PASSPHRASE >=8 and <= 63 byte + * 4. Service Name (<=255) + * + * NDP Responder Request + * 1. 4 byte CSID + * 2. 32 byte PMK + * 3. PASSPHRASE >=8 and <= 63 byte + * 4. Service Name (<=255) + * + * NDP Indication + * 1. 4 byte CSID + * 2. 256 byte SCID buffer + */ + +/* NAN Cipher Version */ +typedef enum { + NAN_CIPHER_128 = 0, /* 0: 128-bit NIK, 64-bit Nonce, 64-bit Tag, HMAC-SHA-256 */ + /* 1 -7 reserved */ +} NanCipherVersion; + +/* NAN Group MFP support */ +#define NAN_GTKSA_IGTKSA_BIGTKSA_NOT_SUPPORTED 0x00 +#define NAN_GTKSA_IGTKSA_SUPPORTED_BIGTKSA_NOT_SUPPORTED 0x01 +#define NAN_GTKSA_IGTKSA_BIGTKSA_SUPPORTED 0x02 + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 inner_threshold; + A_UINT32 outer_threshold; +} t_nan_geo_fence_descriptor, *tp_nan_geo_fence_descriptor; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 range_resolution; + A_UINT32 range_interval; + A_UINT32 ranging_indication_event; + t_nan_geo_fence_descriptor geo_gence_threshold; + +} t_nan_range_config_params, *tp_nan_range_config_params; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 range_measurement; + A_UINT32 event_type; + A_UINT32 range_id; +} t_nan_range_result_params, *tp_nan_range_result_params; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* TLV Required: + MANDATORY + 1. MAC_ADDRESS + 2. t_nan_range_result_params + */ + A_UINT8 ptlv[1]; +} t_nan_range_result_ind, *tp_nan_range_result_ind; + +/* This is the TLV used to trigger ranging requests*/ +typedef PACKED_PRE struct PACKED_POST +{ + wlan_nan_mac_addr range_mac_addr; + A_UINT32 range_id; // Match handle in match_ind, publish_id in result ind + A_UINT32 ranging_accept:1; + A_UINT32 ranging_reject:1; + A_UINT32 ranging_cancel:1; + A_UINT32 reserved:29; +} t_nan_range_req_msg, *tp_nan_range_req_msg; + +typedef PACKED_PRE struct PACKED_POST +{ + wlan_nan_mac_addr range_mac_addr; + A_UINT32 range_id; // This will publish_id in case of receiving publish. +} t_nan_range_req_recvd_msg,*tp_nan_range_req_recvd_msg; + +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /*TLV Required + 1. t_nan_range_req_recvd_msg + */ + A_UINT8 ptlv[1]; +}t_nan_range_req_ind, *tp_nan_range_req_ind; + +/************************** Test Mode ***************************/ + +typedef PACKED_PRE struct PACKED_POST +{ + tNanMsgHeader nanHeader; + /* + * Excludes TLVs + * + * Optional: Nan Availability + * + */ + A_UINT8 ptlv[1]; +} tNanTestModeReqMsg, *tpNanTestModeReqMsg; + +typedef enum { + NAN_DATA_PATH_M4_RESPONSE_ACCEPT = 1, + NAN_DATA_PATH_M4_RESPONSE_REJECT = 2, + NAN_DATA_PATH_M4_RESPONSE_BAD_MIC = 3 +} tNdpM4ResponseType; + +typedef enum { + NAN_SCHED_VALID = 0, + NAN_SCHED_INVALID_BAD_FA = 1, + NAN_SCHED_INVALID_BAD_NDC = 2, + NAN_SCHED_INVALID_BAD_IMMU = 3, +} NanSchedType; + +typedef enum { + NMF_CLEAR_DISABLE = 0, + NMF_CLEAR_ENABLE = 1, +} NMFClearEnable; + +typedef enum +{ + NAN_TEST_MODE_CMD_NAN_AVAILABILITY = 1, + NAN_TEST_MODE_CMD_NDP_INCLUDE_IMMUTABLE = 2, + NAN_TEST_MODE_CMD_NDP_AVOID_CHANNEL = 3, + NAN_TEST_MODE_CMD_NAN_SUPPORTED_BANDS = 4, + NAN_TEST_MODE_CMD_AUTO_RESPONDER_MODE = 5, + NAN_TEST_MODE_CMD_M4_RESPONSE_TYPE = 6, + NAN_TEST_MODE_CMD_NAN_SCHED_TYPE =7, + NAN_TEST_MODE_CMD_NMF_CLEAR_CONFIG =8, + NAN_TEST_MODE_CMD_NAN_SCHED_UPDATE_ULW_NOTIFY = 9, + NAN_TEST_MODE_CMD_NAN_SCHED_UPDATE_NDL_NEGOTIATE = 10, + NAN_TEST_MODE_CMD_NAN_SCHED_UPDATE_NDL_NOTIFY = 11, + NAN_TEST_MODE_CMD_NAN_AVAILABILITY_MAP_ORDER = 12, + NAN_TEST_MODE_CMD_NDL_QOS_TEST = 13, //CONFIG_QoS + NAN_TEST_MODE_CMD_DEVICE_TYPE = 14, + NAN_TEST_MODE_CMD_DISABLE_NDPE = 15, + NAN_TEST_MODE_CMD_ENABLE_NDP = 16, + NAN_TEST_MODE_CMD_DISABLE_IPV6_LINK_LOCAL = 17, + NAN_TEST_MODE_CMD_TRANSPORT_IP_PARAM = 18, + NAN_TEST_MODE_CMD_S3_ATTR_PARAMS = 19, + NAN_TEST_MODE_CMD_SCHED_UPDATE_S3_NOTIFY = 20, + NAN_TEST_MODE_CMD_PMK = 21, +} tNanTestModeCmd; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 cmd; + /* Followed by command data content (Aligned to A_UINT32 size) + * + * command: NAN_TEST_MODE_CMD_NAN_AVAILABILITY + * content: NAN Avaiability attribute blob + * + * command: NAN_TEST_MODE_CMD_NDP_INCLUDE_IMMUTABLE + * content: A_UINT32 value (0 - Ignore 1 - Include immuatable, 2 - Don't include immutable) + * + * command: NAN_TEST_MODE_CMD_NDP_AVOID_CHANNEL + * content: A_UINT32 channel_frequency; (0 - Ignore) + * + * command: NAN_TEST_MODE_CMD_NAN_SCHED_TYPE + * content: A_UINT32 value; (0 - valid schedule(default) 1 - Bad FA, 2 send bad NDC, 3 - Bad immuatable) + * + * command: NAN_TEST_MODE_CMD_NMF_CLEAR_CONFIG + * content: A_UINT32 value; (0 - Send NMF Encrypted(default), 1 - Send Clear NMF) + * + * command: NAN_TEST_MODE_CMD_NAN_SCHED_UPDATE_ULW_NOTIFY + * content: A_UINT32 channelAvailabilityPresent; (0 - channel availability not present, 1 - channel availability present) + * content: A_UINT32 channelAvailabilityValue; (0 - channel not available, 1 - channel available) + * + * command: NAN_TEST_MODE_CMD_DEVICE_TYPE + * content: A_UINT32 deviceType; (0 - ignore, 1 - TestBed, 2 - DUT) + * + * command: NAN_TEST_MODE_CMD_DISABLE_NDPE + * content: A_UINT32 disableNDPE; (0 - Send NDPE based on NDPE parameters present, 1 - TestBed(Dont include the NDPE attribute)) + * + * command: NAN_TEST_MODE_CMD_ENABLE_NDP + * content: A_UINT32 enableNDP; (0 - Dont send the NDP attribute if we send the NDPE attribute, + * (1 - TestBed(Include the NDP attribute irrespective of the NDP attribute present or not)) + * + * command: NAN_TEST_MODE_CMD_DISABLE_IPV6_LINK_LOCAL + * content: A_UINT32 disableIPv6_linklocal; (0 - Send IPv6 link local based on IPv6 support, 1 - TestBed(Dont include the IPv6 TLV list)) + * + * command: NAN_TEST_MODE_CMD_TRANSPORT_IP_PARAM + * content: struct tNdpTransIpParams + * + * command: NAN_TEST_MODE_CMD_S3_ATTR_PARAMS + * content: struct tNanS3Params + * + * command: NAN_TEST_MODE_CMD_SCHED_UPDATE_S3_NOTIFY + * content: struct tNanS3Params + */ + A_UINT8 data[1]; +} t_nan_test_mode_cmd_params; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 dfs_master:1; + A_UINT32 ext_key_id:1; + A_UINT32 simu_ndp_data_recept:1; + A_UINT32 ndpe_attr_supp:1; + A_UINT32 reserved:28; +} tNanDevCapAttrCap, *tpNanDevCapAttrCap; + +/***************************************************************/ + +#define NAN_MSG_IPV6_INTF_ADDR_LEN 16 + +typedef struct { + /* Presence of ipv6_intf_addr */ + A_UINT32 ipv6_addr_present; + /* Presence of transport Port */ + A_UINT32 trans_port_present; + /* Presence of transport Protocol */ + A_UINT32 trans_proto_present; + /* ipv6 Interface address */ + A_UINT8 ipv6_intf_addr[NAN_MSG_IPV6_INTF_ADDR_LEN]; + /* Transport Port */ + A_UINT32 transport_port; + /* Transport Protocol */ + A_UINT32 transport_protocol; +} tNdpTransIpParams; + +typedef enum { + NAN_BOOTSTRAPPING_METHOD_PIN_CODE_DISPLAY = 1, + NAN_BOOTSTRAPPING_METHOD_PASSPHRASE_DISPLAY = 2, + NAN_BOOTSTRAPPING_METHOD_QR_CODE_DISPLAY = 3, + NAN_BOOTSTRAPPING_METHOD_NFC_TAG = 4, + NAN_BOOTSTRAPPING_METHOD_KEYPAD_PIN_CODE = 5, + NAN_BOOTSTRAPPING_METHOD_KEYPAD_PASSPHRASE = 6, + NAN_BOOTSTRAPPING_METHOD_QR_CODE_SCAN = 7, + NAN_BOOTSTRAPPING_METHOD_NFC_READER = 8, + /* Bit 9 to 13 reserved */ + NAN_BOOTSTRAPPING_METHOD_SERVICE_MANAGED_BOOTSTRAPPING = 14, + NAN_BOOTSTRAPPING_METHOD_BOOTSTRAPPING_HANDSHAKE_SKIPPED = 15, +} tNaNBootstrappingMethod; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 pairing_setup_required:1; + A_UINT32 npk_nik_caching_required:1; + A_UINT32 bootstapping_method_bitmap:16; + A_UINT32 reserved:14; +} tNanPairingConfigurationParams, *tpNanPairingConfigurationParams; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 pairing_setup_required:1; + A_UINT32 npk_nik_caching_required:1; + A_UINT32 bootstapping_method_bitmap:16; + A_UINT32 reserved:14; +} tNanPairingParamsMatchTlv, *tpNanPairingParamsMatchTlv; + +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT8 type; + A_UINT8 status; + A_UINT8 dialog_token; + A_UINT8 reason_code; + A_UINT16 bootstapping_method_bitmap; + A_UINT16 comeback_after; +} tNanBootstrappingParams, *tpNanBootstrappingParams; + +/* NAN Identity Resolution Params */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 cipher_version:8; + A_UINT32 reserved:24; +} tNanIdentityResolutionParams; + +/* NAN Identity Resolution Indication : HAL -> Target */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanIdentityResolutionParams identityresolutionParams; + /* + * Excludes TLVs + * + * Required: Nounce, Tag + */ + A_UINT8 ptlv[1]; +} tNanIdentityResolutionIndMsg, *tpNanIdentityResolutionIndMsg; + +/* NAN pairing roles */ +#define NAN_PAIRING_ROLE_INITIATOR 0 +#define NAN_PAIRING_ROLE_RESPONDER 1 + +/* NAN Pairing Request Params */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 pairing_handle; + A_UINT32 pairing_role:1; + A_UINT32 pairing_verification:1; + A_UINT32 cipher_suite:8; + A_UINT32 reserved:22; + A_UINT32 reserved2; + /* NOTE: + * This struct cannot be expanded, due to backwards-compatibility + * requirements. + */ +} tNanPairingIndParams; + +/* NAN Pairing Indication : HAL -> Target */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + tNanPairingIndParams pairingIndParams; + A_UINT32 reserved[2]; + /* TLVs Required: + * MANDATORY + * 1. MAC_ADDRESS (Peer NMI) + * 2. NM_TK (The TK derived from pairing) + */ + A_UINT8 ptlv[1]; + /* NOTE: + * This struct cannot be expanded, due to the above variable-length array. + */ +} tNanPairingIndMsg, *tpNanPairingIndMsg; + +/* NAN UnPairing Indication : HAL -> Target */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT32 pairing_handle; +} tNanUnPairingIndMsg, *tpNanUnPairingIndMsg; + +/* NAN OEM REQ */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + /* + * TLVs: + * + * Required: OEM request in the form of opaque data blob. + */ + A_UINT8 ptlv[1]; + /* NOTE: + * This struct cannot be expanded, due to the above variable-length array. + */ +} tNanOemReqMsg, *tpNanOemReqMsg; + +/* NAN OEM RSP */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; + A_UINT16 value; + /* + * TLVs: + * + * Required: OEM response in the form of opaque data blob. + */ + A_UINT8 ptlv[1]; + /* NOTE: + * This struct cannot be expanded, due to the above variable-length array. + */ +} tNanOemRspMsg, *tpNanOemRspMsg; + +/* NAN OEM IND */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 reserved[2]; + /* + * TLVs: + * + * Required: OEM indication in the form of opaque data blob. + */ + A_UINT8 ptlv[1]; + /* NOTE: + * This struct cannot be expanded, due to the above variable-length array. + */ +} tNanOemIndMsg, *tpNanOemIndMsg; + +typedef struct { + A_UINT32 entry_control:8; + A_UINT32 time_bitmap_control:16; + A_UINT32 reserved:8; + A_UINT32 time_bitmap; +} tNanS3Params, *tpNanS3Params; + +#define NAN_MAX_GROUP_KEY_LEN 32 +#define NAN_MAX_GROUP_KEY_RSC_LEN 6 + +/* NAN Group Key params */ +typedef PACKED_PRE struct PACKED_POST +{ + A_UINT32 key_cipher:16; + A_UINT32 key_idx:8; + A_UINT32 key_len:8; + A_UINT8 key_data[NAN_MAX_GROUP_KEY_LEN]; + A_UINT8 key_rsc[NAN_MAX_GROUP_KEY_RSC_LEN]; +} tNanGroupKeyParamsTlv, *tpNanGroupKeyParamsTlv; + +/* NAN Group Key Install Req Msg */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + + /* + * TLVs + * + * Required: MAC address, one or more tNanGroupKeyParamsTlv. + */ + A_UINT8 ptlv[1]; + /* NOTE: + * This struct cannot be expanded, due to the above variable-length array. + */ +} tNanGroupKeyInstallReqMsg, *tpNanGroupKeyInstallReqMsg; + +/* NAN Group Key Install Rsp Msg */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; /* tNanStatusType */ + A_UINT16 value; +} tNanGroupKeyInstallRspMsg, *tpNanGroupKeyInstallRspMsg; + +/* NAN Group Key TX PN fetch Req Msg */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT32 key_idx; +} tNanTxPnReqMsg, *tpNanTxPnReqMsg; + +/* NAN Group Key TX PN fetch Rsp Msg */ +typedef PACKED_PRE struct PACKED_POST +{ + NAN_PLATFORM_MSG_HEADER halHeader; + tNanMsgHeader nanHeader; + A_UINT16 status; /* tNanStatusType */ + A_UINT16 value; + A_UINT8 key_rsc[NAN_MAX_GROUP_KEY_RSC_LEN]; +} tNanTxPnRspMsg, *tpNanTxPnRspMsg; + + +#endif /* WLAN_NAN_MSG_H */ diff --git a/fw/wlan_nan_platform.h b/fw/wlan_nan_platform.h new file mode 100644 index 000000000000..9a201f53aed3 --- /dev/null +++ b/fw/wlan_nan_platform.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: ISC + */ + +#ifndef _WLAN_NAN_PLATFORM_H_ +#define _WLAN_NAN_PLATFORM_H_ + +typedef struct +{ +}NAN_PLATFORM_MSG_HEADER; + +#define WLAN_NAN_MSG_COMMON_HEADER_V2 + +#endif /* _WLAN_NAN_PLATFORM_H_ */ From 5c14792884110e51c39cb584ef3ef942d8c0609d Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 24 Aug 2024 12:01:43 -0700 Subject: [PATCH 14/22] fw-api: CL 27465688 - update fw common interface files Change-Id: I5f96310351cc52bd962eec2761d0d324df2ec101 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 12 ++++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index bb80605f232e..b2a8a421cade 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -5392,6 +5392,12 @@ typedef enum { WMI_HOST_BAND_CAP_6GHZ = 0x04, } WMI_HOST_BAND_CAP; +typedef enum { + WLAN_CONNECT_EXT_FEATURE_RSNO = 0, + + NUM_WLAN_CONNECT_EXT_FEATURES /* keep last */ +} wlan_connect_ext_features; + /* HW features supported info */ /* enum WMI_WIFI_STANDARD are possible values for WiFi standard bitfield */ #define WMI_GET_WIFI_STANDARD(var, feature_bitmap) \ @@ -18936,6 +18942,12 @@ typedef enum { /* Update TWT_UNAVAIL_MODE */ WMI_VDEV_PARAM_TWT_UNAVAIL_MODE, /* 0xC6 */ + /* + * Additional features supported for connection. + * Value is from enum wlan_connect_ext_features + */ + WMI_VDEV_PARAM_CONNECT_EXT_FEATURES, /* 0xC7 */ + /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === * The below vdev param types are used for prototyping, and are diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 7df73f814166..22ab383bbab7 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1514 +#define __WMI_REVISION_ 1515 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 31e205a87e76b5f25a1732b55e51c5bc9be246dc Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 28 Aug 2024 18:01:40 -0700 Subject: [PATCH 15/22] fw-api: CL 27497193 - update fw common interface files Change-Id: I37c824b34e71b50fa8e711e2f4f48813d5596a6a CRs-Fixed: 3830439 --- fw/wmi_unified.h | 22 ++++++++++++++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index b2a8a421cade..1e31a66f1773 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -34020,6 +34020,28 @@ typedef enum { * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power OFDMA */ + BIOS_PARAM_TYPE_PPAG_DATA, + /* + * BIOS_PARAM_TYPE_PPAG_DATA Structure has 12 bytes as below, + * antennaGain value unit is 0.25 dBm. + * If Enable flag is 0, FW will not use PPAG antennaGain value of bios. + * + * A_UINT8 version + * A_UINT8 enableFlag + * A_INT8 antennaGain[GAIN_BANDS]; // 9bytes + * A_UINT8 reserved + * ==================== A_INT8 antennaGain[GAIN_BANDS]; ================= + * A_INT8 atennaGain for [2400, 2483) + * A_INT8 atennaGain for [5150, 5250) + * A_INT8 atennaGain for [5250, 5350) + * A_INT8 atennaGain for [5470, 5725) + * A_INT8 atennaGain for [5725, 5895) + * A_INT8 atennaGain for [5925, 6425) + * A_INT8 atennaGain for [6425, 6525) + * A_INT8 atennaGain for [6525, 6875) + * A_INT8 atennaGain for [6875, 7125) + * ============================================================== + */ BIOS_PARAM_TYPE_MAX, } bios_param_type_e; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 22ab383bbab7..f09f63716521 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1515 +#define __WMI_REVISION_ 1516 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From ba522f048c0aeec49be301e37dc8fe72ff6e78c2 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 28 Aug 2024 18:03:07 -0700 Subject: [PATCH 16/22] fw-api: CL 27510301 - update fw common interface files Change-Id: I69bbd0ba16b4fa7c5cf01728fed4e496646d1775 CRs-Fixed: 3830439 --- fw/wmi_tlv_defs.h | 4 +++- fw/wmi_unified.h | 19 +++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 024814e85140..335352c4feb6 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1449,6 +1449,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_mlo_peer_tid_to_link_map_event_fixed_param, WMITLV_TAG_STRUC_wmi_usd_service_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_usd_service_event_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_create_wfdr2_mode_params, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -3557,7 +3558,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID); #define WMITLV_TABLE_WMI_VDEV_CREATE_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param, wmi_vdev_create_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_txrx_streams, cfg_txrx_streams, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_create_mlo_params, mlo_params, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_create_mlo_params, mlo_params, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_create_wfdr2_mode_params, wfdr2_mode, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_CREATE_CMDID); diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 1e31a66f1773..77adbbc82f67 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -16687,6 +16687,9 @@ typedef struct { * wmi_vdev_create_mlo_params mlo_params[0,1]; * optional TLV, only present for MLO vdev; * if the vdev is not MLO the array length should be 0. + * wmi_vdev_create_wfdr2_mode_params wfdr2_mode[0,1]; + * picked as per WMI_VDEV_CREATE_WFDR2_MODES + * to enable/disable NOA */ } wmi_vdev_create_cmd_fixed_param; @@ -16800,6 +16803,22 @@ typedef struct { wmi_mac_addr mld_macaddr; } wmi_vdev_create_mlo_params; +/* + * this TLV structure is used to pass WFD R2 parameters on vdev create + * to enable/disable NOA + */ +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; */ + A_UINT32 wfdr2_mode; /** WFD R2 modes as per WMI_VDEV_CREATE_WFDR2_MODES */ +} wmi_vdev_create_wfdr2_mode_params; + +/** VDEV create WFD R2 modes */ +typedef enum { + WMI_VDEV_CREATE_WFDR2_MODE = 0, + WMI_VDEV_CREATE_WFDR2_PCC_MODE = 1, +} WMI_VDEV_CREATE_WFDR2_MODES; + + /* this TLV structure used for pass mlo parameters on vdev start*/ typedef struct { A_UINT32 tlv_header; /** TLV tag and len; */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index f09f63716521..498e5032fb16 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1516 +#define __WMI_REVISION_ 1517 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 0da0a509649efa1c5436e60d3c44023e1508866b Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 28 Aug 2024 18:04:34 -0700 Subject: [PATCH 17/22] fw-api: CL 27518685 - update fw common interface files Change-Id: I0256504a9b399403d9a9b7a5a8c2a30547b046a0 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 1 + fw/wmi_version.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 77adbbc82f67..d16032ddaa70 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -5377,6 +5377,7 @@ typedef enum { WMI_VENDOR1_REQ1_VERSION_3_40 = 4, WMI_VENDOR1_REQ1_VERSION_4_00 = 5, WMI_VENDOR1_REQ1_VERSION_4_10 = 6, + WMI_VENDOR1_REQ1_VERSION_4_20 = 7, } WMI_VENDOR1_REQ1_VERSION; typedef enum { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 498e5032fb16..f5be0fb023bc 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1517 +#define __WMI_REVISION_ 1518 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 594f4438ce0738aa8c2faa1c3ea5f1b411157d26 Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 2 Sep 2024 06:01:48 -0700 Subject: [PATCH 18/22] fw-api: CL 27552754 - update fw common interface files Change-Id: If65c3c73f72d7228e9b513dd4d290fdc75f99e12 CRs-Fixed: 3830439 --- fw/wmi_services.h | 1 + fw/wmi_unified.h | 1 + fw/wmi_version.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 7ce81176e6f1..48121326a076 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -684,6 +684,7 @@ typedef enum { WMI_SERVICE_IS_TARGET_IPA = 425, WMI_SERVICE_THERM_THROT_TX_CHAIN_MASK = 426, /*FW supports thermal throttling dynamic Tx ChainMask update */ WMI_SERVICE_SPLIT_PHY_PDEV_SUSPEND_RESUME_SUPPORT = 427, /* Indicates FW support pdev suspend/resume in split-phy radio */ + WMI_SERVICE_USD_SUPPORT = 428, /* Indicates FW supports Unsynchronized Service Discovery */ WMI_MAX_EXT2_SERVICE diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index d16032ddaa70..85ca462006cd 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -38126,6 +38126,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID); WMI_RETURN_STRING(WMI_SET_AP_SUSPEND_RESUME_CMDID); WMI_RETURN_STRING(WMI_P2P_GO_DFS_AP_CONFIG_CMDID); + WMI_RETURN_STRING(WMI_USD_SERVICE_CMDID); } return (A_UINT8 *) "Invalid WMI cmd"; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index f5be0fb023bc..b9dc5eae1c6a 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1518 +#define __WMI_REVISION_ 1519 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 646ce46276f622d53353386466c233c858cac236 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 6 Sep 2024 07:46:24 -0700 Subject: [PATCH 19/22] fw-api: CL 27577821 - update fw common interface files Change-Id: I5882e46bad5823fbb2f495e198a4cf8a856c0af7 CRs-Fixed: 3830439 --- fw/wmi_unified.h | 9 +++++++++ fw/wmi_version.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 85ca462006cd..ad108db2b5c0 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -25897,6 +25897,15 @@ typedef enum */ WMI_VENDOR_OUI_ACTION_DISABLE_AUXL = 15, + /* + * Used to downgrade to 2 link ML connection for specific AP matchs OUI. + * This is the preferred name, since it specifies that the downgraded + * number of links is 2. + */ + WMI_VENDOR_OUI_ACTION_RESTRICT_MAX_2_MLO_LINKS = 16, + /* alias for the above (less suitable, since it is less precise) */ + WMI_VENDOR_OUI_ACTION_RESTRICT_MAX_MLO_LINKS = + WMI_VENDOR_OUI_ACTION_RESTRICT_MAX_2_MLO_LINKS, /* Add any action before this line */ WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID diff --git a/fw/wmi_version.h b/fw/wmi_version.h index b9dc5eae1c6a..4a0553fa8530 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1519 +#define __WMI_REVISION_ 1520 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 916af9ba1f1f6517f323aabbf2e737f79e91882b Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 6 Sep 2024 07:47:58 -0700 Subject: [PATCH 20/22] fw-api: CL 27586781 - update fw common interface files Change-Id: I3c80f4314e19ea6f3dfe970883b7866bf94e604a CRs-Fixed: 3830439 --- fw/wmi_tlv_defs.h | 7 +++++++ fw/wmi_unified.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++- fw/wmi_version.h | 2 +- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 335352c4feb6..161bb7c6f756 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1450,6 +1450,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_usd_service_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_usd_service_event_fixed_param, WMITLV_TAG_STRUC_wmi_vdev_create_wfdr2_mode_params, + WMITLV_TAG_STRUC_wmi_pdev_power_boost_event_fixed_param, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -2332,6 +2333,7 @@ typedef enum { OP(WMI_MLO_TLT_SELECTION_FOR_TID_SPRAY_EVENTID) \ OP(WMI_MLO_PEER_TID_TO_LINK_MAP_EVENTID) \ OP(WMI_USD_SERVICE_EVENTID) \ + OP(WMI_PDEV_POWER_BOOST_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -7734,6 +7736,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MLO_PEER_TID_TO_LINK_MAP_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_usd_service_event_fixed_param, wmi_usd_service_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_USD_SERVICE_EVENTID); +/* WMI Event used to send Power Boost status update */ +#define WMITLV_TABLE_WMI_PDEV_POWER_BOOST_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_power_boost_event_fixed_param, wmi_pdev_power_boost_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_POWER_BOOST_EVENTID); + #ifdef __cplusplus } diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index ad108db2b5c0..b3d6e22887ac 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1878,6 +1878,10 @@ typedef enum { /* Event to indicate xLNA is enabled */ WMI_PDEV_ENABLE_XLNA_EVENTID, + /* Event to indicate ANN Power Boost update status from Target */ + WMI_PDEV_POWER_BOOST_EVENTID, + + /* VDEV specific events */ /** VDEV started event in response to VDEV_START request */ WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV), @@ -3525,6 +3529,11 @@ typedef struct { #define WMI_TARGET_CAP_MPDU_STATS_PER_TX_NSS_SUPPORT_SET(target_cap_flags, value)\ WMI_SET_BITS(target_cap_flags, 16, 1, value) +#define WMI_TARGET_CAP_POWER_BOOST_SUPPORT_GET(target_cap_flags) \ + WMI_GET_BITS(target_cap_flags, 17, 1) +#define WMI_TARGET_CAP_POWER_BOOST_SUPPORT_SET(target_cap_flags) \ + WMI_SET_BITS(target_cap_flags, 17, 1, value) + /* * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs @@ -3672,7 +3681,8 @@ typedef struct { * Bit 14 - Support for ML monitor mode * Bit 15 - Support for Qdata Tx LCE filter installation * Bit 16 - Support for MPDU stats per tx Nss capability - * Bits 31:17 - Reserved + * Bit 17 - Support for Power Boost capability + * Bits 31:18 - Reserved */ A_UINT32 target_cap_flags; @@ -48969,6 +48979,47 @@ typedef struct { A_UINT32 vdev_id; } wmi_mlo_peer_tid_to_link_map_event_fixed_param; +typedef enum { + WMI_EVENT_POWER_BOOST_START_TRAINING = 0, + WMI_EVENT_POWER_BOOST_ABORT, + WMI_EVENT_POWER_BOOST_COMPLETE, + + WMI_EVENT_POWER_BOOST_MAX +} wmi_pdev_power_boost_event_type; + +typedef struct { + /* WMITLV_TAG_STRUC_wmi_pdev_power_boost_event_fixed_param */ + A_UINT32 tlv_header; + /* to identify for which pdev the event is sent */ + A_UINT32 pdev_id; + /* enum wmi_pdev_power_boost_event_type to update the power boost status */ + A_UINT32 status; + /* training_stage: + * The training stage such as 1st, 2nd for which the I/Q samples are + * updated in DDR. + */ + A_UINT32 training_stage; + /* MCS value for which the current DPD training has been done */ + A_UINT32 mcs; + /* bandwidth: + * Bandwidth value in Mhz for which the current DPD training has been done + */ + A_UINT32 bandwidth; + /* current target temperature while training the DPD packet in degree C */ + A_INT32 temperature_degreeC; + /* primary channel frequency in MHz for which DPD training is done */ + A_UINT32 primary_chan_mhz; + /** Center frequency 1 in MHz */ + A_UINT32 band_center_freq1; + /** Center frequency 2 in MHz - valid only for 11ac/VHT 80+80 mode */ + A_UINT32 band_center_freq2; + /* phy_mode: + * PHY mode as listed by enum WLAN_PHY_MODE, for which the current DPD + * training has been done + */ + A_UINT32 phy_mode; +} wmi_pdev_power_boost_event_fixed_param; + /* ADD NEW DEFS HERE */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 4a0553fa8530..201e4f2fa8a8 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1520 +#define __WMI_REVISION_ 1521 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From f3ad952f359a6feb23100e2573c97b7705707cb9 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 7 Sep 2024 18:01:52 -0700 Subject: [PATCH 21/22] fw-api: CL 27594770 - update fw common interface files Change-Id: Iaa8f2582baa0464b62e4ef78aaa2a38b84d6e9d8 CRs-Fixed: 3830439 --- fw/wmi_services.h | 1 + fw/wmi_unified.h | 2 ++ fw/wmi_version.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 48121326a076..75988a3d05a8 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -685,6 +685,7 @@ typedef enum { WMI_SERVICE_THERM_THROT_TX_CHAIN_MASK = 426, /*FW supports thermal throttling dynamic Tx ChainMask update */ WMI_SERVICE_SPLIT_PHY_PDEV_SUSPEND_RESUME_SUPPORT = 427, /* Indicates FW support pdev suspend/resume in split-phy radio */ WMI_SERVICE_USD_SUPPORT = 428, /* Indicates FW supports Unsynchronized Service Discovery */ + WMI_SERVICE_THERM_THROT_5_LEVELS = 429, /* Indicates FW support 5 thermal throttling levels */ WMI_MAX_EXT2_SERVICE diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index b3d6e22887ac..16f7b5d56549 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -37188,6 +37188,8 @@ typedef struct { A_UINT32 pout_reduction_25db; /* tx chain mask: Chain mask to apply based on the temp level */ A_UINT32 tx_chain_mask; + /* duty cycle in ms for this level */ + A_UINT32 duty_cycle; } wmi_therm_throt_level_config_info; typedef enum { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 201e4f2fa8a8..929ac5fa6ce6 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1521 +#define __WMI_REVISION_ 1522 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 220284b6fdde4296024ea323be23bcc87c78c715 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 11 Sep 2024 18:01:36 -0700 Subject: [PATCH 22/22] fw-api: CL 27618422 - update fw common interface files Change-Id: If17803ee2bb947a45850ae8eb7a9843ab680add3 CRs-Fixed: 3830439 --- fw/wmi_services.h | 1 + fw/wmi_unified.h | 1 + fw/wmi_version.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 75988a3d05a8..c5d5cb9b6ac6 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -686,6 +686,7 @@ typedef enum { WMI_SERVICE_SPLIT_PHY_PDEV_SUSPEND_RESUME_SUPPORT = 427, /* Indicates FW support pdev suspend/resume in split-phy radio */ WMI_SERVICE_USD_SUPPORT = 428, /* Indicates FW supports Unsynchronized Service Discovery */ WMI_SERVICE_THERM_THROT_5_LEVELS = 429, /* Indicates FW support 5 thermal throttling levels */ + WMI_SERVICE_PROTECTED_TWT = 430, /* Indicates FW supports protected TWT operation */ WMI_MAX_EXT2_SERVICE diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 16f7b5d56549..e1e2d982ecd3 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -21285,6 +21285,7 @@ typedef struct { #define WMI_PEER_EXT_HE_CAPS_6GHZ_VALID 0x00000008 /* param he_caps_6ghz is valid or not */ #define WMI_PEER_EXT_IS_QUALCOMM_NODE 0x00000010 /* Indicates if the peer connecting is a qualcomm node */ #define WMI_PEER_EXT_IS_MESH_NODE 0x00000020 /* Indicates if the peer connecting is a mesh node */ +#define WMI_PEER_EXT_PROTECTED_TWT 0x00000040 /* Protected TWT operation Support field in Extended RSN Capabilities element */ #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000 /** diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 929ac5fa6ce6..7d27c70b84a0 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1522 +#define __WMI_REVISION_ 1523 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work