diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-10-18 08:13:58 -0700 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2018-10-18 08:13:58 -0700 |
| commit | ca66afb4e8b716dd2b0f7cd8726c79b80d921e4d (patch) | |
| tree | 50867b4e0e11755acf39fa2d3fd5ce124c1faf67 | |
| parent | 60da3228535148fcaef47436efd52bd3310811a4 (diff) | |
| parent | 570ca6e453b6704067510be80c2c0aead87affec (diff) | |
Merge 570ca6e453b6704067510be80c2c0aead87affec on remote branch
Change-Id: I6a7f3c959e6049b092b5b1fce315137501e8b6d3
| -rw-r--r-- | hif/src/hif_hw_version.h | 3 | ||||
| -rw-r--r-- | hif/src/hif_main.c | 5 | ||||
| -rw-r--r-- | qdf/inc/qdf_nbuf.h | 3 | ||||
| -rw-r--r-- | qdf/linux/src/i_qdf_time.h | 7 | ||||
| -rw-r--r-- | qdf/linux/src/qdf_nbuf.c | 9 | ||||
| -rw-r--r-- | qdf/linux/src/qdf_trace.c | 4 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_param.h | 2 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_tlv.c | 34 |
8 files changed, 54 insertions, 13 deletions
diff --git a/hif/src/hif_hw_version.h b/hif/src/hif_hw_version.h index 8487d1d69e6c..775ac167e793 100644 --- a/hif/src/hif_hw_version.h +++ b/hif/src/hif_hw_version.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 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 @@ -34,6 +34,7 @@ #define WCN3990_v1 0x40000000 #define WCN3990_v2 0x40010000 #define WCN3990_v2_1 0x40010002 +#define WCN3998 0x40030001 struct qwlan_hw { u32 id; diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 94f9c70593bf..6892d72c1c76 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -292,6 +292,11 @@ static const struct qwlan_hw qwlan_hw_list[] = { .name = "WCN3990_V2.1", }, { + .id = WCN3998, + .subid = 0x0, + .name = "WCN3998", + }, + { .id = QCA9379_REV1_VERSION, .subid = 0xC, .name = "QCA9379_REV1", diff --git a/qdf/inc/qdf_nbuf.h b/qdf/inc/qdf_nbuf.h index 070ceebf78c4..27dbb7c2b33c 100644 --- a/qdf/inc/qdf_nbuf.h +++ b/qdf/inc/qdf_nbuf.h @@ -884,7 +884,8 @@ qdf_nbuf_alloc(qdf_device_t osdev, static inline void qdf_nbuf_free(qdf_nbuf_t buf) { - __qdf_nbuf_free(buf); + if (qdf_likely(buf)) + __qdf_nbuf_free(buf); } /** diff --git a/qdf/linux/src/i_qdf_time.h b/qdf/linux/src/i_qdf_time.h index 6cc21897d55c..68bc120ed04b 100644 --- a/qdf/linux/src/i_qdf_time.h +++ b/qdf/linux/src/i_qdf_time.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2016, 2018 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 @@ -28,8 +28,6 @@ #include <linux/delay.h> #ifdef MSM_PLATFORM #include <asm/arch_timer.h> -#else -#include <linux/ktime.h> #endif #ifdef CONFIG_CNSS #include <net/cnss.h> @@ -182,8 +180,7 @@ static inline uint64_t __qdf_get_monotonic_boottime(void) return ((uint64_t) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); } -#ifdef QCA_WIFI_3_0_ADRASTEA -#include <asm/arch_timer.h> +#if defined (QCA_WIFI_3_0_ADRASTEA) && defined (MSM_PLATFORM) /** * __qdf_get_log_timestamp() - get QTIMER ticks diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index 2b2690785109..32226d4c9b08 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -2373,14 +2373,15 @@ qdf_export_symbol(qdf_nbuf_alloc_debug); void qdf_nbuf_free_debug(qdf_nbuf_t nbuf, uint8_t *file, uint32_t line) { + if (qdf_unlikely(!nbuf)) + return; + if (qdf_nbuf_is_tso(nbuf) && qdf_nbuf_get_users(nbuf) > 1) goto free_buf; /* Remove SKB from internal QDF tracking table */ - if (qdf_likely(nbuf)) { - qdf_net_buf_debug_delete_node(nbuf); - qdf_nbuf_history_add(nbuf, file, line, QDF_NBUF_FREE); - } + qdf_net_buf_debug_delete_node(nbuf); + qdf_nbuf_history_add(nbuf, file, line, QDF_NBUF_FREE); free_buf: __qdf_nbuf_free(nbuf); diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index df38647d55fb..0f5f2590ecaf 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -1940,7 +1940,9 @@ void qdf_dp_trace_data_pkt(qdf_nbuf_t nbuf, if (qdf_dp_enable_check(nbuf, code, dir) == false) return; - qdf_dp_add_record(code, qdf_nbuf_data(nbuf), nbuf->len - nbuf->data_len, + qdf_dp_add_record(code, + nbuf ? qdf_nbuf_data(nbuf) : NULL, + nbuf ? nbuf->len - nbuf->data_len : 0, (uint8_t *)&buf, sizeof(struct qdf_dp_trace_data_buf), (nbuf) ? QDF_NBUF_CB_DP_TRACE_PRINT(nbuf) : false); diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 5f0bc99bd26f..4ea794073236 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -2929,6 +2929,7 @@ struct dhcp_stop_ind_params { * @tspec: tspec value * @status: CDF status * @sessionId: session id + * @vdev_id: vdev-id */ struct aggr_add_ts_param { uint16_t staIdx; @@ -2936,6 +2937,7 @@ struct aggr_add_ts_param { struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX]; QDF_STATUS status[WMI_QOS_NUM_AC_MAX]; uint8_t sessionId; + uint8_t vdev_id; }; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 76102b391fd2..dc2c905eb96c 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -4209,6 +4209,12 @@ static QDF_STATUS extract_sar_limit_event_tlv(wmi_unified_t wmi_handle, event->sar_enable = fixed_param->sar_enable; event->num_limit_rows = fixed_param->num_limit_rows; + if (event->num_limit_rows > param_buf->num_sar_get_limits) { + WMI_LOGE(FL("Num rows %d exceeds sar_get_limits rows len %d"), + event->num_limit_rows, param_buf->num_sar_get_limits); + return QDF_STATUS_E_INVAL; + } + if (event->num_limit_rows > MAX_SAR_LIMIT_ROWS_SUPPORTED) { QDF_ASSERT(0); WMI_LOGE(FL("Num rows %d exceeds max of %d"), @@ -8976,7 +8982,7 @@ QDF_STATUS send_aggr_qos_cmd_tlv(wmi_unified_t wmi_handle, WMITLV_TAG_STRUC_wmi_vdev_wmm_addts_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN (wmi_vdev_wmm_addts_cmd_fixed_param)); - cmd->vdev_id = aggr_qos_rsp_msg->sessionId; + cmd->vdev_id = aggr_qos_rsp_msg->vdev_id; cmd->ac = WMI_TID_TO_AC(aggr_qos_rsp_msg->tspec[i].tsinfo. traffic.userPrio); @@ -13559,6 +13565,7 @@ static QDF_STATUS extract_all_stats_counts_tlv(wmi_unified_t wmi_handle, { WMI_UPDATE_STATS_EVENTID_param_tlvs *param_buf; wmi_stats_event_fixed_param *ev; + uint64_t min_data_len; param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *) evt_buf; @@ -13568,6 +13575,11 @@ static QDF_STATUS extract_all_stats_counts_tlv(wmi_unified_t wmi_handle, return QDF_STATUS_E_FAILURE; } + if (param_buf->num_data > WMI_SVC_MSG_MAX_SIZE - sizeof(*ev)) { + WMI_LOGE("num_data : %u is invalid", param_buf->num_data); + return QDF_STATUS_E_FAULT; + } + switch (ev->stats_id) { case WMI_REQUEST_PEER_STAT: stats_param->stats_id = WMI_HOST_REQUEST_PEER_STAT; @@ -13599,6 +13611,26 @@ static QDF_STATUS extract_all_stats_counts_tlv(wmi_unified_t wmi_handle, } + /* ev->num_*_stats may cause uint32_t overflow, so use uint64_t + * to save total length calculated + */ + min_data_len = + (((uint64_t)ev->num_pdev_stats) * sizeof(wmi_pdev_stats)) + + (((uint64_t)ev->num_vdev_stats) * sizeof(wmi_vdev_stats)) + + (((uint64_t)ev->num_peer_stats) * sizeof(wmi_peer_stats)) + + (((uint64_t)ev->num_bcnflt_stats) * + sizeof(wmi_bcnfilter_stats_t)) + + (((uint64_t)ev->num_chan_stats) * sizeof(wmi_chan_stats)) + + (((uint64_t)ev->num_mib_stats) * sizeof(wmi_mib_stats)) + + (((uint64_t)ev->num_bcn_stats) * sizeof(wmi_bcn_stats)) + + (((uint64_t)ev->num_peer_extd_stats) * + sizeof(wmi_peer_extd_stats)); + if (param_buf->num_data != min_data_len) { + WMI_LOGE("data len: %u isn't same as calculated: %llu", + param_buf->num_data, min_data_len); + return QDF_STATUS_E_FAULT; + } + stats_param->num_pdev_stats = ev->num_pdev_stats; stats_param->num_pdev_ext_stats = 0; stats_param->num_vdev_stats = ev->num_vdev_stats; |
