From f63f7a3dd89bdb53713ea00cf8ae621daa4b6e4b Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Tue, 22 Aug 2017 12:49:42 -0700 Subject: [PATCH] qcacld-3.0: Add dummy event handler function for WMI_PHYERR_EVENTID Currently there are no phyerror event handler either in cmn or cld code, idea was to implement all DFS code in cmn code. Before enabling event handler in cmn code need more testing on all the platform which are using cmn project to make sure not to break radar detection. Until then add dummy phyerror event handler in cld project. This is mainly to prevent crash due to watchdog bark because of unhandled event console logs. Change-Id: I37d652537dec9f6e2de7fd0abf56d4058697313e CRs-Fixed: 2097256 --- core/wma/src/wma_main.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index c76f45c5e63e..11fc5b84a0c4 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -2171,6 +2171,28 @@ static int wma_flush_complete_evt_handler(void *handle, return QDF_STATUS_E_FAILURE; } +/** + * wma_unified_phyerr_rx_event_handler() - phyerr event handler + * @handle: wma handle + * @data: data buffer + * @datalen: buffer length + * + * WMI Handler for WMI_PHYERR_EVENTID event from firmware. + * This handler is currently handling DFS and spectral scan + * phy errors. + * + * Return: 0 for success, other value for failure + */ +static int wma_unified_phyerr_rx_event_handler(void *handle, + uint8_t *data, uint32_t datalen) { + /* phyerr handling is moved to cmn project + * As WIN still uses handler registration in non-cmn code. + * need complete testing of non offloaded DFS code before we enable + * it in cmn code. + **/ + return QDF_STATUS_SUCCESS; +} + void wma_vdev_init(struct wma_txrx_node *vdev) { qdf_wake_lock_create(&vdev->vdev_start_wakelock, "vdev_start"); @@ -2701,6 +2723,11 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *cds_context, WMA_LOGE("Failed to register wma cb with Policy Manager"); } + wmi_unified_register_event_handler(wma_handle->wmi_handle, + WMI_PHYERR_EVENTID, + wma_unified_phyerr_rx_event_handler, + WMA_RX_WORK_CTX); + return QDF_STATUS_SUCCESS; err_dbglog_init: