Browse Source

qcacld-3.0: Replace EDCA_AC_* macros with QCA_WLAN_AC_*

Replace EDCA_AC_* macros with QCA_WLAN_AC_*.

Change-Id: Ia48c0ffc9c87d3313e996567cf0ba9a599cdf6c3
CRs-Fixed: 2421732
Srinivas Girigowda 6 years ago
parent
commit
5b86fbd1bd

+ 45 - 45
components/mlme/dispatcher/inc/cfg_mlme_edca_params.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -291,13 +291,13 @@
 
 /*
  * <ini>
- * gEdcaVoCwmin - Set Cwmin value for EDCA_AC_VO
+ * gEdcaVoCwmin - Set Cwmin value for QCA_WLAN_AC_VO
  * @Min: 0
  * @Max: 0x15
  * @Default: 2
  *
- * This ini is used to set default Cwmin value for EDCA_AC_VO
- * Cwmin value for EDCA_AC_VO. CWVomin = 2^gEdcaVoCwmin -1
+ * This ini is used to set default Cwmin value for QCA_WLAN_AC_VO
+ * Cwmin value for QCA_WLAN_AC_VO. CWVomin = 2^gEdcaVoCwmin -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin etc
  * are aplicable
@@ -314,17 +314,17 @@
 		15, \
 		2, \
 		CFG_VALUE_OR_DEFAULT, \
-		"Cwmin value for EDCA_AC_VO")
+		"Cwmin value for QCA_WLAN_AC_VO")
 
 /*
  * <ini>
- * gEdcaVoCwmax - Set Cwmax value for EDCA_AC_VO
+ * gEdcaVoCwmax - Set Cwmax value for QCA_WLAN_AC_VO
  * @Min: 0
  * @Max: 15
  * @Default: 3
  *
- * This ini is used to set default Cwmax value for EDCA_AC_VO
- * Cwmax value for EDCA_AC_VO. CWVomax = 2^gEdcaVoCwmax -1
+ * This ini is used to set default Cwmax value for QCA_WLAN_AC_VO
+ * Cwmax value for QCA_WLAN_AC_VO. CWVomax = 2^gEdcaVoCwmax -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -341,16 +341,16 @@
 		15, \
 		3, \
 		CFG_VALUE_OR_DEFAULT, \
-		"Cwmax value for EDCA_AC_VO")
+		"Cwmax value for QCA_WLAN_AC_VO")
 
 /*
  * <ini>
- * gEdcaVoAifs - Set Aifs value for EDCA_AC_VO
+ * gEdcaVoAifs - Set Aifs value for QCA_WLAN_AC_VO
  * @Min: 0
  * @Max: 15
  * @Default: 2
  *
- * This ini is used to set default Aifs value for EDCA_AC_VO
+ * This ini is used to set default Aifs value for QCA_WLAN_AC_VO
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -367,17 +367,17 @@
 		15, \
 		2, \
 		CFG_VALUE_OR_DEFAULT, \
-		"default Aifs value for EDCA_AC_VO")
+		"default Aifs value for QCA_WLAN_AC_VO")
 
 /*
  * <ini>
- * gEdcaViCwmin - Set Cwmin value for EDCA_AC_VI
+ * gEdcaViCwmin - Set Cwmin value for QCA_WLAN_AC_VI
  * @Min: 0x0
  * @Max: 15
  * @Default: 3
  *
- * This ini is used to set default value for EDCA_AC_VI
- * Cwmin value for EDCA_AC_VI. CWVimin = 2^gEdcaViCwmin -1
+ * This ini is used to set default value for QCA_WLAN_AC_VI
+ * Cwmin value for QCA_WLAN_AC_VI. CWVimin = 2^gEdcaViCwmin -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -394,17 +394,17 @@
 		15, \
 		3, \
 		CFG_VALUE_OR_DEFAULT, \
-		"Cwmin value for EDCA_AC_VI")
+		"Cwmin value for QCA_WLAN_AC_VI")
 
 /*
  * <ini>
- * gEdcaViCwmax - Set Cwmax value for EDCA_AC_VI
+ * gEdcaViCwmax - Set Cwmax value for QCA_WLAN_AC_VI
  * @Min: 0
  * @Max: 15
  * @Default: 4
  *
- * This ini is used to set default Cwmax value for EDCA_AC_VI
- * Cwmax value for EDCA_AC_VI. CWVimax = 2^gEdcaViCwmax -1
+ * This ini is used to set default Cwmax value for QCA_WLAN_AC_VI
+ * Cwmax value for QCA_WLAN_AC_VI. CWVimax = 2^gEdcaViCwmax -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -421,16 +421,16 @@
 		15, \
 		4, \
 		CFG_VALUE_OR_DEFAULT, \
-		"cwmax value for EDCA_AC_VI")
+		"cwmax value for QCA_WLAN_AC_VI")
 
 /*
  * <ini>
- * gEdcaViAifs - Set Aifs value for EDCA_AC_VI
+ * gEdcaViAifs - Set Aifs value for QCA_WLAN_AC_VI
  * @Min: 0
  * @Max: 15
  * @Default: 2
  *
- * This ini is used to set default Aifs value for EDCA_AC_VI
+ * This ini is used to set default Aifs value for QCA_WLAN_AC_VI
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -447,17 +447,17 @@
 		15, \
 		2, \
 		CFG_VALUE_OR_DEFAULT, \
-		"default Aifs value for EDCA_AC_VI")
+		"default Aifs value for QCA_WLAN_AC_VI")
 
 /*
  * <ini>
- * gEdcaBkCwmin - Set Cwmin value for EDCA_AC_BK
+ * gEdcaBkCwmin - Set Cwmin value for QCA_WLAN_AC_BK
  * @Min: 0x0
  * @Max: 15
  * @Default: 4
  *
- * This ini is used to set default Cwmin value for EDCA_AC_BK
- * Cwmin value for EDCA_AC_BK. CWBkmin = 2^gEdcaBkCwmin -1
+ * This ini is used to set default Cwmin value for QCA_WLAN_AC_BK
+ * Cwmin value for QCA_WLAN_AC_BK. CWBkmin = 2^gEdcaBkCwmin -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -473,17 +473,17 @@
 		15, \
 		4, \
 		CFG_VALUE_OR_DEFAULT, \
-		"Cwmin value for EDCA_AC_BK")
+		"Cwmin value for QCA_WLAN_AC_BK")
 
 /*
  * <ini>
- * gEdcaBkCwmax - Set Cwmax value for EDCA_AC_BK
+ * gEdcaBkCwmax - Set Cwmax value for QCA_WLAN_AC_BK
  * @Min: 0
  * @Max: 15
  * @Default: 10
  *
- * This ini is used to set default Cwmax value for EDCA_AC_BK
- * Cwmax value for EDCA_AC_BK. CWBkmax = 2^gEdcaBkCwmax -1
+ * This ini is used to set default Cwmax value for QCA_WLAN_AC_BK
+ * Cwmax value for QCA_WLAN_AC_BK. CWBkmax = 2^gEdcaBkCwmax -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -500,16 +500,16 @@
 		15, \
 		10, \
 		CFG_VALUE_OR_DEFAULT, \
-		"cwmax value for EDCA_AC_BK")
+		"cwmax value for QCA_WLAN_AC_BK")
 
 /*
  * <ini>
- * gEdcaBkAifs - Set Aifs value for EDCA_AC_BK
+ * gEdcaBkAifs - Set Aifs value for QCA_WLAN_AC_BK
  * @Min: 0
  * @Max: 15
  * @Default: 7
  *
- * This ini is used to set default Aifs value for EDCA_AC_BK
+ * This ini is used to set default Aifs value for QCA_WLAN_AC_BK
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -526,17 +526,17 @@
 		15, \
 		7, \
 		CFG_VALUE_OR_DEFAULT, \
-		"default Aifs value for EDCA_AC_BK")
+		"default Aifs value for QCA_WLAN_AC_BK")
 
 /*
  * <ini>
- * gEdcaBeCwmin - Set Cwmin value for EDCA_AC_BE
+ * gEdcaBeCwmin - Set Cwmin value for QCA_WLAN_AC_BE
  * @Min: 0x0
  * @Max: 15
  * @Default: 4
  *
- * This ini is used to set default Cwmin value for EDCA_AC_BE
- * Cwmin value for EDCA_AC_BE. CWBemin = 2^gEdcaBeCwmin
+ * This ini is used to set default Cwmin value for QCA_WLAN_AC_BE
+ * Cwmin value for QCA_WLAN_AC_BE. CWBemin = 2^gEdcaBeCwmin
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -553,17 +553,17 @@
 		15, \
 		4, \
 		CFG_VALUE_OR_DEFAULT, \
-		"Cwmin value for EDCA_AC_BE")
+		"Cwmin value for QCA_WLAN_AC_BE")
 
 /*
  * <ini>
- * gEdcaBeCwmax - Set Cwmax value for EDCA_AC_BE
+ * gEdcaBeCwmax - Set Cwmax value for QCA_WLAN_AC_BE
  * @Min: 0
  * @Max: 15
  * @Default: 10
  *
- * This ini is used to set default Cwmax value for EDCA_AC_BE
- * Cwmax value for EDCA_AC_BE. CWBemax = 2^gEdcaBeCwmax -1
+ * This ini is used to set default Cwmax value for QCA_WLAN_AC_BE
+ * Cwmax value for QCA_WLAN_AC_BE. CWBemax = 2^gEdcaBeCwmax -1
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -581,16 +581,16 @@
 		15, \
 		10, \
 		CFG_VALUE_OR_DEFAULT, \
-		"cwmax value for EDCA_AC_BE")
+		"cwmax value for QCA_WLAN_AC_BE")
 
 /*
  * <ini>
- * gEdcaBeAifs - Set Aifs value for EDCA_AC_BE
+ * gEdcaBeAifs - Set Aifs value for QCA_WLAN_AC_BE
  * @Min: 0
  * @Max: 15
  * @Default: 3
  *
- * This ini is used to set default Aifs value for EDCA_AC_BE
+ * This ini is used to set default Aifs value for QCA_WLAN_AC_BE
  *
  * Related: If gEnableEdcaParams is set to 1, params gEdcaVoCwmin
  * etc are aplicable
@@ -607,7 +607,7 @@
 		15, \
 		3, \
 		CFG_VALUE_OR_DEFAULT, \
-		"default Aifs value for EDCA_AC_BE")
+		"default Aifs value for QCA_WLAN_AC_BE")
 
 #define CFG_EDCA_PARAMS_ALL \
 	CFG(CFG_EDCA_ANI_ACBK_LOCAL) \

+ 2 - 3
components/ocb/dispatcher/inc/wlan_ocb_public_structs.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -43,7 +43,6 @@
 #define OCB_SIZE_UTC_TIME_ERROR                 (5)
 
 #define OCB_CHANNEL_MAX                         (5)
-#define OCB_MAX_NUM_AC                          (4)
 
 /**
  * struct ocb_utc_param - parameters to set UTC time
@@ -155,7 +154,7 @@ struct ocb_config_chan {
 	uint32_t chan_freq;
 	uint32_t bandwidth;
 	struct qdf_mac_addr mac_address;
-	struct ocb_wmm_param qos_params[OCB_MAX_NUM_AC];
+	struct ocb_wmm_param qos_params[QCA_WLAN_AC_ALL];
 	uint32_t max_pwr;
 	uint32_t min_pwr;
 	uint8_t reg_pwr;

+ 3 - 3
core/hdd/src/wlan_hdd_ocb.c

@@ -61,7 +61,7 @@ static int dot11p_validate_qos_params(struct ocb_wmm_param qos_params[])
 {
 	int i;
 
-	for (i = 0; i < MAX_NUM_AC; i++) {
+	for (i = 0; i < QCA_WLAN_AC_ALL; i++) {
 		if ((!qos_params[i].aifsn) && (!qos_params[i].cwmin)
 				&& (!qos_params[i].cwmax))
 			continue;
@@ -542,7 +542,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev,
 			adapter->ocb_mac_addr_count++;
 		}
 
-		for (j = 0; j < MAX_NUM_AC; j++) {
+		for (j = 0; j < QCA_WLAN_AC_ALL; j++) {
 			curr_chan->qos_params[j].aifsn =
 				sched->channels[i].qos_params[j].aifsn;
 			curr_chan->qos_params[j].cwmin =
@@ -719,7 +719,7 @@ struct wlan_hdd_ocb_config_channel {
 	uint32_t bandwidth;
 	uint16_t flags;
 	uint8_t reserved[4];
-	struct sir_qos_params qos_params[MAX_NUM_AC];
+	struct sir_qos_params qos_params[QCA_WLAN_AC_ALL];
 	uint32_t max_pwr;
 	uint32_t min_pwr;
 };

+ 2 - 2
core/hdd/src/wlan_hdd_ocb.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -54,7 +54,7 @@ struct ocb_channel {
 	uint32_t channel_bandwidth;
 	uint32_t tx_power;
 	uint32_t tx_rate;
-	struct ocb_qos_params qos_params[MAX_NUM_AC];
+	struct ocb_qos_params qos_params[QCA_WLAN_AC_ALL];
 	uint32_t per_packet_rx_stats;
 };
 

+ 2 - 2
core/mac/inc/ani_global.h

@@ -807,11 +807,11 @@ struct mac_context {
 	bool usr_cfg_ps_enable;
 	uint16_t usr_cfg_ba_buff_size;
 	bool is_usr_cfg_amsdu_enabled;
-	uint8_t no_ack_policy_cfg[MAX_NUM_AC];
+	uint8_t no_ack_policy_cfg[QCA_WLAN_AC_ALL];
 	uint32_t he_sgi_ltf_cfg_bit_mask;
 	uint8_t usr_cfg_tx_bfee_nsts;
 	struct mgmt_beacon_probe_filter bcn_filter;
-	tSirMacEdcaParamRecord usr_mu_edca_params[MAX_NUM_AC];
+	tSirMacEdcaParamRecord usr_mu_edca_params[QCA_WLAN_AC_ALL];
 	bool usr_cfg_mu_edca_params;
 	bool he_om_ctrl_cfg_bw_set;
 	uint8_t he_om_ctrl_cfg_bw;

+ 0 - 17
core/mac/inc/sir_mac_prot_def.h

@@ -901,23 +901,6 @@ typedef struct sSirMacRRMEnabledCap {
 #endif
 } tSirMacRRMEnabledCap, *tpSirMacRRMEnabledCap;
 
-/* ----------------
- *  EDCA Profiles
- * ---------------
- */
-
-#define EDCA_AC_BE 0
-#define EDCA_AC_BK 1
-#define EDCA_AC_VI 2
-#define EDCA_AC_VO 3
-#define MAX_NUM_AC 4
-
-/* access categories */
-#define SIR_MAC_EDCAACI_BESTEFFORT  (EDCA_AC_BE)
-#define SIR_MAC_EDCAACI_BACKGROUND  (EDCA_AC_BK)
-#define SIR_MAC_EDCAACI_VIDEO       (EDCA_AC_VI)
-#define SIR_MAC_EDCAACI_VOICE       (EDCA_AC_VO)
-
 #define MU_EDCA_DEF_AIFSN     0
 #define MU_EDCA_DEF_CW_MAX    15
 #define MU_EDCA_DEF_CW_MIN    15

