summaryrefslogtreecommitdiff
path: root/core/sme
diff options
context:
space:
mode:
Diffstat (limited to 'core/sme')
-rw-r--r--core/sme/inc/sme_qos_api.h4
-rw-r--r--core/sme/src/common/sme_api.c17
2 files changed, 7 insertions, 14 deletions
diff --git a/core/sme/inc/sme_qos_api.h b/core/sme/inc/sme_qos_api.h
index de71f94feb..da4c3914f6 100644
--- a/core/sme/inc/sme_qos_api.h
+++ b/core/sme/inc/sme_qos_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-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
@@ -133,6 +133,8 @@ enum sme_qos_statustype {
};
+#define WLAN_MAX_DSCP 0x3f
+
/*
* Enumeration of the various User priority (UP) types
* From 802.1D/802.11e/WMM specifications (all refer to same table)
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index fa1e831e03..f23e630e87 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -10717,24 +10717,15 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(tHalHandle hHal,
sme_release_global_lock(&pMac->sme);
return QDF_STATUS_E_FAILURE;
}
+
for (i = 0; i < SME_QOS_WMM_UP_MAX; i++) {
for (j = pSession->QosMapSet.dscp_range[i][0];
- j <= pSession->QosMapSet.dscp_range[i][1];
- j++) {
- if ((pSession->QosMapSet.dscp_range[i][0] == 255)
- && (pSession->QosMapSet.dscp_range[i][1] ==
- 255)) {
- QDF_TRACE(QDF_MODULE_ID_SME,
- QDF_TRACE_LEVEL_DEBUG,
- FL("User Priority %d isn't used"), i);
- break;
- } else {
+ j <= pSession->QosMapSet.dscp_range[i][1] &&
+ j <= WLAN_MAX_DSCP; j++)
dscpmapping[j] = i;
- }
- }
}
for (i = 0; i < pSession->QosMapSet.num_dscp_exceptions; i++)
- if (pSession->QosMapSet.dscp_exceptions[i][0] != 255)
+ if (pSession->QosMapSet.dscp_exceptions[i][0] <= WLAN_MAX_DSCP)
dscpmapping[pSession->QosMapSet.dscp_exceptions[i][0]] =
pSession->QosMapSet.dscp_exceptions[i][1];