qcacmn: Changes for Draft 3.0

Make the HECAP and HEOP changes for 11ax Draft3.0.
Draft2.0 support can still be enabled by unsetting
SUPPORT_11AX_D3 in config.unified.wlan.profile.

Change-Id: I0c0fd885a43b672baca61011b75a51526481b1ee
CRs-fixed: 2294235
diff --git a/target_if/init_deinit/inc/service_ready_param.h b/target_if/init_deinit/inc/service_ready_param.h
index 2f4f032..7c284d8 100644
--- a/target_if/init_deinit/inc/service_ready_param.h
+++ b/target_if/init_deinit/inc/service_ready_param.h
@@ -132,7 +132,7 @@
  *         - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  *         - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  *         - 3 indicates that n spatial streams is not supported
- * @he_cap_info_2G: HE capability info field of 802.11ax, WMI_HE_CAP defines
+ * @he_cap_info_2G[]: HE capability info field of 802.11ax, WMI_HE_CAP defines
  * @he_supp_mcs_2G: HE Supported MCS Set field Rx/Tx same
  * @tx_chain_mask_2G: Valid Transmit chain mask
  * @rx_chain_mask_2G: Valid Receive chain mask
@@ -146,7 +146,7 @@
  *        - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  *        - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  *        - 3 indicates that n spatial streams is not supported
- * @he_cap_info_5G: HE capability info field of 802.11ax, WMI_HE_CAP defines
+ * @he_cap_info_5G[]: HE capability info field of 802.11ax, WMI_HE_CAP defines
  * @he_supp_mcs_5G: HE Supported MCS Set field Rx/Tx same
  * @tx_chain_mask_5G: Valid Transmit chain mask
  * @rx_chain_mask_5G: Valid Receive chain mask
@@ -173,7 +173,7 @@
 	uint32_t ht_cap_info_2G;
 	uint32_t vht_cap_info_2G;
 	uint32_t vht_supp_mcs_2G;
-	uint32_t he_cap_info_2G;
+	uint32_t he_cap_info_2G[PSOC_HOST_MAX_MAC_SIZE];
 	uint32_t he_supp_mcs_2G;
 	uint32_t tx_chain_mask_2G;
 	uint32_t rx_chain_mask_2G;
@@ -181,7 +181,7 @@
 	uint32_t ht_cap_info_5G;
 	uint32_t vht_cap_info_5G;
 	uint32_t vht_supp_mcs_5G;
-	uint32_t he_cap_info_5G;
+	uint32_t he_cap_info_5G[PSOC_HOST_MAX_MAC_SIZE];
 	uint32_t he_supp_mcs_5G;
 	uint32_t tx_chain_mask_5G;
 	uint32_t rx_chain_mask_5G;
diff --git a/umac/cmn_services/inc/wlan_cmn.h b/umac/cmn_services/inc/wlan_cmn.h
index 4929688..bc654a3 100644
--- a/umac/cmn_services/inc/wlan_cmn.h
+++ b/umac/cmn_services/inc/wlan_cmn.h
@@ -588,6 +588,7 @@
 #define PSOC_SERVICE_BM_SIZE ((128 + sizeof(uint32_t) - 1) / sizeof(uint32_t))
 #define PSOC_HOST_MAX_NUM_SS (8)
 #define PSOC_HOST_MAX_PHY_SIZE (3)
+#define PSOC_HOST_MAX_MAC_SIZE (2)
 #define PSOC_MAX_HW_MODE (2)
 #define PSOC_MAX_MAC_PHY_CAP (5)
 #define PSOC_MAX_PHY_REG_CAP (3)
diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h
index 7dc7624..c2709ae 100644
--- a/wmi/inc/wmi_unified_param.h
+++ b/wmi/inc/wmi_unified_param.h
@@ -1142,6 +1142,9 @@
 
 #define WMI_HOST_MAX_NUM_SS		8
 #define WMI_HOST_MAX_HECAP_PHY_SIZE	3