+ 4 - 4
core/mac/src/pe/include/lim_session.h

@@ -327,9 +327,9 @@ struct pe_session {
 	 * used on station. Specific AC values may be downgraded depending on
 	 * admission control for that particular AC.
 	 */
-	tSirMacEdcaParamRecord gLimEdcaParams[MAX_NUM_AC];      /* used locally */
-	tSirMacEdcaParamRecord gLimEdcaParamsBC[MAX_NUM_AC];    /* used for broadcast */
-	tSirMacEdcaParamRecord gLimEdcaParamsActive[MAX_NUM_AC];
+	tSirMacEdcaParamRecord gLimEdcaParams[QCA_WLAN_AC_ALL];      /* used locally */
+	tSirMacEdcaParamRecord gLimEdcaParamsBC[QCA_WLAN_AC_ALL];    /* used for broadcast */
+	tSirMacEdcaParamRecord gLimEdcaParamsActive[QCA_WLAN_AC_ALL];
 
 	uint8_t gLimEdcaParamSetCount;
 
@@ -552,7 +552,7 @@ struct pe_session {
 	bool deauth_disassoc_rc;
 	enum wmi_obss_color_collision_evt_type obss_color_collision_dec_evt;
 	bool is_session_obss_color_collision_det_enabled;
-	tSirMacEdcaParamRecord ap_mu_edca_params[MAX_NUM_AC];
+	tSirMacEdcaParamRecord ap_mu_edca_params[QCA_WLAN_AC_ALL];
 	bool mu_edca_present;
 	int8_t def_max_tx_pwr;
 	bool active_ba_64_session;

+ 2 - 2
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -858,7 +858,7 @@ static void __lim_process_add_ts_rsp(struct mac_context *mac_ctx,
 	}
 	if ((addts.tspec.tsinfo.traffic.accessPolicy !=
 			SIR_MAC_ACCESSPOLICY_EDCA) ||
-		((upToAc(addts.tspec.tsinfo.traffic.userPrio) < MAX_NUM_AC))) {
+		((upToAc(addts.tspec.tsinfo.traffic.userPrio) < QCA_WLAN_AC_ALL))) {
 #ifdef FEATURE_WLAN_ESE
 		retval = lim_send_hal_msg_add_ts(mac_ctx,
 				sta_ptr->staIndex, tspec_info->idx,
@@ -964,7 +964,7 @@ static void __lim_process_del_ts_req(struct mac_context *mac_ctx,
 
 	/* if no Admit Control, ignore the request */
 	if (tsinfo->traffic.accessPolicy == SIR_MAC_ACCESSPOLICY_EDCA) {
-		if (upToAc(tsinfo->traffic.userPrio) >= MAX_NUM_AC) {
+		if (upToAc(tsinfo->traffic.userPrio) >= QCA_WLAN_AC_ALL) {
 			pe_warn("DelTs with UP: %d has no AC - ignoring req",
 				tsinfo->traffic.userPrio);
 			return;

+ 5 - 5
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -388,7 +388,7 @@ static void lim_update_ese_tsm(struct mac_context *mac_ctx,
 	/* Find the TSPEC IE with VO user priority */
 	for (cnt = 0; cnt < assoc_rsp->num_tspecs; cnt++) {
 		if (upToAc(assoc_rsp->TSPECInfo[cnt].user_priority) ==
-			EDCA_AC_VO) {
+			QCA_WLAN_AC_VO) {
 			tsm_ctx->tid =
 				assoc_rsp->TSPECInfo[cnt].user_priority;
 			qdf_mem_copy(&tsm_ctx->tsmInfo,
@@ -982,13 +982,13 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx,
 		session_entry->mu_edca_present = assoc_rsp->mu_edca_present;
 		if (session_entry->mu_edca_present) {
 			pe_debug("Save MU EDCA params to session");
-			session_entry->ap_mu_edca_params[EDCA_AC_BE] =
+			session_entry->ap_mu_edca_params[QCA_WLAN_AC_BE] =
 				assoc_rsp->mu_edca.acbe;
-			session_entry->ap_mu_edca_params[EDCA_AC_BK] =
+			session_entry->ap_mu_edca_params[QCA_WLAN_AC_BK] =
 				assoc_rsp->mu_edca.acbk;
-			session_entry->ap_mu_edca_params[EDCA_AC_VI] =
+			session_entry->ap_mu_edca_params[QCA_WLAN_AC_VI] =
 				assoc_rsp->mu_edca.acvi;
-			session_entry->ap_mu_edca_params[EDCA_AC_VO] =
+			session_entry->ap_mu_edca_params[QCA_WLAN_AC_VO] =
 				assoc_rsp->mu_edca.acvo;
 		}
 

+ 8 - 8
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3458,14 +3458,14 @@ static void lim_process_sme_update_edca_params(struct mac_context *mac_ctx,
 		pe_err("Session does not exist: sme_id %d", sme_session_id);
 		return;
 	}
-	pe_session->gLimEdcaParamsActive[EDCA_AC_BE].no_ack =
-		mac_ctx->no_ack_policy_cfg[EDCA_AC_BE];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_BK].no_ack =
-		mac_ctx->no_ack_policy_cfg[EDCA_AC_BK];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_VI].no_ack =
-		mac_ctx->no_ack_policy_cfg[EDCA_AC_VI];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_VO].no_ack =
-		mac_ctx->no_ack_policy_cfg[EDCA_AC_VO];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BE].no_ack =
+		mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_BE];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BK].no_ack =
+		mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_BK];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VI].no_ack =
+		mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_VI];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VO].no_ack =
+		mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_VO];
 	sta_ds_ptr = dph_get_hash_entry(mac_ctx, DPH_STA_HASH_INDEX_PEER,
 					&pe_session->dph.dphHashTable);
 	if (sta_ds_ptr)

+ 24 - 24
core/mac/src/pe/lim/lim_send_messages.c

@@ -236,10 +236,10 @@ QDF_STATUS lim_send_edca_params(struct mac_context *mac,
 	if (!pEdcaParams)
 		return QDF_STATUS_E_NOMEM;
 	pEdcaParams->bssIdx = bssIdx;
-	pEdcaParams->acbe = pUpdatedEdcaParams[EDCA_AC_BE];
-	pEdcaParams->acbk = pUpdatedEdcaParams[EDCA_AC_BK];
-	pEdcaParams->acvi = pUpdatedEdcaParams[EDCA_AC_VI];
-	pEdcaParams->acvo = pUpdatedEdcaParams[EDCA_AC_VO];
+	pEdcaParams->acbe = pUpdatedEdcaParams[QCA_WLAN_AC_BE];
+	pEdcaParams->acbk = pUpdatedEdcaParams[QCA_WLAN_AC_BK];
+	pEdcaParams->acvi = pUpdatedEdcaParams[QCA_WLAN_AC_VI];
+	pEdcaParams->acvo = pUpdatedEdcaParams[QCA_WLAN_AC_VO];
 	pEdcaParams->mu_edca_params = mu_edca;
 	msgQ.type = WMA_UPDATE_EDCA_PROFILE_IND;
 	msgQ.reserved = 0;
@@ -266,19 +266,19 @@ void lim_set_active_edca_params(struct mac_context *mac_ctx,
 	host_log_qos_edca_pkt_type *log_ptr = NULL;
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 	/* Initialize gLimEdcaParamsActive[] to be same as localEdcaParams */
-	pe_session->gLimEdcaParamsActive[EDCA_AC_BE] = edca_params[EDCA_AC_BE];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_BK] = edca_params[EDCA_AC_BK];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_VI] = edca_params[EDCA_AC_VI];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_VO] = edca_params[EDCA_AC_VO];
-
-	pe_session->gLimEdcaParamsActive[EDCA_AC_BE].no_ack =
-					mac_ctx->no_ack_policy_cfg[EDCA_AC_BE];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_BK].no_ack =
-					mac_ctx->no_ack_policy_cfg[EDCA_AC_BK];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_VI].no_ack =
-					mac_ctx->no_ack_policy_cfg[EDCA_AC_VI];
-	pe_session->gLimEdcaParamsActive[EDCA_AC_VO].no_ack =
-					mac_ctx->no_ack_policy_cfg[EDCA_AC_VO];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BE] = edca_params[QCA_WLAN_AC_BE];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BK] = edca_params[QCA_WLAN_AC_BK];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VI] = edca_params[QCA_WLAN_AC_VI];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VO] = edca_params[QCA_WLAN_AC_VO];
+
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BE].no_ack =
+					mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_BE];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BK].no_ack =
+					mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_BK];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VI].no_ack =
+					mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_VI];
+	pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VO].no_ack =
+					mac_ctx->no_ack_policy_cfg[QCA_WLAN_AC_VO];
 
 	/* An AC requires downgrade if the ACM bit is set, and the AC has not
 	 * yet been admitted in uplink or bi-directions.
@@ -297,7 +297,7 @@ void lim_set_active_edca_params(struct mac_context *mac_ctx,
 		pe_session->gAcAdmitMask[SIR_MAC_DIRECTION_UPLINK]);
 	pe_debug("adAdmitMask[DOWNLINK] = 0x%x ",
 		pe_session->gAcAdmitMask[SIR_MAC_DIRECTION_DNLINK]);
-	for (ac = EDCA_AC_BK; ac <= EDCA_AC_VO; ac++) {
+	for (ac = QCA_WLAN_AC_BK; ac <= QCA_WLAN_AC_VO; ac++) {
 		ac_admitted =
 			((pe_session->gAcAdmitMask[SIR_MAC_DIRECTION_UPLINK] &
 			 (1 << ac)) >> ac);
@@ -307,11 +307,11 @@ void lim_set_active_edca_params(struct mac_context *mac_ctx,
 		if ((edca_params[ac].aci.acm == 1) && (ac_admitted == 0)) {
 			pe_debug("We need to downgrade AC %d!!", ac);
 			/* Loop backwards through AC values until it finds
-			 * acm == 0 or reaches EDCA_AC_BE.
+			 * acm == 0 or reaches QCA_WLAN_AC_BE.
 			 * Note that for block has no executable statements.
 			 */
 			for (i = ac - 1;
-			    (i > EDCA_AC_BE &&
+			    (i > QCA_WLAN_AC_BE &&
 				(edca_params[i].aci.acm != 0));
 			     i--)
 				;
@@ -328,22 +328,22 @@ void lim_set_active_edca_params(struct mac_context *mac_ctx,
 	if (log_ptr) {
 		tSirMacEdcaParamRecord *rec;
 
-		rec = &pe_session->gLimEdcaParamsActive[EDCA_AC_BE];
+		rec = &pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BE];
 		log_ptr->aci_be = rec->aci.aci;
 		log_ptr->cw_be = rec->cw.max << 4 | rec->cw.min;
 		log_ptr->txoplimit_be = rec->txoplimit;
 
-		rec = &pe_session->gLimEdcaParamsActive[EDCA_AC_BK];
+		rec = &pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_BK];
 		log_ptr->aci_bk = rec->aci.aci;
 		log_ptr->cw_bk = rec->cw.max << 4 | rec->cw.min;
 		log_ptr->txoplimit_bk = rec->txoplimit;
 
-		rec = &pe_session->gLimEdcaParamsActive[EDCA_AC_VI];
+		rec = &pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VI];
 		log_ptr->aci_vi = rec->aci.aci;
 		log_ptr->cw_vi = rec->cw.max << 4 | rec->cw.min;
 		log_ptr->txoplimit_vi = rec->txoplimit;
 
