diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-12-20 11:20:03 -0700 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2016-12-20 11:20:04 -0700 |
| commit | 6b47bfa2229c234fc3ec63985109a2f4f2e231e3 (patch) | |
| tree | 4a901d9c28e5199f3e6e69ddedaa644d0249757f | |
| parent | 0338b4ced9fe099daa9801c8737661be45e77241 (diff) | |
| parent | c830ff7be17cfe5051a6cc819a8935bdb22f06f4 (diff) | |
Promotion of wlan-cmn.driver.lnx.1.0-00112.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
688141 I1e76156b8d64fef7a611336a89aef1d50f7d3174 Release 5.1.0.26C
1098102 I0a214a2af780e9dd8c381c4e9eaa7d8cab6ef853 qcacmn: Add SAR power limit configuration
688141 Ifb0a7aa9b24af7b32d37592630d708fc3dd6993d Release 5.1.0.26D
1091678 I9d2b84560ee2363ecf2a570dbef0275dfb87786a qcacmn: Harden NAPI event handler
1098928 Ibad674e3b94a2c7ac5cbefa5fc18efb48f6ca694 qcacmn: Change time format and default configuration in
688141 I1912bb6fb46f19fe9387a6ba83e02f8d6990c820 Release 5.1.0.26E
865207 I8118ff09e89991c0b2ff3ac950547c2ee74c16b6 qcacmn: CL 2710751 - update fw common interface files
688141 I1cfb5586fd15c78901eb582ba1b9d9a3fe76bba6 Release 5.1.0.26F
Change-Id: I876cf452d3232f72f9f611cc7427f0ef3f2016c3
CRs-Fixed: 688141, 1098928, 1098102, 865207, 1091678
| -rw-r--r-- | VERSION.txt | 2 | ||||
| -rw-r--r-- | hif/src/hif_napi.c | 5 | ||||
| -rw-r--r-- | qdf/inc/qdf_trace.h | 2 | ||||
| -rw-r--r-- | qdf/linux/src/qdf_trace.c | 27 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_api.h | 2 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_param.h | 32 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_priv.h | 3 | ||||
| -rw-r--r-- | wmi/src/wmi_unified.c | 1 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_api.c | 19 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_tlv.c | 83 |
10 files changed, 165 insertions, 11 deletions
diff --git a/VERSION.txt b/VERSION.txt index bf42a95b4381..18ad31b435b9 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.26B +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.26F Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c index f7fc8131b6e2..1269ecb7d079 100644 --- a/hif/src/hif_napi.c +++ b/hif/src/hif_napi.c @@ -476,6 +476,11 @@ int hif_napi_event(struct hif_opaque_softc *hif_ctx, enum qca_napi_event event, NAPI_DEBUG("%s: -->(event=%d, aux=%p)", __func__, event, data); + if ((napid->state & HIF_NAPI_INITED) == 0) { + NAPI_DEBUG("%s: got event when NAPI not initialized", + __func__); + return -EINVAL; + } spin_lock_bh(&(napid->lock)); prev_state = napid->state; switch (event) { diff --git a/qdf/inc/qdf_trace.h b/qdf/inc/qdf_trace.h index e95dbc636e7e..9543b2e2661f 100644 --- a/qdf/inc/qdf_trace.h +++ b/qdf/inc/qdf_trace.h @@ -312,7 +312,7 @@ struct qdf_dp_trace_event_buf { * @pid : process id which stored the data in this record */ struct qdf_dp_trace_record_s { - uint64_t time; + char time[20]; uint8_t code; uint8_t data[QDF_DP_TRACE_RECORD_SIZE]; uint8_t size; diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index 4e002bbb4103..03bb533889f3 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -813,6 +813,9 @@ void qdf_dp_trace_init(void) g_qdf_dp_trace_data.no_of_record = 0; g_qdf_dp_trace_data.verbosity = QDF_DP_TRACE_VERBOSITY_HIGH; g_qdf_dp_trace_data.enable = true; + g_qdf_dp_trace_data.tx_count = 0; + g_qdf_dp_trace_data.rx_count = 0; + g_qdf_dp_trace_data.live_mode = 0; for (i = 0; i < ARRAY_SIZE(qdf_dp_trace_cb_table); i++) qdf_dp_trace_cb_table[i] = qdf_dp_display_record; @@ -1193,7 +1196,8 @@ static void qdf_dp_add_record(enum QDF_DP_TRACE_ID code, rec->size = size; qdf_mem_copy(rec->data, data, size); } - rec->time = qdf_get_log_timestamp(); + qdf_get_time_of_the_day_in_hr_min_sec_usec(rec->time, + sizeof(rec->time)); rec->pid = (in_interrupt() ? 0 : current->pid); spin_unlock_bh(&l_dp_trace_lock); @@ -1343,7 +1347,7 @@ void qdf_dp_display_mgmt_pkt(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_mgmt_buf *buf = (struct qdf_dp_trace_mgmt_buf *)record->data; - DPTRACE_PRINT("DPT: %04d: %012llu: %s vdev_id %d", index, + DPTRACE_PRINT("DPT: %04d: %s: %s vdev_id %d", index, record->time, qdf_dp_code_to_string(record->code), buf->vdev_id); DPTRACE_PRINT("DPT: Type %s Subtype %s", qdf_dp_type_to_str(buf->type), @@ -1392,7 +1396,7 @@ void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_event_buf *buf = (struct qdf_dp_trace_event_buf *)record->data; - DPTRACE_PRINT("DPT: %04d: %012llu: %s vdev_id %d", index, + DPTRACE_PRINT("DPT: %04d: %s: %s vdev_id %d", index, record->time, qdf_dp_code_to_string(record->code), buf->vdev_id); DPTRACE_PRINT("DPT: Type %s Subtype %s", qdf_dp_type_to_str(buf->type), @@ -1441,7 +1445,7 @@ void qdf_dp_display_proto_pkt(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_proto_buf *buf = (struct qdf_dp_trace_proto_buf *)record->data; - DPTRACE_PRINT("DPT: %04d: %012llu: %s vdev_id %d", index, + DPTRACE_PRINT("DPT: %04d: %s: %s vdev_id %d", index, record->time, qdf_dp_code_to_string(record->code), buf->vdev_id); DPTRACE_PRINT("DPT: SA: " QDF_MAC_ADDRESS_STR " %s DA: " @@ -1502,12 +1506,12 @@ void qdf_dp_display_ptr_record(struct qdf_dp_trace_record_s *record, (struct qdf_dp_trace_ptr_buf *)record->data; if (record->code == QDF_DP_TRACE_FREE_PACKET_PTR_RECORD) - DPTRACE_PRINT("DPT: %04d: %012llu: %s msdu_id: %d, status: %d", + DPTRACE_PRINT("DPT: %04d: %s: %s msdu_id: %d, status: %d", index, record->time, qdf_dp_code_to_string(record->code), buf->msdu_id, buf->status); else - DPTRACE_PRINT("DPT: %04d: %012llu: %s msdu_id: %d, vdev_id: %d", + DPTRACE_PRINT("DPT: %04d: %s: %s msdu_id: %d, vdev_id: %d", index, record->time, qdf_dp_code_to_string(record->code), buf->msdu_id, buf->status); @@ -1555,7 +1559,7 @@ EXPORT_SYMBOL(qdf_dp_trace_ptr); void qdf_dp_display_record(struct qdf_dp_trace_record_s *pRecord, uint16_t recIndex) { - DPTRACE_PRINT("DPT: %04d: %012llu: %s", recIndex, + DPTRACE_PRINT("DPT: %04d: %s: %s", recIndex, pRecord->time, qdf_dp_code_to_string(pRecord->code)); switch (pRecord->code) { case QDF_DP_TRACE_HDD_TX_TIMEOUT: @@ -1632,10 +1636,15 @@ void qdf_dp_trace_clear_buffer(void) g_qdf_dp_trace_data.tail = INVALID_QDF_DP_TRACE_ADDR; g_qdf_dp_trace_data.num = 0; g_qdf_dp_trace_data.proto_bitmap = QDF_NBUF_PKT_TRAC_TYPE_EAPOL | - QDF_NBUF_PKT_TRAC_TYPE_DHCP | QDF_NBUF_PKT_TRAC_TYPE_MGMT_ACTION; + QDF_NBUF_PKT_TRAC_TYPE_DHCP | + QDF_NBUF_PKT_TRAC_TYPE_MGMT_ACTION | + QDF_NBUF_PKT_TRAC_TYPE_ARP; g_qdf_dp_trace_data.no_of_record = 0; - g_qdf_dp_trace_data.verbosity = QDF_DP_TRACE_VERBOSITY_LOW; + g_qdf_dp_trace_data.verbosity = QDF_DP_TRACE_VERBOSITY_HIGH; g_qdf_dp_trace_data.enable = true; + g_qdf_dp_trace_data.tx_count = 0; + g_qdf_dp_trace_data.rx_count = 0; + g_qdf_dp_trace_data.live_mode = 0; memset(g_qdf_dp_trace_tbl, 0, MAX_QDF_DP_TRACE_RECORDS * sizeof(struct qdf_dp_trace_record_s)); diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index f1d20922d6ca..580edda584ea 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -1277,6 +1277,8 @@ QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, struct wmi_power_dbg_params *param); +QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, + struct sar_limit_cmd_params *params); QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl, struct wmi_adaptive_dwelltime_params * wmi_param); diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index a219568bc460..6b24fa743abc 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6616,5 +6616,37 @@ struct encrypt_decrypt_req_params { uint8_t *data; }; +#define MAX_SAR_LIMIT_ROWS_SUPPORTED 64 +/** + * struct sar_limit_cmd_row - sar limts row + * @band_id: Optional param for frequency band + * @chain_id: Optional param for antenna chain id + * @mod_id: Optional param for modulation scheme + * @limit_value: Mandatory param providing power limits in steps of 0.5 dbm + * @validity_bitmap: bitmap of valid optional params in sar_limit_cmd_row struct + */ +struct sar_limit_cmd_row { + uint32_t band_id; + uint32_t chain_id; + uint32_t mod_id; + uint32_t limit_value; + uint32_t validity_bitmap; +}; + +/** + * struct sar_limit_cmd_params - sar limts params + * @sar_enable: flag to enable SAR + * @num_limit_rows: number of items in sar_limits + * @commit_limits: indicates firmware to start apply new SAR values + * @sar_limit_row_list: pointer to array of sar limit rows + */ +struct sar_limit_cmd_params { + uint32_t sar_enable; + uint32_t num_limit_rows; + uint32_t commit_limits; + struct sar_limit_cmd_row *sar_limit_row_list; +}; + + #endif /* _WMI_UNIFIED_PARAM_H_ */ diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 3c376ff0a382..0bafe462c2e8 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1136,6 +1136,9 @@ QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle, struct encrypt_decrypt_req_params *params); + +QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle, + struct sar_limit_cmd_params *params); }; struct target_abi_version { diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index 75070c34c821..5fab8dc5f2bd 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1644,6 +1644,7 @@ static uint8_t *wmi_id_to_name(uint32_t wmi_command) CASE_RETURN_STRING(WMI_VDEV_ADFS_CH_CFG_CMDID); CASE_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID); CASE_RETURN_STRING(WMI_SAR_LIMITS_CMDID); + CASE_RETURN_STRING(WMI_REQUEST_RCPI_CMDID); } return "Invalid WMI cmd"; diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 681748772b50..3d686796b564 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -6124,6 +6124,25 @@ QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, } /** + * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw + * @wmi_hdl: wmi handle + * @params: sar limit command params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, + struct sar_limit_cmd_params *params) +{ + wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; + + if (wmi_handle->ops->send_sar_limit_cmd) + return wmi_handle->ops->send_sar_limit_cmd( + wmi_handle, + params); + return QDF_STATUS_E_FAILURE; +} + +/** * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw * @wmi_hdl: wmi handle * @params: encrypt/decrypt params diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index fb3dbdf83bc4..fbf8d68765f6 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3715,6 +3715,88 @@ QDF_STATUS send_setup_install_key_cmd_tlv(wmi_unified_t wmi_handle, } /** + * send_sar_limit_cmd_tlv() - send sar limit cmd to fw + * @wmi_handle: wmi handle + * @params: sar limit params + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +static QDF_STATUS send_sar_limit_cmd_tlv(wmi_unified_t wmi_handle, + struct sar_limit_cmd_params *sar_limit_params) +{ + wmi_buf_t buf; + QDF_STATUS qdf_status; + wmi_sar_limits_cmd_fixed_param *cmd; + int i; + uint8_t *buf_ptr; + wmi_sar_limit_cmd_row *wmi_sar_rows_list; + struct sar_limit_cmd_row *sar_rows_list; + uint32_t len = sizeof(*cmd) + WMI_TLV_HDR_SIZE; + + len += sizeof(wmi_sar_limit_cmd_row) * sar_limit_params->num_limit_rows; + buf = wmi_buf_alloc(wmi_handle, len); + if (!buf) { + WMI_LOGE("Failed to allocate memory"); + qdf_status = QDF_STATUS_E_NOMEM; + goto end; + } + + buf_ptr = (uint8_t *) wmi_buf_data(buf); + cmd = (wmi_sar_limits_cmd_fixed_param *) buf_ptr; + WMITLV_SET_HDR(&cmd->tlv_header, + WMITLV_TAG_STRUC_wmi_sar_limits_cmd_fixed_param, + WMITLV_GET_STRUCT_TLVLEN + (wmi_sar_limits_cmd_fixed_param)); + cmd->sar_enable = sar_limit_params->sar_enable; + cmd->commit_limits = sar_limit_params->commit_limits; + cmd->num_limit_rows = sar_limit_params->num_limit_rows; + + WMI_LOGD("no of sar rows = %d, len = %d", + sar_limit_params->num_limit_rows, len); + buf_ptr += sizeof(*cmd); + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, + sizeof(wmi_sar_limit_cmd_row) * + sar_limit_params->num_limit_rows); + if (cmd->num_limit_rows == 0) + goto send_sar_limits; + + wmi_sar_rows_list = (wmi_sar_limit_cmd_row *) + (buf_ptr + WMI_TLV_HDR_SIZE); + sar_rows_list = sar_limit_params->sar_limit_row_list; + + for (i = 0; i < sar_limit_params->num_limit_rows; i++) { + WMITLV_SET_HDR(&wmi_sar_rows_list->tlv_header, + WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row, + WMITLV_GET_STRUCT_TLVLEN(wmi_sar_limit_cmd_row)); + wmi_sar_rows_list->band_id = sar_rows_list->band_id; + wmi_sar_rows_list->chain_id = sar_rows_list->chain_id; + wmi_sar_rows_list->mod_id = sar_rows_list->mod_id; + wmi_sar_rows_list->limit_value = sar_rows_list->limit_value; + wmi_sar_rows_list->validity_bitmap = + sar_rows_list->validity_bitmap; + WMI_LOGD("row %d, band_id = %d, chain_id = %d, mod_id = %d, limit_value = %d, validity_bitmap = %d", + i, wmi_sar_rows_list->band_id, + wmi_sar_rows_list->chain_id, + wmi_sar_rows_list->mod_id, + wmi_sar_rows_list->limit_value, + wmi_sar_rows_list->validity_bitmap); + sar_rows_list++; + wmi_sar_rows_list++; + } +send_sar_limits: + qdf_status = wmi_unified_cmd_send(wmi_handle, buf, len, + WMI_SAR_LIMITS_CMDID); + + if (QDF_IS_STATUS_ERROR(qdf_status)) { + WMI_LOGE("Failed to send WMI_SAR_LIMITS_CMDID"); + wmi_buf_free(buf); + } + +end: + return qdf_status; +} + +/** * send_encrypt_decrypt_send_cmd() - send encrypt/decrypt cmd to fw * @wmi_handle: wmi handle * @params: encrypt/decrypt params @@ -12379,6 +12461,7 @@ struct wmi_ops tlv_ops = { .send_power_dbg_cmd = send_power_dbg_cmd_tlv, .send_encrypt_decrypt_send_cmd = send_encrypt_decrypt_send_cmd_tlv, + .send_sar_limit_cmd = send_sar_limit_cmd_tlv, }; #ifdef WMI_TLV_AND_NON_TLV_SUPPORT |
