Ver código fonte

qcacld-3.0: Optimize mgmt_tx_rate vdev set params

Currently host sends many ap keep alive timeout,
mgmt_tx_rate  separately to firmware.

Combine these multiple vdev set params,
send to WMI to reduce number of transactions.
Also replace target wmi pdev/vdev params with host wmi
pdev/vdev params to fix existing broken layering
violation.

Change-Id: I362770b367588220fc35508e4411635e35b3a548
CRs-Fixed: 3333872
Divyajyothi Goparaju 2 anos atrás
pai
commit
c35a56833f

+ 52 - 52
core/hdd/src/wlan_hdd_hostapd_wext.c

@@ -623,7 +623,7 @@ static __iw_softap_setparam(struct net_device *dev,
 	case QCSAP_PARAM_RTSCTS:
 	{
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_ENABLE_RTSCTS,
+					  wmi_vdev_param_enable_rtscts,
 					  set_value, VDEV_CMD);
 		if (ret) {
 			hdd_err("FAILED TO SET RTSCTS at SAP");
@@ -689,7 +689,7 @@ static __iw_softap_setparam(struct net_device *dev,
 		hdd_debug("SET_HT_RATE val %d rix %d preamble %x nss %d",
 		       set_value, rix, preamble, nss);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_FIXED_RATE,
+					  wmi_vdev_param_fixed_rate,
 					  set_value, VDEV_CMD);
 		break;
 	}
@@ -720,7 +720,7 @@ static __iw_softap_setparam(struct net_device *dev,
 		       set_value, rix, preamble, nss);
 
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_FIXED_RATE,
+					  wmi_vdev_param_fixed_rate,
 					  set_value, VDEV_CMD);
 		break;
 	}
@@ -753,72 +753,72 @@ static __iw_softap_setparam(struct net_device *dev,
 	}
 	case QCSAP_GTX_HT_MCS:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_HT_MCS %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_ht_mcs %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_HT_MCS,
+					  wmi_vdev_param_gtx_ht_mcs,
 					  set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_VHT_MCS:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_VHT_MCS %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_vht_mcs %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_VHT_MCS,
+					  wmi_vdev_param_gtx_vht_mcs,
 						set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_USRCFG:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_USR_CFG %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_usr_cfg %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_USR_CFG,
+					  wmi_vdev_param_gtx_usr_cfg,
 					  set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_THRE:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_THRE %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_thre %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_THRE,
+					  wmi_vdev_param_gtx_thre,
 					  set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_MARGIN:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_MARGIN %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_margin %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_MARGIN,
+					  wmi_vdev_param_gtx_margin,
 					  set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_STEP:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_STEP %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_step %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_STEP,
+					  wmi_vdev_param_gtx_step,
 					  set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_MINTPC:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_MINTPC %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_mintpc %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_MINTPC,
+					  wmi_vdev_param_gtx_mintpc,
 					  set_value, GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_BWMASK:
 	{
-		hdd_debug("WMI_VDEV_PARAM_GTX_BWMASK %d", set_value);
+		hdd_debug("wmi_vdev_param_gtx_bw_mask%d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_GTX_BW_MASK,
+					  wmi_vdev_param_gtx_bw_mask,
 					  set_value, GTX_CMD);
 		break;
 	}