-		rec = &pe_session->gLimEdcaParamsActive[EDCA_AC_VO];
+		rec = &pe_session->gLimEdcaParamsActive[QCA_WLAN_AC_VO];
 		log_ptr->aci_vo = rec->aci.aci;
 		log_ptr->cw_vo = rec->cw.max << 4 | rec->cw.min;
 		log_ptr->txoplimit_vo = rec->txoplimit;

+ 33 - 33
core/mac/src/pe/sch/sch_beacon_process.c

@@ -1137,76 +1137,76 @@ sch_beacon_edca_process(struct mac_context *mac, tSirMacEdcaParamSetIE *edca,
 		session->gLimEdcaParamSetCount, edca->qosInfo.count);
 
 	session->gLimEdcaParamSetCount = edca->qosInfo.count;
-	session->gLimEdcaParams[EDCA_AC_BE] = edca->acbe;
-	session->gLimEdcaParams[EDCA_AC_BK] = edca->acbk;
-	session->gLimEdcaParams[EDCA_AC_VI] = edca->acvi;
-	session->gLimEdcaParams[EDCA_AC_VO] = edca->acvo;
+	session->gLimEdcaParams[QCA_WLAN_AC_BE] = edca->acbe;
+	session->gLimEdcaParams[QCA_WLAN_AC_BK] = edca->acbk;
+	session->gLimEdcaParams[QCA_WLAN_AC_VI] = edca->acvi;
+	session->gLimEdcaParams[QCA_WLAN_AC_VO] = edca->acvo;
 
 	if (mac->mlme_cfg->edca_params.enable_edca_params) {
-		session->gLimEdcaParams[EDCA_AC_VO].aci.aifsn =
+		session->gLimEdcaParams[QCA_WLAN_AC_VO].aci.aifsn =
 			mac->mlme_cfg->edca_params.edca_ac_vo.vo_aifs;
-		session->gLimEdcaParams[EDCA_AC_VI].aci.aifsn =
+		session->gLimEdcaParams[QCA_WLAN_AC_VI].aci.aifsn =
 			mac->mlme_cfg->edca_params.edca_ac_vi.vi_aifs;
-		session->gLimEdcaParams[EDCA_AC_BK].aci.aifsn =
+		session->gLimEdcaParams[QCA_WLAN_AC_BK].aci.aifsn =
 			mac->mlme_cfg->edca_params.edca_ac_bk.bk_aifs;
-		session->gLimEdcaParams[EDCA_AC_BE].aci.aifsn =
+		session->gLimEdcaParams[QCA_WLAN_AC_BE].aci.aifsn =
 			mac->mlme_cfg->edca_params.edca_ac_be.be_aifs;
 
-		session->gLimEdcaParams[EDCA_AC_VO].cw.min =
+		session->gLimEdcaParams[QCA_WLAN_AC_VO].cw.min =
 			mac->mlme_cfg->edca_params.edca_ac_vo.vo_cwmin;
-		session->gLimEdcaParams[EDCA_AC_VI].cw.min =
+		session->gLimEdcaParams[QCA_WLAN_AC_VI].cw.min =
 			mac->mlme_cfg->edca_params.edca_ac_vi.vi_cwmin;
-		session->gLimEdcaParams[EDCA_AC_BK].cw.min =
+		session->gLimEdcaParams[QCA_WLAN_AC_BK].cw.min =
 			mac->mlme_cfg->edca_params.edca_ac_bk.bk_cwmin;
-		session->gLimEdcaParams[EDCA_AC_BE].cw.min =
+		session->gLimEdcaParams[QCA_WLAN_AC_BE].cw.min =
 			mac->mlme_cfg->edca_params.edca_ac_be.be_cwmin;
 
-		session->gLimEdcaParams[EDCA_AC_VO].cw.max =
+		session->gLimEdcaParams[QCA_WLAN_AC_VO].cw.max =
 			mac->mlme_cfg->edca_params.edca_ac_vo.vo_cwmax;
-		session->gLimEdcaParams[EDCA_AC_VI].cw.max =
+		session->gLimEdcaParams[QCA_WLAN_AC_VI].cw.max =
 			mac->mlme_cfg->edca_params.edca_ac_vi.vi_cwmax;
-		session->gLimEdcaParams[EDCA_AC_BK].cw.max =
+		session->gLimEdcaParams[QCA_WLAN_AC_BK].cw.max =
 			mac->mlme_cfg->edca_params.edca_ac_bk.bk_cwmax;
-		session->gLimEdcaParams[EDCA_AC_BE].cw.max =
+		session->gLimEdcaParams[QCA_WLAN_AC_BE].cw.max =
 			mac->mlme_cfg->edca_params.edca_ac_be.be_cwmax;
 	}
 #ifdef FEATURE_WLAN_DIAG_SUPPORT
 	WLAN_HOST_DIAG_LOG_ALLOC(log_ptr, host_log_qos_edca_pkt_type,
 				 LOG_WLAN_QOS_EDCA_C);
 	if (log_ptr) {
-		log_ptr->aci_be = session->gLimEdcaParams[EDCA_AC_BE].aci.aci;
+		log_ptr->aci_be = session->gLimEdcaParams[QCA_WLAN_AC_BE].aci.aci;
 		log_ptr->cw_be =
-			session->gLimEdcaParams[EDCA_AC_BE].cw.max << 4
-				| session->gLimEdcaParams[EDCA_AC_BE].cw.min;
+			session->gLimEdcaParams[QCA_WLAN_AC_BE].cw.max << 4
+				| session->gLimEdcaParams[QCA_WLAN_AC_BE].cw.min;
 		log_ptr->txoplimit_be =
-			session->gLimEdcaParams[EDCA_AC_BE].txoplimit;
+			session->gLimEdcaParams[QCA_WLAN_AC_BE].txoplimit;
 		log_ptr->aci_bk =
-			session->gLimEdcaParams[EDCA_AC_BK].aci.aci;
+			session->gLimEdcaParams[QCA_WLAN_AC_BK].aci.aci;
 		log_ptr->cw_bk =
-			session->gLimEdcaParams[EDCA_AC_BK].cw.max << 4
-				| session->gLimEdcaParams[EDCA_AC_BK].cw.min;
+			session->gLimEdcaParams[QCA_WLAN_AC_BK].cw.max << 4
+				| session->gLimEdcaParams[QCA_WLAN_AC_BK].cw.min;
 		log_ptr->txoplimit_bk =
-			session->gLimEdcaParams[EDCA_AC_BK].txoplimit;
+			session->gLimEdcaParams[QCA_WLAN_AC_BK].txoplimit;
 		log_ptr->aci_vi =
-			session->gLimEdcaParams[EDCA_AC_VI].aci.aci;
+			session->gLimEdcaParams[QCA_WLAN_AC_VI].aci.aci;
 		log_ptr->cw_vi =
-			session->gLimEdcaParams[EDCA_AC_VI].cw.max << 4
-				| session->gLimEdcaParams[EDCA_AC_VI].cw.min;
+			session->gLimEdcaParams[QCA_WLAN_AC_VI].cw.max << 4
+				| session->gLimEdcaParams[QCA_WLAN_AC_VI].cw.min;
 		log_ptr->txoplimit_vi =
-			session->gLimEdcaParams[EDCA_AC_VI].txoplimit;
+			session->gLimEdcaParams[QCA_WLAN_AC_VI].txoplimit;
 		log_ptr->aci_vo =
-			session->gLimEdcaParams[EDCA_AC_VO].aci.aci;
+			session->gLimEdcaParams[QCA_WLAN_AC_VO].aci.aci;
 		log_ptr->cw_vo =
-			session->gLimEdcaParams[EDCA_AC_VO].cw.max << 4
-				| session->gLimEdcaParams[EDCA_AC_VO].cw.min;
+			session->gLimEdcaParams[QCA_WLAN_AC_VO].cw.max << 4
+				| session->gLimEdcaParams[QCA_WLAN_AC_VO].cw.min;
 		log_ptr->txoplimit_vo =
-			session->gLimEdcaParams[EDCA_AC_VO].txoplimit;
+			session->gLimEdcaParams[QCA_WLAN_AC_VO].txoplimit;
 	}
 	WLAN_HOST_DIAG_LOG_REPORT(log_ptr);
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 	pe_debug("Edca param enabled in ini %d. Updating Local EDCA Params(gLimEdcaParams) to: ",
 		 mac->mlme_cfg->edca_params.enable_edca_params);
