diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-04-03 21:24:16 -0600 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2017-04-03 21:24:16 -0600 |
| commit | 95da3277289953d4b5b975ea437f9531eae4929f (patch) | |
| tree | 28b863094e4c3aedb09a3889739416227fbc5147 | |
| parent | a00ad16c5466d3ab06f071e5f63a3a2848228b95 (diff) | |
| parent | 31c51139ae125d291491a9123fd3043e3534a28a (diff) | |
Promotion of wlan-cmn.driver.lnx.1.0-00141.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
2023821 I5eb8624605cde20b516a1d8d0c823996c363e119 qcacmn: Remove ol_defines dependency from WMI layer
2026441 I8fc84933cc85ba628363638d7567b083ecbf4f34 qcacmn: Return status from qdf_create_work
2026443 Iab70044888911c1e4adba63e8eee643d5693d716 qcacmn: Define API qdf_create_singlethread_workqueue
2020793 I75664b1a987c1339aa173672c9af670f8b3ffeb8 qcacmn: Unmap ce nbufs before free
2023825 Ie113b69006a960b70d781134775bc44c7508fc4c qcacmn: Remove redundant header file inclusion from wmi
2026975 I5bd302dfa372d40c570eaa830ed82a0bbaddc51f qcacmn: Fix recursive memory allocation failure
2020794 I5172eb1136dde2aad915c2497ece94150c95630f qcacmn: simplify error handling in ce_init(1)
2023776 Iabee63fb17c5fbd91c4f630cfc48efadb3180ea3 qcacmn: use __qdf_export_symbol to avoid duplicate symbo
Change-Id: I908c784698ae6153c4d8fee1c1383dbee090669e
CRs-Fixed: 2026975, 2023825, 2023821, 2023776, 2020793, 2026441, 2026443, 2020794
| -rw-r--r-- | hif/src/ce/ce_main.c | 18 | ||||
| -rw-r--r-- | qdf/inc/qdf_defer.h | 20 | ||||
| -rw-r--r-- | qdf/linux/src/i_qdf_defer.h | 13 | ||||
| -rw-r--r-- | qdf/linux/src/qdf_mem.c | 1 | ||||
| -rw-r--r-- | qdf/linux/src/qdf_nbuf.c | 2 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_api.h | 2 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_non_tlv.h | 4 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_param.h | 13 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_priv.h | 5 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_tlv.h | 2 | ||||
| -rw-r--r-- | wmi/src/wmi_tlv_platform.c | 3 | ||||
| -rw-r--r-- | wmi/src/wmi_unified.c | 12 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_api.c | 6 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_non_tlv.c | 6 |
14 files changed, 62 insertions, 45 deletions
diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 563d4c94b8a8..ed70cf30a66a 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -699,7 +699,6 @@ struct CE_handle *ce_init(struct hif_softc *scn, return NULL; } malloc_CE_state = true; - scn->ce_id_to_state[CE_id] = CE_state; qdf_spinlock_create(&CE_state->ce_index_lock); CE_state->id = CE_id; @@ -746,7 +745,6 @@ struct CE_handle *ce_init(struct hif_softc *scn, HIF_ERROR("%s: src ring has no mem", __func__); if (malloc_CE_state) { /* allocated CE_state locally */ - scn->ce_id_to_state[CE_id] = NULL; qdf_mem_free(CE_state); malloc_CE_state = false; } @@ -899,7 +897,6 @@ struct CE_handle *ce_init(struct hif_softc *scn, } if (malloc_CE_state) { /* allocated CE_state locally */ - scn->ce_id_to_state[CE_id] = NULL; qdf_mem_free(CE_state); malloc_CE_state = false; } @@ -1033,6 +1030,7 @@ struct CE_handle *ce_init(struct hif_softc *scn, /* update the htt_data attribute */ ce_mark_datapath(CE_state); + scn->ce_id_to_state[CE_id] = CE_state; return (struct CE_handle *)CE_state; @@ -1170,8 +1168,11 @@ void ce_t2h_msg_ce_cleanup(struct CE_handle *ce_hdl) * covered that case. This is not in performance path, * so OK to do this. */ - if (nbuf) + if (nbuf) { + qdf_nbuf_unmap_single(ce_state->scn->qdf_dev, nbuf, + QDF_DMA_FROM_DEVICE); qdf_nbuf_free(nbuf); + } } } @@ -1435,9 +1436,13 @@ hif_pci_ce_send_done(struct CE_handle *copyeng, void *ce_context, * when last fragment is complteted. */ if (transfer_context != CE_SENDLIST_ITEM_CTXT) { - if (scn->target_status == TARGET_STATUS_RESET) + if (scn->target_status == TARGET_STATUS_RESET) { + + qdf_nbuf_unmap_single(scn->qdf_dev, + transfer_context, + QDF_DMA_TO_DEVICE); qdf_nbuf_free(transfer_context); - else + } else msg_callbacks->txCompletionHandler( msg_callbacks->Context, transfer_context, transfer_id, @@ -1477,6 +1482,7 @@ static inline void hif_ce_do_recv(struct hif_msg_callbacks *msg_callbacks, } else { HIF_ERROR("%s: Invalid Rx msg buf:%p nbytes:%d", __func__, netbuf, nbytes); + qdf_nbuf_free(netbuf); } } diff --git a/qdf/inc/qdf_defer.h b/qdf/inc/qdf_defer.h index 5e2f6ffa3b2a..ee889237d2b2 100644 --- a/qdf/inc/qdf_defer.h +++ b/qdf/inc/qdf_defer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -104,12 +104,13 @@ static inline void qdf_destroy_bh(qdf_handle_t hdl, qdf_bh_t *bh) * @work: pointer to work * @func: deferred function to run at bottom half non-interrupt context. * @arg: argument for the deferred function - * Return: none + * + * Return: QDF_STATUS */ -static inline void qdf_create_work(qdf_handle_t hdl, qdf_work_t *work, +static inline QDF_STATUS qdf_create_work(qdf_handle_t hdl, qdf_work_t *work, qdf_defer_fn_t func, void *arg) { - __qdf_init_work(hdl, work, func, arg); + return __qdf_init_work(hdl, work, func, arg); } /** @@ -140,6 +141,17 @@ static inline qdf_workqueue_t *qdf_create_workqueue(char *name) } /** + * qdf_create_singlethread_workqueue() - create a single threaded workqueue + * @name: string + * + * Return: pointer of type qdf_workqueue_t + */ +static inline qdf_workqueue_t *qdf_create_singlethread_workqueue(char *name) +{ + return __qdf_create_singlethread_workqueue(name); +} + +/** * qdf_queue_work - Queue the work/task * @hdl: OS handle * @wqueue: pointer to workqueue diff --git a/qdf/linux/src/i_qdf_defer.h b/qdf/linux/src/i_qdf_defer.h index d2a2f730487d..38a690e8177e 100644 --- a/qdf/linux/src/i_qdf_defer.h +++ b/qdf/linux/src/i_qdf_defer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -309,6 +309,17 @@ static inline __qdf_workqueue_t *__qdf_create_workqueue(char *name) } /** + * __qdf_create_singlethread_workqueue() - create a single threaded workqueue + * @name: string + * + * Return: pointer of type qdf_workqueue_t + */ +static inline __qdf_workqueue_t *__qdf_create_singlethread_workqueue(char *name) +{ + return create_singlethread_workqueue(name); +} + +/** * __qdf_flush_workqueue - flush the workqueue * @hdl: OS handle * @wqueue: pointer to workqueue diff --git a/qdf/linux/src/qdf_mem.c b/qdf/linux/src/qdf_mem.c index 86bc86d76143..27ec89514724 100644 --- a/qdf/linux/src/qdf_mem.c +++ b/qdf/linux/src/qdf_mem.c @@ -895,7 +895,6 @@ void *qdf_mem_malloc_debug(size_t size, QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "%s: called with invalid arg; passed in %zu !!!", __func__, size); - host_log_low_resource_failure(WIFI_EVENT_MEMORY_FAILURE); return NULL; } diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index ec623e156b34..fb2edf3ee547 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -1641,7 +1641,7 @@ qdf_export_symbol(qdf_net_buf_debug_release_skb); void qdf_net_buf_debug_delete_node(qdf_nbuf_t net_buf) { } -EXPORT_SYMBOL(qdf_net_buf_debug_delete_node); +qdf_export_symbol(qdf_net_buf_debug_delete_node); #endif /*MEMORY_DEBUG */ #if defined(FEATURE_TSO) diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 2ca1fffd56b3..aa545493d52e 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -34,8 +34,6 @@ #define _WMI_UNIFIED_API_H_ #include <osdep.h> -#include "a_types.h" -#include "ol_defines.h" #ifdef CONFIG_MCL #include "wmi.h" #endif diff --git a/wmi/inc/wmi_unified_non_tlv.h b/wmi/inc/wmi_unified_non_tlv.h index d475a6706460..3e50b8f207b5 100644 --- a/wmi/inc/wmi_unified_non_tlv.h +++ b/wmi/inc/wmi_unified_non_tlv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -26,11 +26,9 @@ */ #include <osdep.h> -#include "a_types.h" #include "wmi_unified_param.h" #include "legacy/wmi.h" #include "legacy/wmi_unified.h" -#include "ol_defines.h" /* Fix Me: wmi_unified_t structure definition */ QDF_STATUS send_vdev_create_cmd_non_tlv(wmi_unified_t wmi_handle, uint8_t macaddr[IEEE80211_ADDR_LEN], diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 0109f466abe8..afd865ceadcf 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -258,6 +258,19 @@ #define MAX_ASSOC_IE_LENGTH 1024 typedef uint32_t TARGET_INIT_STATUS; +/** + * @brief Opaque handle of wmi structure + */ +struct wmi_unified; +typedef struct wmi_unified *wmi_unified_t; + +typedef void *ol_scn_t; +/** + * @wmi_event_handler function prototype + */ +typedef int (*wmi_unified_event_handler)(ol_scn_t scn_handle, + uint8_t *event_buf, uint32_t len); + typedef enum { WMI_HOST_MODE_11A = 0, /* 11a Mode */ WMI_HOST_MODE_11G = 1, /* 11b/g Mode */ diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 4dba6bd99993..22880dcc1795 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -32,8 +32,11 @@ #ifndef _WMI_UNIFIED_PRIV_H_ #define _WMI_UNIFIED_PRIV_H_ #include <osdep.h> -#include "a_types.h" +#include "wmi_unified_api.h" #include "wmi_unified_param.h" +#ifdef CONFIG_MCL +#include <wmi_unified.h> +#endif #include "qdf_atomic.h" #define WMI_UNIFIED_MAX_EVENT 0x100 diff --git a/wmi/inc/wmi_unified_tlv.h b/wmi/inc/wmi_unified_tlv.h index 426cab649653..e285728930f8 100644 --- a/wmi/inc/wmi_unified_tlv.h +++ b/wmi/inc/wmi_unified_tlv.h @@ -27,11 +27,9 @@ #ifndef _WMI_UNIFIED_TLV_H_ #define _WMI_UNIFIED_TLV_H_ #include <osdep.h> -#include "a_types.h" #include "wmi_unified_param.h" #include "wmi.h" #include "wmi_unified.h" -#include "ol_defines.h" /* Fix Me: wmi_unified_t structure definition */ QDF_STATUS send_vdev_create_cmd_tlv(wmi_unified_t wmi_handle, uint8_t macaddr[IEEE80211_ADDR_LEN], diff --git a/wmi/src/wmi_tlv_platform.c b/wmi/src/wmi_tlv_platform.c index d7858aed6d4f..7e0add1ad798 100644 --- a/wmi/src/wmi_tlv_platform.c +++ b/wmi/src/wmi_tlv_platform.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014, 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -29,7 +29,6 @@ * LMAC offload interface functions for WMI TLV Interface */ -#include "ol_if_athvar.h" #include <qdf_mem.h> /* qdf_mem_malloc,free, etc. */ #include <osdep.h> #include "htc_api.h" diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index c9bf5149f336..f91863aab3eb 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -28,17 +28,9 @@ /* * Host WMI unified implementation */ -#include "athdefs.h" -#include "osapi_linux.h" -#include "a_types.h" -#include "a_debug.h" -#include "ol_if_athvar.h" -#include "ol_defines.h" #include "htc_api.h" #include "htc_api.h" -#include "dbglog_host.h" #include "wmi_unified_priv.h" -#include "wmi_unified_param.h" #include <linux/debugfs.h> @@ -1064,7 +1056,7 @@ static uint8_t *wmi_id_to_name(uint32_t wmi_command) #ifndef WMI_NON_TLV_SUPPORT -static inline void wma_log_cmd_id(uint32_t cmd_id, uint32_t tag) +static inline void wmi_log_cmd_id(uint32_t cmd_id, uint32_t tag) { WMI_LOGD("Send WMI command:%s command_id:%d htc_tag:%d", wmi_id_to_name(cmd_id), cmd_id, tag); @@ -1185,7 +1177,7 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, SET_HTC_PACKET_NET_BUF_CONTEXT(pkt, buf); #ifndef WMI_NON_TLV_SUPPORT - wma_log_cmd_id(cmd_id, htc_tag); + wmi_log_cmd_id(cmd_id, htc_tag); #endif #ifdef WMI_INTERFACE_EVENT_LOGGING diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index f5bb32d299f7..8dc13e1fa505 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -24,12 +24,6 @@ * under proprietary terms before Copyright ownership was assigned * to the Linux Foundation. */ -#include "athdefs.h" -#include "osapi_linux.h" -#include "a_types.h" -#include "a_debug.h" -#include "ol_if_athvar.h" -#include "ol_defines.h" #include "wmi_unified_priv.h" #include "wmi_unified_param.h" diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c index 3837ef43f69e..2ee8ff02fd43 100644 --- a/wmi/src/wmi_unified_non_tlv.c +++ b/wmi/src/wmi_unified_non_tlv.c @@ -25,12 +25,6 @@ * to the Linux Foundation. */ -#include "athdefs.h" -#include "osapi_linux.h" -#include "a_types.h" -#include "a_debug.h" -#include "ol_if_athvar.h" -#include "ol_defines.h" #include "wmi_unified_api.h" #include "wmi_unified_priv.h" |