@@ -899,7 +899,7 @@ static __iw_softap_setparam(struct net_device *dev,
 	{
 		hdd_debug("QCASAP_TX_CHAINMASK_CMD val %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_PDEV_PARAM_TX_CHAIN_MASK,
+					  wmi_pdev_param_tx_chain_mask,
 					  set_value, PDEV_CMD);
 		ret = hdd_set_antenna_mode(adapter, hdd_ctx, set_value);
 		break;
@@ -909,7 +909,7 @@ static __iw_softap_setparam(struct net_device *dev,
 	{
 		hdd_debug("QCASAP_RX_CHAINMASK_CMD val %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_PDEV_PARAM_RX_CHAIN_MASK,
+					  wmi_pdev_param_rx_chain_mask,
 					  set_value, PDEV_CMD);
 		ret = hdd_set_antenna_mode(adapter, hdd_ctx, set_value);
 		break;
@@ -920,7 +920,7 @@ static __iw_softap_setparam(struct net_device *dev,
 		hdd_debug("QCASAP_NSS_CMD val %d", set_value);
 		hdd_update_nss(adapter, set_value, set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_NSS,
+					  wmi_vdev_param_nss,
 					  set_value, VDEV_CMD);
 		break;
 	}
@@ -1008,27 +1008,27 @@ static __iw_softap_setparam(struct net_device *dev,
 					sap_config);
 		break;
 	case QCASAP_PARAM_DCM:
-		hdd_debug("Set WMI_VDEV_PARAM_HE_DCM: %d", set_value);
+		hdd_debug("Set wmi_vdev_param_he_dcm_enable: %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_HE_DCM, set_value,
-					  VDEV_CMD);
+					  wmi_vdev_param_he_dcm_enable,
+					  set_value, VDEV_CMD);
 		break;
 	case QCASAP_PARAM_RANGE_EXT:
-		hdd_debug("Set WMI_VDEV_PARAM_HE_RANGE_EXT: %d", set_value);
+		hdd_debug("Set wmi_vdev_param_he_range_ext: %d", set_value);
 		ret = wma_cli_set_command(adapter->vdev_id,
-					  WMI_VDEV_PARAM_HE_RANGE_EXT,
+					  wmi_vdev_param_he_range_ext,
 					  set_value, VDEV_CMD);
 		break;
 	case QCSAP_SET_DEFAULT_AMPDU:
 		hdd_debug("QCSAP_SET_DEFAULT_AMPDU val %d", set_value);
 		ret = wma_cli_set_command((int)adapter->vdev_id,
-				(int)WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,
+				(int)wmi_pdev_param_max_mpdus_in_ampdu,
 				set_value, PDEV_CMD);
 		break;
 	case QCSAP_ENABLE_RTS_BURSTING:
 		hdd_debug("QCSAP_ENABLE_RTS_BURSTING val %d", set_value);
 		ret = wma_cli_set_command((int)adapter->vdev_id,
-				(int)WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,
+				(int)wmi_pdev_param_enable_rts_sifs_bursting,
 				set_value, PDEV_CMD);
 		break;
 	case QCSAP_SET_BTCOEX_MODE:
@@ -1183,7 +1183,7 @@ static __iw_softap_getparam(struct net_device *dev,
 	case QCSAP_PARAM_RTSCTS:
 	{
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_ENABLE_RTSCTS,
+					     wmi_vdev_param_enable_rtscts,
 					     VDEV_CMD);
 		break;
 	}
@@ -1191,79 +1191,79 @@ static __iw_softap_getparam(struct net_device *dev,
 	case QCASAP_SHORT_GI:
 	{
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_SGI,
+					     wmi_vdev_param_sgi,
 					     VDEV_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_HT_MCS:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_HT_MCS");
+		hdd_debug("GET wmi_vdev_param_gtx_ht_mcs");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_HT_MCS,
+					     wmi_vdev_param_gtx_ht_mcs,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_VHT_MCS:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_VHT_MCS");
+		hdd_debug("GET wmi_vdev_param_gtx_vht_mcs");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_VHT_MCS,
+					     wmi_vdev_param_gtx_vht_mcs,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_USRCFG:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_USR_CFG");
+		hdd_debug("GET wmi_vdev_param_gtx_usr_cfg");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_USR_CFG,
+					     wmi_vdev_param_gtx_usr_cfg,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_THRE:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_THRE");
+		hdd_debug("GET wmi_vdev_param_gtx_thre");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_THRE,
+					     wmi_vdev_param_gtx_thre,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_MARGIN:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_MARGIN");
+		hdd_debug("GET wmi_vdev_param_gtx_margin");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_MARGIN,
+					     wmi_vdev_param_gtx_margin,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_STEP:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_STEP");
+		hdd_debug("GET wmi_vdev_param_gtx_step");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_STEP,
+					     wmi_vdev_param_gtx_step,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_MINTPC:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_MINTPC");
+		hdd_debug("GET wmi_vdev_param_gtx_mintpc");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_MINTPC,
+					     wmi_vdev_param_gtx_mintpc,
 					     GTX_CMD);
 		break;
 	}
 
 	case QCSAP_GTX_BWMASK:
 	{
-		hdd_debug("GET WMI_VDEV_PARAM_GTX_BW_MASK");
+		hdd_debug("GET wmi_vdev_param_gtx_bw_mask");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_GTX_BW_MASK,
+					     wmi_vdev_param_gtx_bw_mask,
 					     GTX_CMD);
 		break;
 	}
@@ -1298,7 +1298,7 @@ static __iw_softap_getparam(struct net_device *dev,
 	{
 		hdd_debug("QCASAP_TX_CHAINMASK_CMD");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_PDEV_PARAM_TX_CHAIN_MASK,
+					     wmi_pdev_param_tx_chain_mask,
 					     PDEV_CMD);
 		break;
 	}
@@ -1307,7 +1307,7 @@ static __iw_softap_getparam(struct net_device *dev,
 	{
 		hdd_debug("QCASAP_RX_CHAINMASK_CMD");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_PDEV_PARAM_RX_CHAIN_MASK,
+					     wmi_pdev_param_rx_chain_mask,
 					     PDEV_CMD);
 		break;
 	}
@@ -1316,7 +1316,7 @@ static __iw_softap_getparam(struct net_device *dev,
 	{
 		hdd_debug("QCASAP_NSS_CMD");
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_NSS,
+					     wmi_vdev_param_nss,
 					     VDEV_CMD);
 		break;
 	}
@@ -1358,14 +1358,14 @@ static __iw_softap_getparam(struct net_device *dev,
 	case QCASAP_PARAM_DCM:
 	{
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_HE_DCM,
+					     wmi_vdev_param_he_dcm_enable,
 					     VDEV_CMD);
 		break;
 	}
 	case QCASAP_PARAM_RANGE_EXT:
 	{
 		*value = wma_cli_get_command(adapter->vdev_id,
-					     WMI_VDEV_PARAM_HE_RANGE_EXT,
+					     wmi_vdev_param_he_range_ext,
 					     VDEV_CMD);
 		break;
 	}

+ 2 - 2
core/sme/src/csr/csr_api_roam.c

@@ -5770,9 +5770,9 @@ cm_csr_connect_done_ind(struct wlan_objmgr_vdev *vdev,
 	rsn_cap = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_RSN_CAP);
 	if (rsn_cap >= 0) {
 		cm_update_rsn_ocv_cap(&rsn_cap, rsp);
-		if (wma_cli_set2_command(vdev_id, WMI_VDEV_PARAM_RSN_CAPABILITY,
+		if (wma_cli_set2_command(vdev_id, wmi_vdev_param_rsn_capability,
 					 rsn_cap, 0, VDEV_CMD))
-			sme_err("Failed to update WMI_VDEV_PARAM_RSN_CAPABILITY for vdev id %d",
+			sme_err("Failed to update wmi_vdev_param_rsn_capability for vdev id %d",
 				vdev_id);
 	}
 

+ 93 - 49
core/wma/src/wma_mgmt.c

@@ -641,6 +641,12 @@ static bool wma_verify_rate_code(u_int32_t rate_code, enum cds_band_type band)
 #define TX_MGMT_RATE_2G_OFFSET 0
 #define TX_MGMT_RATE_5G_OFFSET 12
 
+#define MAX_VDEV_MGMT_RATE_PARAMS 2
+/* params being sent:
+ * wmi_vdev_param_mgmt_tx_rate
+ * wmi_vdev_param_per_band_mgmt_tx_rate
+ */
+
 /**
  * wma_set_mgmt_rate() - set vdev mgmt rate.
  * @wma:     wma handle
@@ -651,10 +657,12 @@ static bool wma_verify_rate_code(u_int32_t rate_code, enum cds_band_type band)
 void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id)
 {
 	uint32_t cfg_val;
-	int ret;
 	uint32_t per_band_mgmt_tx_rate = 0;
 	enum cds_band_type band = 0;
 	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
+	struct dev_set_param setparam[MAX_VDEV_MGMT_RATE_PARAMS] = {};
+	uint8_t index = 0;
+	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 
 	if (!mac) {
 		wma_err("Failed to get mac");
@@ -667,11 +675,14 @@ void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id)
 	    !wma_verify_rate_code(cfg_val, band)) {
 		wma_nofl_debug("default WNI_CFG_RATE_FOR_TX_MGMT, ignore");
 	} else {
-		ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-					 WMI_VDEV_PARAM_MGMT_TX_RATE,
-					 cfg_val);
-		if (ret)
-			wma_err("Failed to set WMI_VDEV_PARAM_MGMT_TX_RATE");
+		status = mlme_check_index_setparam(setparam,
+						   wmi_vdev_param_mgmt_tx_rate,
+						   cfg_val, index++,
+						   MAX_VDEV_MGMT_RATE_PARAMS);
+		if (QDF_IS_STATUS_ERROR(status)) {
+			wma_err("failed at wmi_vdev_param_mgmt_tx_rate");
+			goto error;
+		}
 	}
 
 	cfg_val = mac->mlme_cfg->sap_cfg.rate_tx_mgmt_2g;
@@ -702,16 +713,31 @@ void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id)
 		    ((cfg_val & 0x7FF) << TX_MGMT_RATE_5G_OFFSET);
 	}
 
-	ret = wma_vdev_set_param(
-		wma->wmi_handle,
-		vdev_id,
-		WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE,
-		per_band_mgmt_tx_rate);
-	if (ret)
-		wma_err("Failed to set WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE");
+	status = mlme_check_index_setparam(setparam,
+					   wmi_vdev_param_per_band_mgmt_tx_rate,
+					   per_band_mgmt_tx_rate, index++,
+					   MAX_VDEV_MGMT_RATE_PARAMS);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		wma_err("failed at wmi_vdev_param_per_band_mgmt_tx_rate");
+		goto error;
+	}
 
+	status = wma_send_multi_pdev_vdev_set_params(MLME_VDEV_SETPARAM,
+						     vdev_id, setparam, index);
+	if (QDF_IS_STATUS_ERROR(status))
+		wma_debug("failed to send MGMT_TX_RATE vdev set params stat:%d",
+			  status);
+error:
+	return;
 }
 
+#define MAX_VDEV_SAP_KEEPALIVE_PARAMS 3
+/* params being sent:
+ * wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs
+ * wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs
+ * wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs
+ */
+
 /**
  * wma_set_sap_keepalive() - set SAP keep alive parameters to fw
  * @wma: wma handle
@@ -724,6 +750,8 @@ void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id)
 	uint32_t min_inactive_time, max_inactive_time, max_unresponsive_time;
 	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 	QDF_STATUS status;
+	struct dev_set_param setparam[MAX_VDEV_SAP_KEEPALIVE_PARAMS] = {};
+	uint8_t index = 0;
 
 	if (!mac) {
 		wma_err("Failed to get mac");
@@ -734,28 +762,44 @@ void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id)
 				   &max_inactive_time, &max_unresponsive_time);
 
 	min_inactive_time = max_inactive_time / 2;
+	status = mlme_check_index_setparam(
+			setparam,
+			wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
+			min_inactive_time, index++,
+			MAX_VDEV_SAP_KEEPALIVE_PARAMS);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		wma_err("failed to set wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs");
+		goto error;
+	}
+	status = mlme_check_index_setparam(
+			setparam,
+			wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
+			max_inactive_time, index++,
+			MAX_VDEV_SAP_KEEPALIVE_PARAMS);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		wma_err("failed to set wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs");
+		goto error;
+	}
+	status = mlme_check_index_setparam(
+			setparam,
+			wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
+			max_unresponsive_time, index++,
+			MAX_VDEV_SAP_KEEPALIVE_PARAMS);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		wma_err("failed to set wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs");
+		goto error;
+	}
 
-	status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
-			min_inactive_time);
-	if (QDF_IS_STATUS_ERROR(status))
-		wma_err("Failed to Set AP MIN IDLE INACTIVE TIME");
-
-	status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
-			max_inactive_time);
-	if (QDF_IS_STATUS_ERROR(status))
-		wma_err("Failed to Set AP MAX IDLE INACTIVE TIME");
-
-	status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
-			max_unresponsive_time);
+	status = wma_send_multi_pdev_vdev_set_params(MLME_PDEV_SETPARAM,
+						     vdev_id, setparam, index);
 	if (QDF_IS_STATUS_ERROR(status))
-		wma_err("Failed to Set MAX UNRESPONSIVE TIME");
-
-	wma_debug("vdev_id:%d min_inactive_time: %u max_inactive_time: %u max_unresponsive_time: %u",
-		  vdev_id, min_inactive_time, max_inactive_time,
-		  max_unresponsive_time);
+		wma_err("Failed to Set AP MIN/MAX IDLE INACTIVE TIME, MAX UNRESPONSIVE TIME:%d", status);
+	else
+		wma_debug("vdev_id:%d min_inactive_time: %u max_inactive_time: %u max_unresponsive_time: %u",
+			  vdev_id, min_inactive_time, max_inactive_time,
+			  max_unresponsive_time);
+error:
+	return;
 }
 
 /**
@@ -1657,9 +1701,9 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 #ifdef FEATURE_WLAN_WAPI
 	if (params->encryptType == eSIR_ED_WPI) {
 		ret = wma_vdev_set_param(wma->wmi_handle, params->smesessionId,
-				      WMI_VDEV_PARAM_DROP_UNENCRY, false);
+				      wmi_vdev_param_drop_unencry, false);
 		if (ret) {
-			wma_err("Set WMI_VDEV_PARAM_DROP_UNENCRY Param status:%d",
+			wma_err("Set wmi_vdev_param_drop_unencry Param status:%d",
 				ret);
 			qdf_mem_free(cmd);
 			return ret;
@@ -1843,7 +1887,7 @@ void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id,
 	prot_mode = llbcoexist ? IEEE80211_PROT_CTSONLY : IEEE80211_PROT_NONE;
 
 	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-					      WMI_VDEV_PARAM_PROTECTION_MODE,
+					      wmi_vdev_param_protection_mode,
 					      prot_mode);
 
 	if (QDF_IS_STATUS_ERROR(ret))
@@ -1860,7 +1904,7 @@ wma_update_beacon_interval(tp_wma_handle wma, uint8_t vdev_id,
 	QDF_STATUS ret;
 
 	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-					      WMI_VDEV_PARAM_BEACON_INTERVAL,
+					      wmi_vdev_param_beacon_interval,
 					      beaconInterval);
 
 	if (QDF_IS_STATUS_ERROR(ret))
@@ -1893,7 +1937,7 @@ wma_update_bss_color(tp_wma_handle wma, uint8_t vdev_id,
 	wma_nofl_debug("vdev: %d, update bss color, HE_OPS: 0x%x",
 		       vdev_id, dword_he_ops);
 	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			      WMI_VDEV_PARAM_BSS_COLOR, dword_he_ops);
+			      wmi_vdev_param_he_bss_color, dword_he_ops);
 	if (QDF_IS_STATUS_ERROR(ret))
 		wma_err("Failed to update HE operations");
 }
@@ -1951,7 +1995,7 @@ void wma_update_rts_params(tp_wma_handle wma, uint32_t value)
 			continue;
 		ret = wma_vdev_set_param(wma->wmi_handle,
 					 vdev_id,
-					 WMI_VDEV_PARAM_RTS_THRESHOLD,
+					 wmi_vdev_param_rts_threshold,
 					 value);
 		if (QDF_IS_STATUS_ERROR(ret))
 			wma_err("Update cfg param fail for vdevId %d", vdev_id);
@@ -1969,7 +2013,7 @@ void wma_update_frag_params(tp_wma_handle wma, uint32_t value)
 		if (!vdev)
 			continue;
 		ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-					 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
+					 wmi_vdev_param_fragmentation_threshold,
 					 value);
 		if (QDF_IS_STATUS_ERROR(ret))
 			wma_err("Update cfg params failed for vdevId %d",
@@ -3040,7 +3084,7 @@ void wma_process_update_opmode(tp_wma_handle wma_handle,
 
 	wma_debug("opMode = %d", update_vht_opmode->opMode);
 	wma_set_peer_param(wma_handle, update_vht_opmode->peer_mac,
-			   WMI_PEER_CHWIDTH, update_vht_opmode->opMode,
+			   WMI_HOST_PEER_CHWIDTH, update_vht_opmode->opMode,
 			   update_vht_opmode->smesessionId);
 }
 
@@ -3076,7 +3120,7 @@ void wma_process_update_rx_nss(tp_wma_handle wma_handle,
 	wma_debug("Rx Nss = %d", update_rx_nss->rxNss);
 
 	wma_set_peer_param(wma_handle, update_rx_nss->peer_mac,
-			   WMI_PEER_NSS, update_rx_nss->rxNss,
+			   WMI_HOST_PEER_NSS, update_rx_nss->rxNss,
 			   update_rx_nss->smesessionId);
 }
 
@@ -3093,7 +3137,7 @@ void wma_process_update_membership(tp_wma_handle wma_handle,
 	wma_debug("membership = %x ", membership->membership);
 
 	wma_set_peer_param(wma_handle, membership->peer_mac,
-			   WMI_PEER_MEMBERSHIP, membership->membership,
+			   WMI_HOST_PEER_MEMBERSHIP, membership->membership,
 			   membership->smesessionId);
 }
 
@@ -3110,7 +3154,7 @@ void wma_process_update_userpos(tp_wma_handle wma_handle,
 	wma_debug("userPos = %x ", userpos->userPos);
 
 	wma_set_peer_param(wma_handle, userpos->peer_mac,
-			   WMI_PEER_USERPOS, userpos->userPos,
+			   WMI_HOST_PEER_USERPOS, userpos->userPos,
 			   userpos->smesessionId);
 
 	/* Now that membership/userpos is updated in fw,
@@ -3127,7 +3171,7 @@ QDF_STATUS wma_set_cts2self_for_p2p_go(void *wma_handle,
 	tp_wma_handle wma = (tp_wma_handle)wma_handle;
 	struct pdev_params pdevparam = {};
 
-	pdevparam.param_id = WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG;
+	pdevparam.param_id = wmi_pdev_param_cts2self_for_p2p_go_config;
 	pdevparam.param_value = cts2self_for_p2p_go;
 
 	ret = wmi_unified_pdev_param_send(wma->wmi_handle,
@@ -3165,17 +3209,17 @@ QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value)
 	switch (ht_capab) {
 	case WNI_CFG_HT_CAP_INFO_ADVANCE_CODING:
 		ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-						      WMI_VDEV_PARAM_LDPC,
+						      wmi_vdev_param_ldpc,
 						      value);
 		break;
 	case WNI_CFG_HT_CAP_INFO_TX_STBC:
 		ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-						      WMI_VDEV_PARAM_TX_STBC,
+						      wmi_vdev_param_tx_stbc,
 						      value);
 		break;
 	case WNI_CFG_HT_CAP_INFO_RX_STBC:
 		ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-						      WMI_VDEV_PARAM_RX_STBC,
+						      wmi_vdev_param_rx_stbc,
 						      value);
 		break;
 	case WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ:
@@ -3183,7 +3227,7 @@ QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value)
 		wma_err("ht_capab = %d, value = %d", ht_capab,
 			 value);
 		ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-						WMI_VDEV_PARAM_SGI, value);
+						wmi_vdev_param_sgi, value);
 		if (ret == QDF_STATUS_SUCCESS)
 			wma->interfaces[vdev_id].config.shortgi = value;
 		break;

+ 2 - 2
core/wma/src/wma_utils.c

@@ -4698,7 +4698,7 @@ QDF_STATUS wma_mon_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
 
 	/* Cancel periodic pdev stats update if running for other mac */
 	status = wma_cli_set_command(vdev_mlme->vdev->vdev_objmgr.vdev_id,
-				     WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
+				     wmi_pdev_param_pdev_stats_update_period,
 				     0, PDEV_CMD);
 	if (status != QDF_STATUS_SUCCESS)
 		pe_err("failed to clear fw stats request = %d", status);
@@ -4713,7 +4713,7 @@ QDF_STATUS wma_mon_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
 		pe_err("failed to send fw stats request = %d", status);
 
 	status = wma_cli_set2_command(vdev_mlme->vdev->vdev_objmgr.vdev_id,
-				      WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
+				      wmi_pdev_param_pdev_stats_update_period,
 				      interval * 2000, pdev, PDEV_CMD);
 	if (status != QDF_STATUS_SUCCESS)
 		pe_err("failed to send fw stats request = %d", status);