|
@@ -26,6 +26,7 @@
|
|
#include "lim_send_messages.h"
|
|
#include "lim_send_messages.h"
|
|
|
|
|
|
#include "sch_api.h"
|
|
#include "sch_api.h"
|
|
|
|
+#include "wlan_mlme_api.h"
|
|
|
|
|
|
/* / Minimum beacon interval allowed (in Kus) */
|
|
/* / Minimum beacon interval allowed (in Kus) */
|
|
#define SCH_BEACON_INTERVAL_MIN 10
|
|
#define SCH_BEACON_INTERVAL_MIN 10
|
|
@@ -39,10 +40,10 @@
|
|
/* local functions */
|
|
/* local functions */
|
|
static QDF_STATUS
|
|
static QDF_STATUS
|
|
get_wmm_local_params(tpAniSirGlobal pMac,
|
|
get_wmm_local_params(tpAniSirGlobal pMac,
|
|
- uint32_t params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN]);
|
|
|
|
|
|
+ uint32_t params[][CFG_EDCA_DATA_LEN]);
|
|
static void
|
|
static void
|
|
set_sch_edca_params(tpAniSirGlobal pMac,
|
|
set_sch_edca_params(tpAniSirGlobal pMac,
|
|
- uint32_t params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN],
|
|
|
|
|
|
+ uint32_t params[][CFG_EDCA_DATA_LEN],
|
|
tpPESession psessionEntry);
|
|
tpPESession psessionEntry);
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/* -------------------------------------------------------------------- */
|
|
@@ -120,31 +121,6 @@ void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg)
|
|
sch_edca_profile_update(pMac, psessionEntry);
|
|
sch_edca_profile_update(pMac, psessionEntry);
|
|
break;
|
|
break;
|
|
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACBK_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACBE_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACVI_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACVO_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACBK_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACBE_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACVI_LOCAL:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACVO_LOCAL:
|
|
|
|
- if (LIM_IS_AP_ROLE(psessionEntry))
|
|
|
|
- sch_qos_update_local(pMac, psessionEntry);
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACBK:
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACBE:
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACVI:
|
|
|
|
- case WNI_CFG_EDCA_ANI_ACVO:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACBK:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACBE:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACVI:
|
|
|
|
- case WNI_CFG_EDCA_WME_ACVO:
|
|
|
|
- if (LIM_IS_AP_ROLE(psessionEntry)) {
|
|
|
|
- sch_qos_update_broadcast(pMac, psessionEntry);
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
default:
|
|
default:
|
|
pe_err("Cfg param %d indication not handled",
|
|
pe_err("Cfg param %d indication not handled",
|
|
pSchMsg->bodyval);
|
|
pSchMsg->bodyval);
|
|
@@ -157,34 +133,40 @@ void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg)
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-/* get the local or broadcast parameters based on the profile sepcified in the config */
|
|
|
|
-/* params are delivered in this order: BK, BE, VI, VO */
|
|
|
|
|
|
+/**
|
|
|
|
+ * sch_get_params() - get the local or broadcast parameters based on the profile
|
|
|
|
+ * sepcified in the config params are delivered in this order: BE, BK, VI, VO
|
|
|
|
+ */
|
|
static QDF_STATUS
|
|
static QDF_STATUS
|
|
sch_get_params(tpAniSirGlobal pMac,
|
|
sch_get_params(tpAniSirGlobal pMac,
|
|
- uint32_t params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN],
|
|
|
|
|
|
+ uint32_t params[][CFG_EDCA_DATA_LEN],
|
|
uint8_t local)
|
|
uint8_t local)
|
|
{
|
|
{
|
|
uint32_t val;
|
|
uint32_t val;
|
|
uint32_t i, idx;
|
|
uint32_t i, idx;
|
|
uint32_t *prf;
|
|
uint32_t *prf;
|
|
|
|
+ struct wlan_mlme_edca_params *edca_params;
|
|
|
|
+ QDF_STATUS status;
|
|
uint8_t country_code_str[WNI_CFG_COUNTRY_CODE_LEN];
|
|
uint8_t country_code_str[WNI_CFG_COUNTRY_CODE_LEN];
|
|
uint32_t country_code_len = WNI_CFG_COUNTRY_CODE_LEN;
|
|
uint32_t country_code_len = WNI_CFG_COUNTRY_CODE_LEN;
|
|
- uint32_t ani_l[] = {
|
|
|
|
- WNI_CFG_EDCA_ANI_ACBE_LOCAL, WNI_CFG_EDCA_ANI_ACBK_LOCAL,
|
|
|
|
- WNI_CFG_EDCA_ANI_ACVI_LOCAL, WNI_CFG_EDCA_ANI_ACVO_LOCAL};
|
|
|
|
- uint32_t wme_l[] = {
|
|
|
|
- WNI_CFG_EDCA_WME_ACBE_LOCAL, WNI_CFG_EDCA_WME_ACBK_LOCAL,
|
|
|
|
- WNI_CFG_EDCA_WME_ACVI_LOCAL, WNI_CFG_EDCA_WME_ACVO_LOCAL};
|
|
|
|
- uint32_t etsi_l[] = {WNI_CFG_EDCA_ETSI_ACBE_LOCAL,
|
|
|
|
- WNI_CFG_EDCA_ETSI_ACBK_LOCAL,
|
|
|
|
- WNI_CFG_EDCA_ETSI_ACVI_LOCAL,
|
|
|
|
- WNI_CFG_EDCA_ETSI_ACVO_LOCAL};
|
|
|
|
- uint32_t ani_b[] = { WNI_CFG_EDCA_ANI_ACBE, WNI_CFG_EDCA_ANI_ACBK,
|
|
|
|
- WNI_CFG_EDCA_ANI_ACVI, WNI_CFG_EDCA_ANI_ACVO};
|
|
|
|
- uint32_t wme_b[] = { WNI_CFG_EDCA_WME_ACBE, WNI_CFG_EDCA_WME_ACBK,
|
|
|
|
- WNI_CFG_EDCA_WME_ACVI, WNI_CFG_EDCA_WME_ACVO};
|
|
|
|
- uint32_t etsi_b[] = {WNI_CFG_EDCA_ETSI_ACBE, WNI_CFG_EDCA_ETSI_ACBK,
|
|
|
|
- WNI_CFG_EDCA_ETSI_ACVI, WNI_CFG_EDCA_ETSI_ACVO};
|
|
|
|
|
|
+ uint32_t ani_l[] = {edca_ani_acbe_local, edca_ani_acbk_local,
|
|
|
|
+ edca_ani_acvi_local, edca_ani_acvo_local};
|
|
|
|
+
|
|
|
|
+ uint32_t wme_l[] = {edca_wme_acbe_local, edca_wme_acbk_local,
|
|
|
|
+ edca_wme_acvi_local, edca_wme_acvo_local};
|
|
|
|
+
|
|
|
|
+ uint32_t etsi_l[] = {edca_etsi_acbe_local, edca_etsi_acbk_local,
|
|
|
|
+ edca_etsi_acvi_local, edca_etsi_acvo_local};
|
|
|
|
+
|
|
|
|
+ uint32_t ani_b[] = {edca_ani_acbe_bcast, edca_ani_acbk_bcast,
|
|
|
|
+ edca_ani_acvi_bcast, edca_ani_acvo_bcast};
|
|
|
|
+
|
|
|
|
+ uint32_t wme_b[] = {edca_wme_acbe_bcast, edca_wme_acbk_bcast,
|
|
|
|
+ edca_wme_acvi_bcast, edca_wme_acvo_bcast};
|
|
|
|
+
|
|
|
|
+ uint32_t etsi_b[] = {edca_etsi_acbe_bcast, edca_etsi_acbk_bcast,
|
|
|
|
+ edca_etsi_acvi_bcast, edca_etsi_acvo_bcast};
|
|
|
|
+ edca_params = &pMac->mlme_cfg->edca_params;
|
|
|
|
|
|
if (wlan_cfg_get_str(pMac, WNI_CFG_COUNTRY_CODE, country_code_str,
|
|
if (wlan_cfg_get_str(pMac, WNI_CFG_COUNTRY_CODE, country_code_str,
|
|
&country_code_len) == QDF_STATUS_SUCCESS &&
|
|
&country_code_len) == QDF_STATUS_SUCCESS &&
|
|
@@ -237,21 +219,17 @@ sch_get_params(tpAniSirGlobal pMac,
|
|
}
|
|
}
|
|
|
|
|
|
for (i = 0; i < 4; i++) {
|
|
for (i = 0; i < 4; i++) {
|
|
- uint8_t data[WNI_CFG_EDCA_ANI_ACBK_LEN];
|
|
|
|
- uint32_t len = WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN;
|
|
|
|
|
|
+ uint8_t data[CFG_EDCA_DATA_LEN];
|
|
|
|
|
|
- if (wlan_cfg_get_str
|
|
|
|
- (pMac, (uint16_t) prf[i], (uint8_t *) &data[0],
|
|
|
|
- &len) != QDF_STATUS_SUCCESS) {
|
|
|
|
- pe_err("cfgGet failed for %d", prf[i]);
|
|
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
|
- }
|
|
|
|
- if (len > WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN) {
|
|
|
|
- pe_err("cfgGet for %d: length is %d instead of %d",
|
|
|
|
- prf[i], len, WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN);
|
|
|
|
|
|
+ status = wlan_mlme_get_edca_params(edca_params,
|
|
|
|
+ (uint8_t *)&data[0],
|
|
|
|
+ (uint8_t)prf[i]);
|
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
|
+ pe_err("Get failed for ac:%d", i);
|
|
return QDF_STATUS_E_FAILURE;
|
|
return QDF_STATUS_E_FAILURE;
|
|
}
|
|
}
|
|
- for (idx = 0; idx < len; idx++)
|
|
|
|
|
|
+
|
|
|
|
+ for (idx = 0; idx < CFG_EDCA_DATA_LEN; idx++)
|
|
params[i][idx] = (uint32_t) data[idx];
|
|
params[i][idx] = (uint32_t) data[idx];
|
|
}
|
|
}
|
|
pe_debug("GetParams: local=%d, profile = %d Done", local, val);
|
|
pe_debug("GetParams: local=%d, profile = %d Done", local, val);
|
|
@@ -327,7 +305,7 @@ broadcast_wmm_of_concurrent_sta_session(tpAniSirGlobal mac_ctx,
|
|
|
|
|
|
void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
{
|
|
{
|
|
- uint32_t params[4][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN];
|
|
|
|
|
|
+ uint32_t params[4][CFG_EDCA_DATA_LEN];
|
|
uint32_t cwminidx, cwmaxidx, txopidx;
|
|
uint32_t cwminidx, cwmaxidx, txopidx;
|
|
uint32_t phyMode;
|
|
uint32_t phyMode;
|
|
uint8_t i;
|
|
uint8_t i;
|
|
@@ -343,31 +321,31 @@ void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
pe_debug("QosUpdBcast: mode %d", phyMode);
|
|
pe_debug("QosUpdBcast: mode %d", phyMode);
|
|
|
|
|
|
if (phyMode == WNI_CFG_PHY_MODE_11G) {
|
|
if (phyMode == WNI_CFG_PHY_MODE_11G) {
|
|
- cwminidx = WNI_CFG_EDCA_PROFILE_CWMING_IDX;
|
|
|
|
- cwmaxidx = WNI_CFG_EDCA_PROFILE_CWMAXG_IDX;
|
|
|
|
- txopidx = WNI_CFG_EDCA_PROFILE_TXOPG_IDX;
|
|
|
|
|
|
+ cwminidx = CFG_EDCA_PROFILE_CWMING_IDX;
|
|
|
|
+ cwmaxidx = CFG_EDCA_PROFILE_CWMAXG_IDX;
|
|
|
|
+ txopidx = CFG_EDCA_PROFILE_TXOPG_IDX;
|
|
} else if (phyMode == WNI_CFG_PHY_MODE_11B) {
|
|
} else if (phyMode == WNI_CFG_PHY_MODE_11B) {
|
|
- cwminidx = WNI_CFG_EDCA_PROFILE_CWMINB_IDX;
|
|
|
|
- cwmaxidx = WNI_CFG_EDCA_PROFILE_CWMAXB_IDX;
|
|
|
|
- txopidx = WNI_CFG_EDCA_PROFILE_TXOPB_IDX;
|
|
|
|
|
|
+ cwminidx = CFG_EDCA_PROFILE_CWMINB_IDX;
|
|
|
|
+ cwmaxidx = CFG_EDCA_PROFILE_CWMAXB_IDX;
|
|
|
|
+ txopidx = CFG_EDCA_PROFILE_TXOPB_IDX;
|
|
} else {
|
|
} else {
|
|
/* This can happen if mode is not set yet, assume 11a mode */
|
|
/* This can happen if mode is not set yet, assume 11a mode */
|
|
- cwminidx = WNI_CFG_EDCA_PROFILE_CWMINA_IDX;
|
|
|
|
- cwmaxidx = WNI_CFG_EDCA_PROFILE_CWMAXA_IDX;
|
|
|
|
- txopidx = WNI_CFG_EDCA_PROFILE_TXOPA_IDX;
|
|
|
|
|
|
+ cwminidx = CFG_EDCA_PROFILE_CWMINA_IDX;
|
|
|
|
+ cwmaxidx = CFG_EDCA_PROFILE_CWMAXA_IDX;
|
|
|
|
+ txopidx = CFG_EDCA_PROFILE_TXOPA_IDX;
|
|
}
|
|
}
|
|
|
|
|
|
for (i = 0; i < MAX_NUM_AC; i++) {
|
|
for (i = 0; i < MAX_NUM_AC; i++) {
|
|
if (psessionEntry->gLimEdcaParamsBC[i].aci.acm !=
|
|
if (psessionEntry->gLimEdcaParamsBC[i].aci.acm !=
|
|
- (uint8_t) params[i][WNI_CFG_EDCA_PROFILE_ACM_IDX]) {
|
|
|
|
|
|
+ (uint8_t)params[i][CFG_EDCA_PROFILE_ACM_IDX]) {
|
|
psessionEntry->gLimEdcaParamsBC[i].aci.acm =
|
|
psessionEntry->gLimEdcaParamsBC[i].aci.acm =
|
|
- (uint8_t) params[i][WNI_CFG_EDCA_PROFILE_ACM_IDX];
|
|
|
|
|
|
+ (uint8_t)params[i][CFG_EDCA_PROFILE_ACM_IDX];
|
|
updated = true;
|
|
updated = true;
|
|
}
|
|
}
|
|
if (psessionEntry->gLimEdcaParamsBC[i].aci.aifsn !=
|
|
if (psessionEntry->gLimEdcaParamsBC[i].aci.aifsn !=
|
|
- (uint8_t) params[i][WNI_CFG_EDCA_PROFILE_AIFSN_IDX]) {
|
|
|
|
|
|
+ (uint8_t)params[i][CFG_EDCA_PROFILE_AIFSN_IDX]) {
|
|
psessionEntry->gLimEdcaParamsBC[i].aci.aifsn =
|
|
psessionEntry->gLimEdcaParamsBC[i].aci.aifsn =
|
|
- (uint8_t) params[i][WNI_CFG_EDCA_PROFILE_AIFSN_IDX];
|
|
|
|
|
|
+ (uint8_t)params[i][CFG_EDCA_PROFILE_AIFSN_IDX];
|
|
updated = true;
|
|
updated = true;
|
|
}
|
|
}
|
|
if (psessionEntry->gLimEdcaParamsBC[i].cw.min !=
|
|
if (psessionEntry->gLimEdcaParamsBC[i].cw.min !=
|
|
@@ -383,9 +361,9 @@ void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
updated = true;
|
|
updated = true;
|
|
}
|
|
}
|
|
if (psessionEntry->gLimEdcaParamsBC[i].txoplimit !=
|
|
if (psessionEntry->gLimEdcaParamsBC[i].txoplimit !=
|
|
- (uint16_t) params[i][txopidx]) {
|
|
|
|
|
|
+ (uint16_t)params[i][txopidx]) {
|
|
psessionEntry->gLimEdcaParamsBC[i].txoplimit =
|
|
psessionEntry->gLimEdcaParamsBC[i].txoplimit =
|
|
- (uint16_t) params[i][txopidx];
|
|
|
|
|
|
+ (uint16_t)params[i][txopidx];
|
|
updated = true;
|
|
updated = true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -416,7 +394,7 @@ void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
void sch_qos_update_local(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
void sch_qos_update_local(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
{
|
|
{
|
|
|
|
|
|
- uint32_t params[4][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN];
|
|
|
|
|
|
+ uint32_t params[4][CFG_EDCA_DATA_LEN];
|
|
QDF_STATUS status;
|
|
QDF_STATUS status;
|
|
|
|
|
|
status = sch_get_params(pMac, params, true /*local */);
|
|
status = sch_get_params(pMac, params, true /*local */);
|
|
@@ -432,16 +410,17 @@ void sch_qos_update_local(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
psessionEntry->bssIdx, false);
|
|
psessionEntry->bssIdx, false);
|
|
}
|
|
}
|
|
|
|
|
|
-/** ----------------------------------------------------------
|
|
|
|
- \fn sch_set_default_edca_params
|
|
|
|
- \brief This function sets the gLimEdcaParams to the default
|
|
|
|
- \ local wmm profile.
|
|
|
|
- \param tpAniSirGlobal pMac
|
|
|
|
- \return none
|
|
|
|
- \ ------------------------------------------------------------ */
|
|
|
|
|
|
+/**
|
|
|
|
+ * sch_set_default_edca_params() - This function sets the gLimEdcaParams to the
|
|
|
|
+ * default local wmm profile.
|
|
|
|
+ * @pMac - Global mac context
|
|
|
|
+ * @psessionEntry - PE session
|
|
|
|
+ *
|
|
|
|
+ * return none
|
|
|
|
+ */
|
|
void sch_set_default_edca_params(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
void sch_set_default_edca_params(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
{
|
|
{
|
|
- uint32_t params[4][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN];
|
|
|
|
|
|
+ uint32_t params[4][CFG_EDCA_DATA_LEN];
|
|
|
|
|
|
if (get_wmm_local_params(pMac, params) != QDF_STATUS_SUCCESS) {
|
|
if (get_wmm_local_params(pMac, params) != QDF_STATUS_SUCCESS) {
|
|
pe_err("get_wmm_local_params() failed");
|
|
pe_err("get_wmm_local_params() failed");
|
|
@@ -452,16 +431,18 @@ void sch_set_default_edca_params(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
-/** ----------------------------------------------------------
|
|
|
|
- \fn set_sch_edca_params
|
|
|
|
- \brief This function fills in the gLimEdcaParams structure
|
|
|
|
- \ with the given edca params.
|
|
|
|
- \param tpAniSirGlobal pMac
|
|
|
|
- \return none
|
|
|
|
- \ ------------------------------------------------------------ */
|
|
|
|
|
|
+/**
|
|
|
|
+ * set_sch_edca_params() - This function fills in the gLimEdcaParams structure
|
|
|
|
+ * with the given edca params.
|
|
|
|
+ * @pMac - global mac context
|
|
|
|
+ * @psessionEntry - PE session
|
|
|
|
+ * @params - EDCA parameters
|
|
|
|
+ *
|
|
|
|
+ * Return none
|
|
|
|
+ */
|
|
static void
|
|
static void
|
|
set_sch_edca_params(tpAniSirGlobal pMac,
|
|
set_sch_edca_params(tpAniSirGlobal pMac,
|
|
- uint32_t params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN],
|
|
|
|
|
|
+ uint32_t params[][CFG_EDCA_DATA_LEN],
|
|
tpPESession psessionEntry)
|
|
tpPESession psessionEntry)
|
|
{
|
|
{
|
|
uint32_t i;
|
|
uint32_t i;
|
|
@@ -473,33 +454,33 @@ set_sch_edca_params(tpAniSirGlobal pMac,
|
|
pe_debug("lim_get_phy_mode() = %d", phyMode);
|
|
pe_debug("lim_get_phy_mode() = %d", phyMode);
|
|
/* if (pMac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11G) */
|
|
/* if (pMac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11G) */
|
|
if (phyMode == WNI_CFG_PHY_MODE_11G) {
|
|
if (phyMode == WNI_CFG_PHY_MODE_11G) {
|
|
- cwminidx = WNI_CFG_EDCA_PROFILE_CWMING_IDX;
|
|
|
|
- cwmaxidx = WNI_CFG_EDCA_PROFILE_CWMAXG_IDX;
|
|
|
|
- txopidx = WNI_CFG_EDCA_PROFILE_TXOPG_IDX;
|
|
|
|
|
|
+ cwminidx = CFG_EDCA_PROFILE_CWMING_IDX;
|
|
|
|
+ cwmaxidx = CFG_EDCA_PROFILE_CWMAXG_IDX;
|
|
|
|
+ txopidx = CFG_EDCA_PROFILE_TXOPG_IDX;
|
|
}
|
|
}
|
|
/* else if (pMac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11B) */
|
|
/* else if (pMac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11B) */
|
|
else if (phyMode == WNI_CFG_PHY_MODE_11B) {
|
|
else if (phyMode == WNI_CFG_PHY_MODE_11B) {
|
|
- cwminidx = WNI_CFG_EDCA_PROFILE_CWMINB_IDX;
|
|
|
|
- cwmaxidx = WNI_CFG_EDCA_PROFILE_CWMAXB_IDX;
|
|
|
|
- txopidx = WNI_CFG_EDCA_PROFILE_TXOPB_IDX;
|
|
|
|
|
|
+ cwminidx = CFG_EDCA_PROFILE_CWMINB_IDX;
|
|
|
|
+ cwmaxidx = CFG_EDCA_PROFILE_CWMAXB_IDX;
|
|
|
|
+ txopidx = CFG_EDCA_PROFILE_TXOPB_IDX;
|
|
} else {
|
|
} else {
|
|
/* This can happen if mode is not set yet, assume 11a mode */
|
|
/* This can happen if mode is not set yet, assume 11a mode */
|
|
- cwminidx = WNI_CFG_EDCA_PROFILE_CWMINA_IDX;
|
|
|
|
- cwmaxidx = WNI_CFG_EDCA_PROFILE_CWMAXA_IDX;
|
|
|
|
- txopidx = WNI_CFG_EDCA_PROFILE_TXOPA_IDX;
|
|
|
|
|
|
+ cwminidx = CFG_EDCA_PROFILE_CWMINA_IDX;
|
|
|
|
+ cwmaxidx = CFG_EDCA_PROFILE_CWMAXA_IDX;
|
|
|
|
+ txopidx = CFG_EDCA_PROFILE_TXOPA_IDX;
|
|
}
|
|
}
|
|
|
|
|
|
for (i = 0; i < MAX_NUM_AC; i++) {
|
|
for (i = 0; i < MAX_NUM_AC; i++) {
|
|
psessionEntry->gLimEdcaParams[i].aci.acm =
|
|
psessionEntry->gLimEdcaParams[i].aci.acm =
|
|
- (uint8_t) params[i][WNI_CFG_EDCA_PROFILE_ACM_IDX];
|
|
|
|
|
|
+ (uint8_t)params[i][CFG_EDCA_PROFILE_ACM_IDX];
|
|
psessionEntry->gLimEdcaParams[i].aci.aifsn =
|
|
psessionEntry->gLimEdcaParams[i].aci.aifsn =
|
|
- (uint8_t) params[i][WNI_CFG_EDCA_PROFILE_AIFSN_IDX];
|
|
|
|
|
|
+ (uint8_t)params[i][CFG_EDCA_PROFILE_AIFSN_IDX];
|
|
psessionEntry->gLimEdcaParams[i].cw.min =
|
|
psessionEntry->gLimEdcaParams[i].cw.min =
|
|
convert_cw(GET_CW(¶ms[i][cwminidx]));
|
|
convert_cw(GET_CW(¶ms[i][cwminidx]));
|
|
psessionEntry->gLimEdcaParams[i].cw.max =
|
|
psessionEntry->gLimEdcaParams[i].cw.max =
|
|
convert_cw(GET_CW(¶ms[i][cwmaxidx]));
|
|
convert_cw(GET_CW(¶ms[i][cwmaxidx]));
|
|
psessionEntry->gLimEdcaParams[i].txoplimit =
|
|
psessionEntry->gLimEdcaParams[i].txoplimit =
|
|
- (uint16_t) params[i][txopidx];
|
|
|
|
|
|
+ (uint16_t)params[i][txopidx];
|
|
|
|
|
|
pe_debug("AC :%d: AIFSN: %d, ACM %d, CWmin %d, CWmax %d, TxOp %d",
|
|
pe_debug("AC :%d: AIFSN: %d, ACM %d, CWmin %d, CWmax %d, TxOp %d",
|
|
i, psessionEntry->gLimEdcaParams[i].aci.aifsn,
|
|
i, psessionEntry->gLimEdcaParams[i].aci.aifsn,
|
|
@@ -512,53 +493,54 @@ set_sch_edca_params(tpAniSirGlobal pMac,
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
-/** ----------------------------------------------------------
|
|
|
|
- \fn get_wmm_local_params
|
|
|
|
- \brief This function gets the WMM local edca parameters.
|
|
|
|
- \param tpAniSirGlobal pMac
|
|
|
|
- \param uint32_t params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN]
|
|
|
|
- \return none
|
|
|
|
- \ ------------------------------------------------------------ */
|
|
|
|
|
|
+/**
|
|
|
|
+ * get_wmm_local_params() - This function gets the WMM local edca parameters.
|
|
|
|
+ * @pMac
|
|
|
|
+ * @params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN]
|
|
|
|
+ *
|
|
|
|
+ * Return none
|
|
|
|
+ */
|
|
static QDF_STATUS
|
|
static QDF_STATUS
|
|
-get_wmm_local_params(tpAniSirGlobal pMac,
|
|
|
|
- uint32_t params[][WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN])
|
|
|
|
|
|
+get_wmm_local_params(tpAniSirGlobal mac_ctx,
|
|
|
|
+ uint32_t params[][CFG_EDCA_DATA_LEN])
|
|
{
|
|
{
|
|
uint32_t i, idx;
|
|
uint32_t i, idx;
|
|
- uint32_t *prf;
|
|
|
|
- uint32_t wme_l[] = {
|
|
|
|
- WNI_CFG_EDCA_WME_ACBE_LOCAL, WNI_CFG_EDCA_WME_ACBK_LOCAL,
|
|
|
|
- WNI_CFG_EDCA_WME_ACVI_LOCAL, WNI_CFG_EDCA_WME_ACVO_LOCAL};
|
|
|
|
|
|
+ QDF_STATUS status;
|
|
|
|
+ struct wlan_mlme_edca_params *edca_params;
|
|
|
|
+ uint32_t wme_l[] = {edca_wme_acbe_local, edca_wme_acbk_local,
|
|
|
|
+ edca_wme_acvi_local, edca_wme_acvo_local};
|
|
|
|
|
|
- prf = &wme_l[0];
|
|
|
|
|
|
+ if (!mac_ctx->mlme_cfg) {
|
|
|
|
+ pe_err("NULL mlme cfg");
|
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ edca_params = &mac_ctx->mlme_cfg->edca_params;
|
|
for (i = 0; i < 4; i++) {
|
|
for (i = 0; i < 4; i++) {
|
|
- uint8_t data[WNI_CFG_EDCA_ANI_ACBK_LEN];
|
|
|
|
- uint32_t len = WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN;
|
|
|
|
|
|
+ uint8_t data[CFG_EDCA_DATA_LEN];
|
|
|
|
|
|
- if (wlan_cfg_get_str
|
|
|
|
- (pMac, (uint16_t) prf[i], (uint8_t *) &data[0],
|
|
|
|
- &len) != QDF_STATUS_SUCCESS) {
|
|
|
|
- pe_err("cfgGet failed for %d", prf[i]);
|
|
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
|
- }
|
|
|
|
- if (len > WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN) {
|
|
|
|
- pe_err("cfgGet for %d: length is %d instead of %d",
|
|
|
|
- prf[i], len, WNI_CFG_EDCA_ANI_ACBK_LOCAL_LEN);
|
|
|
|
|
|
+ status = wlan_mlme_get_edca_params(edca_params,
|
|
|
|
+ (uint8_t *)&data[0],
|
|
|
|
+ (uint8_t)wme_l[i]);
|
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
|
+ pe_err("Get failed for ac:[%d]", i);
|
|
return QDF_STATUS_E_FAILURE;
|
|
return QDF_STATUS_E_FAILURE;
|
|
}
|
|
}
|
|
- for (idx = 0; idx < len; idx++)
|
|
|
|
|
|
+ for (idx = 0; idx < CFG_EDCA_DATA_LEN; idx++)
|
|
params[i][idx] = (uint32_t) data[idx];
|
|
params[i][idx] = (uint32_t) data[idx];
|
|
}
|
|
}
|
|
return QDF_STATUS_SUCCESS;
|
|
return QDF_STATUS_SUCCESS;
|
|
}
|
|
}
|
|
|
|
|
|
-/** ----------------------------------------------------------
|
|
|
|
- \fn sch_edca_profile_update
|
|
|
|
- \brief This function updates the local and broadcast
|
|
|
|
- \ EDCA params in the gLimEdcaParams structure. It also
|
|
|
|
- \ updates the edcaParamSetCount.
|
|
|
|
- \param tpAniSirGlobal pMac
|
|
|
|
- \return none
|
|
|
|
- \ ------------------------------------------------------------ */
|
|
|
|
|
|
+/**
|
|
|
|
+ * sch_edca_profile_update() - This function updates the local and broadcast
|
|
|
|
+ * EDCA params in the gLimEdcaParams structure. It also updates the
|
|
|
|
+ * edcaParamSetCount.
|
|
|
|
+ *
|
|
|
|
+ * @pMac - global mac context
|
|
|
|
+ *
|
|
|
|
+ * Return none
|
|
|
|
+ */
|
|
void sch_edca_profile_update(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
void sch_edca_profile_update(tpAniSirGlobal pMac, tpPESession psessionEntry)
|
|
{
|
|
{
|
|
if (LIM_IS_AP_ROLE(psessionEntry) ||
|
|
if (LIM_IS_AP_ROLE(psessionEntry) ||
|