+#define WMI_HOST_MAX_HECAP_MAC_SIZE	2
+#define WMI_HOST_HECAP_MAC_WORD1	0
+#define WMI_HOST_HECAP_MAC_WORD2	1
 #define WMI_HOST_MAX_HE_RATE_SET	3
 /**
  * struct wmi_host_ppe_threshold -PPE threshold
@@ -1274,7 +1277,7 @@
 	bool he_flag;
 	bool twt_requester;
 	bool twt_responder;
-	uint32_t peer_he_cap_macinfo;
+	uint32_t peer_he_cap_macinfo[WMI_HOST_MAX_HECAP_MAC_SIZE];
 	uint32_t peer_he_ops;
 	uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE];
 	uint32_t peer_he_mcs_count;
diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c
index f5b73bd..ee88552 100644
--- a/wmi/src/wmi_unified_tlv.c
+++ b/wmi/src/wmi_unified_tlv.c
@@ -2477,7 +2477,10 @@
 	cmd->peer_phymode = param->peer_phymode;
 
 	/* Update 11ax capabilities */
-	cmd->peer_he_cap_info = param->peer_he_cap_macinfo;
+	cmd->peer_he_cap_info =
+		param->peer_he_cap_macinfo[WMI_HOST_HECAP_MAC_WORD1];
+	cmd->peer_he_cap_info_ext =
+		param->peer_he_cap_macinfo[WMI_HOST_HECAP_MAC_WORD2];
 	cmd->peer_he_ops = param->peer_he_ops;
 	qdf_mem_copy(&cmd->peer_he_cap_phy, &param->peer_he_cap_phyinfo,
 				sizeof(param->peer_he_cap_phyinfo));
@@ -2547,6 +2550,7 @@
 		 "nss %d phymode %d peer_mpdu_density %d "
 		 "cmd->peer_vht_caps %x "
 		 "HE cap_info %x ops %x "
+		 "HE cap_info_ext %x "
 		 "HE phy %x  %x  %x  "
 		 "peer_bw_rxnss_override %x", __func__,
 		 cmd->vdev_id, cmd->peer_associd, cmd->peer_flags,
@@ -2555,8 +2559,9 @@
 		 cmd->peer_max_mpdu, cmd->peer_nss, cmd->peer_phymode,
 		 cmd->peer_mpdu_density,
 		 cmd->peer_vht_caps, cmd->peer_he_cap_info,
-		 cmd->peer_he_ops, cmd->peer_he_cap_phy[0],
-		 cmd->peer_he_cap_phy[1], cmd->peer_he_cap_phy[2],
+		 cmd->peer_he_ops, cmd->peer_he_cap_info_ext,
+		 cmd->peer_he_cap_phy[0], cmd->peer_he_cap_phy[1],
+		 cmd->peer_he_cap_phy[2],
 		 cmd->peer_bw_rxnss_override);
 
 	wmi_mtrace(WMI_PEER_ASSOC_CMDID, cmd->vdev_id, 0);
@@ -19791,7 +19796,10 @@
 	param->ht_cap_info_2G = mac_phy_caps->ht_cap_info_2G;
 	param->vht_cap_info_2G = mac_phy_caps->vht_cap_info_2G;
 	param->vht_supp_mcs_2G = mac_phy_caps->vht_supp_mcs_2G;
-	param->he_cap_info_2G = mac_phy_caps->he_cap_info_2G;
+	param->he_cap_info_2G[WMI_HOST_HECAP_MAC_WORD1] =
+		mac_phy_caps->he_cap_info_2G;
+	param->he_cap_info_2G[WMI_HOST_HECAP_MAC_WORD2] =
+		mac_phy_caps->he_cap_info_2G_ext;
 	param->he_supp_mcs_2G = mac_phy_caps->he_supp_mcs_2G;
 	param->tx_chain_mask_2G = mac_phy_caps->tx_chain_mask_2G;
 	param->rx_chain_mask_2G = mac_phy_caps->rx_chain_mask_2G;
@@ -19799,7 +19807,10 @@
 	param->ht_cap_info_5G = mac_phy_caps->ht_cap_info_5G;
 	param->vht_cap_info_5G = mac_phy_caps->vht_cap_info_5G;
 	param->vht_supp_mcs_5G = mac_phy_caps->vht_supp_mcs_5G;
-	param->he_cap_info_5G = mac_phy_caps->he_cap_info_5G;
+	param->he_cap_info_5G[WMI_HOST_HECAP_MAC_WORD1] =
+		mac_phy_caps->he_cap_info_5G;
+	param->he_cap_info_5G[WMI_HOST_HECAP_MAC_WORD2] =
+		mac_phy_caps->he_cap_info_5G_ext;
 	param->he_supp_mcs_5G = mac_phy_caps->he_supp_mcs_5G;
 	param->tx_chain_mask_5G = mac_phy_caps->tx_chain_mask_5G;
 	param->rx_chain_mask_5G = mac_phy_caps->rx_chain_mask_5G;