-	for (i = 0; i < MAX_NUM_AC; i++) {
+	for (i = 0; i < QCA_WLAN_AC_ALL; i++) {
 		pe_debug("AC[%d]:  AIFSN: %d, ACM %d, CWmin %d, CWmax %d, TxOp %d",
 		       i, session->gLimEdcaParams[i].aci.aifsn,
 		       session->gLimEdcaParams[i].aci.acm,

+ 3 - 3
core/mac/src/pe/sch/sch_message.c

@@ -235,7 +235,7 @@ broadcast_wmm_of_concurrent_sta_session(struct mac_context *mac_ctx,
 	 * Once atleast one concurrent session on same channel is found and WMM
 	 * broadcast params for current SoftAP/GO session updated, return
 	 */
-	for (j = 0; j < MAX_NUM_AC; j++) {
+	for (j = 0; j < QCA_WLAN_AC_ALL; j++) {
 		session->gLimEdcaParamsBC[j].aci.acm =
 			concurrent_session->gLimEdcaParams[j].aci.acm;
 		session->gLimEdcaParamsBC[j].aci.aifsn =
@@ -288,7 +288,7 @@ void sch_qos_update_broadcast(struct mac_context *mac, struct pe_session *pe_ses
 		txopidx = CFG_EDCA_PROFILE_TXOPA_IDX;
 	}
 
-	for (i = 0; i < MAX_NUM_AC; i++) {
+	for (i = 0; i < QCA_WLAN_AC_ALL; i++) {
 		if (pe_session->gLimEdcaParamsBC[i].aci.acm !=
 			(uint8_t)params[i][CFG_EDCA_PROFILE_ACM_IDX]) {
 			pe_session->gLimEdcaParamsBC[i].aci.acm =
@@ -423,7 +423,7 @@ set_sch_edca_params(struct mac_context *mac,
 		txopidx = CFG_EDCA_PROFILE_TXOPA_IDX;
 	}
 
-	for (i = 0; i < MAX_NUM_AC; i++) {
+	for (i = 0; i < QCA_WLAN_AC_ALL; i++) {
 		pe_session->gLimEdcaParams[i].aci.acm =
 			(uint8_t)params[i][CFG_EDCA_PROFILE_ACM_IDX];
 		pe_session->gLimEdcaParams[i].aci.aifsn =

+ 8 - 8
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -418,7 +418,7 @@ populate_dot11f_edca_param_set(struct mac_context *mac,
 			 SET_AIFSN(pe_session->gLimEdcaParamsBC[0].aci.aifsn));
 		pDot11f->acbe_acm =
 			(0x1 & pe_session->gLimEdcaParamsBC[0].aci.acm);
-		pDot11f->acbe_aci = (0x3 & SIR_MAC_EDCAACI_BESTEFFORT);
+		pDot11f->acbe_aci = (0x3 & QCA_WLAN_AC_BE);
 		pDot11f->acbe_acwmin =
 			(0xf & pe_session->gLimEdcaParamsBC[0].cw.min);
 		pDot11f->acbe_acwmax =
@@ -431,7 +431,7 @@ populate_dot11f_edca_param_set(struct mac_context *mac,
 			 SET_AIFSN(pe_session->gLimEdcaParamsBC[1].aci.aifsn));
 		pDot11f->acbk_acm =
 			(0x1 & pe_session->gLimEdcaParamsBC[1].aci.acm);
-		pDot11f->acbk_aci = (0x3 & SIR_MAC_EDCAACI_BACKGROUND);
+		pDot11f->acbk_aci = (0x3 & QCA_WLAN_AC_BK);
 		pDot11f->acbk_acwmin =
 			(0xf & pe_session->gLimEdcaParamsBC[1].cw.min);
 		pDot11f->acbk_acwmax =
@@ -444,7 +444,7 @@ populate_dot11f_edca_param_set(struct mac_context *mac,
 			 SET_AIFSN(pe_session->gLimEdcaParamsBC[2].aci.aifsn));
 		pDot11f->acvi_acm =
 			(0x1 & pe_session->gLimEdcaParamsBC[2].aci.acm);
-		pDot11f->acvi_aci = (0x3 & SIR_MAC_EDCAACI_VIDEO);
+		pDot11f->acvi_aci = (0x3 & QCA_WLAN_AC_VI);
 		pDot11f->acvi_acwmin =
 			(0xf & pe_session->gLimEdcaParamsBC[2].cw.min);
 		pDot11f->acvi_acwmax =
@@ -457,7 +457,7 @@ populate_dot11f_edca_param_set(struct mac_context *mac,
 			 SET_AIFSN(pe_session->gLimEdcaParamsBC[3].aci.aifsn));
 		pDot11f->acvo_acm =
 			(0x1 & pe_session->gLimEdcaParamsBC[3].aci.acm);
-		pDot11f->acvo_aci = (0x3 & SIR_MAC_EDCAACI_VOICE);
+		pDot11f->acvo_aci = (0x3 & QCA_WLAN_AC_VO);
 		pDot11f->acvo_acwmin =
 			(0xf & pe_session->gLimEdcaParamsBC[3].cw.min);
 		pDot11f->acvo_acwmax =
@@ -1823,7 +1823,7 @@ void populate_dot11f_wmm_params(struct mac_context *mac,
 	pParams->acbe_aifsn =
 		(0xf & SET_AIFSN(pe_session->gLimEdcaParamsBC[0].aci.aifsn));
 	pParams->acbe_acm = (0x1 & pe_session->gLimEdcaParamsBC[0].aci.acm);
-	pParams->acbe_aci = (0x3 & SIR_MAC_EDCAACI_BESTEFFORT);
+	pParams->acbe_aci = (0x3 & QCA_WLAN_AC_BE);
 	pParams->acbe_acwmin =
 		(0xf & pe_session->gLimEdcaParamsBC[0].cw.min);
 	pParams->acbe_acwmax =
@@ -1833,7 +1833,7 @@ void populate_dot11f_wmm_params(struct mac_context *mac,
 	pParams->acbk_aifsn =
 		(0xf & SET_AIFSN(pe_session->gLimEdcaParamsBC[1].aci.aifsn));
 	pParams->acbk_acm = (0x1 & pe_session->gLimEdcaParamsBC[1].aci.acm);
-	pParams->acbk_aci = (0x3 & SIR_MAC_EDCAACI_BACKGROUND);
+	pParams->acbk_aci = (0x3 & QCA_WLAN_AC_BK);
 	pParams->acbk_acwmin =
 		(0xf & pe_session->gLimEdcaParamsBC[1].cw.min);
 	pParams->acbk_acwmax =
@@ -1849,7 +1849,7 @@ void populate_dot11f_wmm_params(struct mac_context *mac,
 			 SET_AIFSN(pe_session->gLimEdcaParamsBC[2].aci.aifsn));
 
 	pParams->acvi_acm = (0x1 & pe_session->gLimEdcaParamsBC[2].aci.acm);
-	pParams->acvi_aci = (0x3 & SIR_MAC_EDCAACI_VIDEO);
+	pParams->acvi_aci = (0x3 & QCA_WLAN_AC_VI);
 	pParams->acvi_acwmin =
 		(0xf & pe_session->gLimEdcaParamsBC[2].cw.min);
 	pParams->acvi_acwmax =
@@ -1865,7 +1865,7 @@ void populate_dot11f_wmm_params(struct mac_context *mac,
 			 SET_AIFSN(pe_session->gLimEdcaParamsBC[3].aci.aifsn));
 
 	pParams->acvo_acm = (0x1 & pe_session->gLimEdcaParamsBC[3].aci.acm);
-	pParams->acvo_aci = (0x3 & SIR_MAC_EDCAACI_VOICE);
+	pParams->acvo_aci = (0x3 & QCA_WLAN_AC_VO);
 	pParams->acvo_acwmin =
 		(0xf & pe_session->gLimEdcaParamsBC[3].cw.min);
 	pParams->acvo_acwmax =

+ 3 - 3
core/sme/src/common/sme_api.c

@@ -8333,7 +8333,7 @@ int sme_set_no_ack_policy(mac_handle_t mac_handle, uint8_t session_id,
 	struct scheduler_msg msg = {0};
 	QDF_STATUS status;
 
-	if (ac > MAX_NUM_AC) {
+	if (ac > QCA_WLAN_AC_ALL) {
 		sme_err("invalid ac val %d", ac);
 		return -EINVAL;
 	}
@@ -8341,7 +8341,7 @@ int sme_set_no_ack_policy(mac_handle_t mac_handle, uint8_t session_id,
 		set_val = 1;
 	else
 		set_val = 0;
-	if (ac == MAX_NUM_AC) {
+	if (ac == QCA_WLAN_AC_ALL) {
 		for (i = 0; i < ac; i++)
 			mac_ctx->no_ack_policy_cfg[i] = set_val;
 	} else {
@@ -11421,7 +11421,7 @@ void sme_set_he_mu_edca_def_cfg(mac_handle_t mac_handle)
 	uint8_t i;
 
 	sme_debug("Set MU EDCA params to default");
-	for (i = 0; i < MAX_NUM_AC; i++) {
+	for (i = 0; i < QCA_WLAN_AC_ALL; i++) {
 		mac_ctx->usr_mu_edca_params[i].aci.aifsn = MU_EDCA_DEF_AIFSN;
 		mac_ctx->usr_mu_edca_params[i].aci.aci = i;
 		mac_ctx->usr_mu_edca_params[i].cw.max = MU_EDCA_DEF_CW_MAX;