diff options
author | SecurityBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2020-05-08 14:21:23 -0700 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2020-05-08 14:21:23 -0700 |
commit | d4df0084d3997af0dc435214f7b5ca940c0fadf6 (patch) | |
tree | ae51ac9e9d10daaecf60a76e008b61f7b3ed418b | |
parent | d427a5666db3a8d1385faed8b4132bb4276eeca6 (diff) | |
parent | e515b965340b03ce3d88cfee6aefc2be58f78b48 (diff) | |
download | qcacld-d4df0084d3997af0dc435214f7b5ca940c0fadf6.tar.gz |
Merge android-msm-pixel-4.9-qt-qpr1 into android-msm-pixel-4.9-qt-qpr2
SBMerger: 284775313
Change-Id: Id67342a31d51a7b2c047449c175ddad3beb360d6
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 2 | ||||
-rw-r--r-- | core/hdd/inc/wlan_hdd_wmm.h | 4 | ||||
-rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 9 | ||||
-rw-r--r-- | core/hdd/src/wlan_hdd_wmm.c | 6 | ||||
-rw-r--r-- | core/sme/inc/sme_qos_api.h | 4 | ||||
-rw-r--r-- | core/sme/src/common/sme_api.c | 15 |
6 files changed, 17 insertions, 23 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 2c5e22d90f..99d044d42a 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1545,7 +1545,7 @@ struct hdd_adapter_s { bool offloads_configured; /* DSCP to UP QoS Mapping */ - sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_HDD_MAX_DSCP + 1]; + sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_MAX_DSCP + 1]; #ifdef WLAN_FEATURE_LINK_LAYER_STATS bool isLinkLayerStatsSet; diff --git a/core/hdd/inc/wlan_hdd_wmm.h b/core/hdd/inc/wlan_hdd_wmm.h index f0a55b1222..3dd9b08264 100644 --- a/core/hdd/inc/wlan_hdd_wmm.h +++ b/core/hdd/inc/wlan_hdd_wmm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012,2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012,2016-2017, 2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -203,8 +203,6 @@ extern const uint8_t hdd_qdisc_ac_to_tl_ac[]; extern const uint8_t hdd_wmm_up_to_ac_map[]; extern const uint8_t hdd_linux_up_to_ac_map[]; -#define WLAN_HDD_MAX_DSCP 0x3f - /** * hdd_wmmps_helper() - Function to set uapsd psb dynamically * diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 632ea39bfa..b543894b5a 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2202,8 +2202,9 @@ static void hdd_send_re_assoc_event(struct net_device *dev, goto done; } - if (pCsrRoamInfo->nAssocRspLength == 0) { - hdd_err("Assoc rsp length is 0"); + if (pCsrRoamInfo->nAssocRspLength < FT_ASSOC_RSP_IES_OFFSET) { + hdd_err("Invalid assoc rsp length %d", + pCsrRoamInfo->nAssocRspLength); goto done; } @@ -2233,6 +2234,10 @@ static void hdd_send_re_assoc_event(struct net_device *dev, /* Send the Assoc Resp, the supplicant needs this for initial Auth */ len = pCsrRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET; + if (len > IW_GENERIC_IE_MAX) { + hdd_err("Invalid Assoc resp length %d", len); + goto done; + } rspRsnLength = len; qdf_mem_copy(rspRsnIe, pFTAssocRsp, len); qdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len); diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c index fca558d6e2..a77475f110 100644 --- a/core/hdd/src/wlan_hdd_wmm.c +++ b/core/hdd/src/wlan_hdd_wmm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -63,8 +63,6 @@ #include <cds_sched.h> #include "sme_api.h" -#define WLAN_HDD_MAX_DSCP 0x3f - #define HDD_WMM_UP_TO_AC_MAP_SIZE 8 const uint8_t hdd_wmm_up_to_ac_map[] = { @@ -1265,7 +1263,7 @@ QDF_STATUS hdd_wmm_init(hdd_adapter_t *pAdapter) /* DSCP to User Priority Lookup Table * By default use the 3 Precedence bits of DSCP as the User Priority */ - for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++) + for (dscp = 0; dscp <= WLAN_MAX_DSCP; dscp++) hddWmmDscpToUpMap[dscp] = dscp >> 3; /* Special case for Expedited Forwarding (DSCP 46) */ diff --git a/core/sme/inc/sme_qos_api.h b/core/sme/inc/sme_qos_api.h index 0dd9fbcdce..6f66788fa3 100644 --- a/core/sme/inc/sme_qos_api.h +++ b/core/sme/inc/sme_qos_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017, 2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -51,6 +51,8 @@ #define SME_QOS_UAPSD_VI 0x02 #define SME_QOS_UAPSD_BE 0x08 #define SME_QOS_UAPSD_BK 0x04 +#define WLAN_MAX_DSCP 0x3f + /*--------------------------------------------------------------------------- Enumeration of the various QoS status types that would be reported to HDD diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 7f35338077..8e2cd34478 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -13927,21 +13927,12 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(tHalHandle hHal, } 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_ERROR, - FL("User Priority %d isn't used"), i); - break; - } + 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]; |